[
  {
    "path": ".gitignore",
    "content": "*.pyc\n*.DS_Store\n*~\ndjango_debug_toolbar.egg-info"
  },
  {
    "path": "AUTHORS",
    "content": "The Django Debug Toolbar was original created by Rob Hudson <rob@cogit8.org> in\nAugust 2008.\n\nThe following is a list of much appreciated contributors:\n\nReto Aebersold <aeby@atizo.com>\nAndi Albrecht <albrecht.andi@gmail.com>\nChris Beaven <smileychris@gmail.com>\nKenneth Belitzky <kenny@belitzky.com>\nLoic Bistuer <loic.bistuer@sixmedia.com>\nEtienne Carrier <etienne@px9.ca>\nDavid Cramer <dcramer@gmail.com>\nMichael Elsdoerfer <michael@elsdoerfer.com>\nAugie Fackler <durin42@gmail.com>\nDan Fairs <dan@fezconsulting.com>\nAlex Gaynor <alex.gaynor@gmail.com>\nIdan Gazit <idan@pixane.com>\nMatt George <matt.george@myemma.com>\nAdam Gomaa <adam@adam.gomaa.us>\nDaniel Hahler <daniel@thequod.de>\nJacob Kaplan-Moss <jacob@jacobian.org>\nRussell Keith-Magee <freakboy3742@gmail.com>\nMikhail Korobov <kmike84@gmail.com>\nArthur Koziel <arthur@arthurkoziel.com>\nJannis Leidel <jannis@leidel.info>\nMartin Maney <maney@two14.net>\nPercy Perez-Pinedo <percyp3@gmail.com>\nNowell Strite <nowell@strite.org>\nMalcolm Tredinnick <malcolm@pointy-stick.com>\nBryan Veloso <bryan@revyver.com>\nSimon Willison <simon@simonwillison.net>\nDiego Búrigo Zacarão <diegobz@gmail.com>\nPhilip Zeyliger <philip@cloudera.com>\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) Rob Hudson and individual contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice, \n       this list of conditions and the following disclaimer.\n    \n    2. Redistributions in binary form must reproduce the above copyright \n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    3. Neither the name of Django nor the names of its contributors may be used\n       to endorse or promote products derived from this software without\n       specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "MANIFEST.in",
    "content": "include AUTHORS\ninclude LICENSE\ninclude README.rst\nrecursive-include debug_toolbar/media *\nrecursive-include debug_toolbar/templates *\n"
  },
  {
    "path": "NEWS",
    "content": "News for django-debug-toolbar\n=============================\n\n0.8.5 (2011 Apr 25)\n-------------------\n\n* Ensure if we're overriding the urlconf that we're resetting handler404/500.\n\n* Updated middleware logic to avoid work if content-type isn't right.\n\n* Change .load() calls to GET to avoid CSRF protection.\n\n* Updated SQL panel to match Django's which now includes logging.\n\n* Added basic multi-db support.\n\n* Some HTML validation fixes.\n\n* Added support for `executemany`. Thanks to postal2600.\n\n* Added support for LogBook. Thanks to Vincent Driessen.\n\n* Added clean_params method to DatabaseStatTracker to scrub non-unicode\n  data for displaying on the sql panel. Thanks to Matthew J Morrison\n\n0.8.4 (2010 Nov 8)\n------------------\n\n* Added print style to hide the toolbar (issue 90)\n\n* Fixed \"Badly formatted SQL query plan\" (issue 86)\n\n* Fixed \"SQL not selectable due to line chart\" (issue 85)\n\n* Fixed \"Redirect page does not set cookie\" (issue 6)\n\n* Fixed template block inheritance bug (issues 77 and 97).\n\n* Fixed flash of unstyled toolbar.\n\n* Updated to work with old TEMPLATE_LOADERS settings from < 1.2.\n\n* Updated to stop template loader iteration when template is found.\n\n\n(Note: NEWS was started after the 0.8.3 release and is not complete)\n\n"
  },
  {
    "path": "README.rst",
    "content": "====================\nDjango Debug Toolbar\n====================\n\nThe Django Debug Toolbar is a configurable set of panels that display various\ndebug information about the current request/response and when clicked, display\nmore details about the panel's content.\n\nCurrently, the following panels have been written and are working:\n\n- Django version\n- Request timer\n- A list of settings in settings.py\n- Common HTTP headers\n- GET/POST/cookie/session variable display\n- Templates and context used, and their template paths\n- SQL queries including time to execute and links to EXPLAIN each query\n- List of signals, their args and receivers\n- Logging output via Python's built-in logging, or via the `logbook <http://logbook.pocoo.org>`_ module\n\nThere is also one Django management command currently:\n\n- `debugsqlshell`: Outputs the SQL that gets executed as you work in the Python\n  interactive shell.  (See example below)\n\nIf you have ideas for other panels please let us know.\n\nInstallation\n============\n\n#. Add the `debug_toolbar` directory to your Python path.\n\n#. Add the following middleware to your project's `settings.py` file:\n\n\t``'debug_toolbar.middleware.DebugToolbarMiddleware',``\n\n   Tying into middleware allows each panel to be instantiated on request and\n   rendering to happen on response.\n\n   The order of MIDDLEWARE_CLASSES is important: the Debug Toolbar middleware\n   must come after any other middleware that encodes the response's content\n   (such as GZipMiddleware).\n\n   Note: The debug toolbar will only display itself if the mimetype of the\n   response is either `text/html` or `application/xhtml+xml` and contains a\n   closing `</body>` tag.\n\n   Note: Be aware of middleware ordering and other middleware that may\n   intercept requests and return responses.  Putting the debug toolbar\n   middleware *after* the Flatpage middleware, for example, means the\n   toolbar will not show up on flatpages.\n\n#. Make sure your IP is listed in the `INTERNAL_IPS` setting.  If you are\n   working locally this will be:\n\n\tINTERNAL_IPS = ('127.0.0.1',)\n\n   Note: This is required because of the built-in requirements of the\n   `show_toolbar` method.  See below for how to define a method to determine\n   your own logic for displaying the toolbar.\n\n#. Add `debug_toolbar` to your `INSTALLED_APPS` setting so Django can find the\n   template files associated with the Debug Toolbar.\n\n   Alternatively, add the path to the debug toolbar templates\n   (``'path/to/debug_toolbar/templates'`` to your ``TEMPLATE_DIRS`` setting.)\n\nConfiguration\n=============\n\nThe debug toolbar has two settings that can be set in `settings.py`:\n\n#. Optional: Add a tuple called `DEBUG_TOOLBAR_PANELS` to your ``settings.py``\n   file that specifies the full Python path to the panel that you want included\n   in the Toolbar.  This setting looks very much like the `MIDDLEWARE_CLASSES`\n   setting.  For example::\n\n\tDEBUG_TOOLBAR_PANELS = (\n\t    'debug_toolbar.panels.version.VersionDebugPanel',\n\t    'debug_toolbar.panels.timer.TimerDebugPanel',\n\t    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',\n\t    'debug_toolbar.panels.headers.HeaderDebugPanel',\n\t    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',\n\t    'debug_toolbar.panels.template.TemplateDebugPanel',\n\t    'debug_toolbar.panels.sql.SQLDebugPanel',\n\t    'debug_toolbar.panels.signals.SignalDebugPanel',\n\t    'debug_toolbar.panels.logger.LoggingPanel',\n\t)\n\n   You can change the ordering of this tuple to customize the order of the\n   panels you want to display, or add/remove panels.  If you have custom panels\n   you can include them in this way -- just provide the full Python path to\n   your panel.\n\n#. Optional: There are a few configuration options to the debug toolbar that\n   can be placed in a dictionary:\n\n   * `INTERCEPT_REDIRECTS`: If set to True (default), the debug toolbar will\n     show an intermediate page upon redirect so you can view any debug\n     information prior to redirecting.  This page will provide a link to the\n     redirect destination you can follow when ready.  If set to False, redirects\n     will proceed as normal.\n\n   * `SHOW_TOOLBAR_CALLBACK`: If not set or set to None, the debug_toolbar\n     middleware will use its built-in show_toolbar method for determining whether\n     the toolbar should show or not.  The default checks are that DEBUG must be\n     set to True and the IP of the request must be in INTERNAL_IPS.  You can\n     provide your own method for displaying the toolbar which contains your\n     custom logic.  This method should return True or False.\n\n   * `EXTRA_SIGNALS`: An array of custom signals that might be in your project,\n     defined as the python path to the signal.\n\n   * `HIDE_DJANGO_SQL`: If set to True (the default) then code in Django itself\n     won't be shown in SQL stacktraces.\n\n   * `SHOW_TEMPLATE_CONTEXT`: If set to True (the default) then a template's\n     context will be included with it in the Template debug panel.  Turning this\n     off is useful when you have large template contexts, or you have template\n     contexts with lazy datastructures that you don't want to be evaluated.\n\n   * `TAG`: If set, this will be the tag to which debug_toolbar will attach the \n     debug toolbar. Defaults to 'body'.\n\n   Example configuration::\n\n\tdef custom_show_toolbar(request):\n\t    return True # Always show toolbar, for example purposes only.\n\n\tDEBUG_TOOLBAR_CONFIG = {\n\t    'INTERCEPT_REDIRECTS': False,\n\t    'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar,\n\t    'EXTRA_SIGNALS': ['myproject.signals.MySignal'],\n\t    'HIDE_DJANGO_SQL': False,\n\t    'TAG': 'div',\n\t}\n\n`debugsqlshell`\n===============\nThe following is sample output from running the `debugsqlshell` management\ncommand.  Each ORM call that results in a database query will be beautifully\noutput in the shell::\n\n    $ ./manage.py debugsqlshell\n    Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) \n    [GCC 4.2.1 (Apple Inc. build 5646)] on darwin\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    (InteractiveConsole)\n    >>> from page.models import Page\n    >>> ### Lookup and use resulting in an extra query...\n    >>> p = Page.objects.get(pk=1)\n    SELECT \"page_page\".\"id\",\n           \"page_page\".\"number\",\n           \"page_page\".\"template_id\",\n           \"page_page\".\"description\"\n    FROM \"page_page\"\n    WHERE \"page_page\".\"id\" = 1\n    \n    >>> print p.template.name\n    SELECT \"page_template\".\"id\",\n           \"page_template\".\"name\",\n           \"page_template\".\"description\"\n    FROM \"page_template\"\n    WHERE \"page_template\".\"id\" = 1\n    \n    Home\n    >>> ### Using select_related to avoid 2nd database call...\n    >>> p = Page.objects.select_related('template').get(pk=1)\n    SELECT \"page_page\".\"id\",\n           \"page_page\".\"number\",\n           \"page_page\".\"template_id\",\n           \"page_page\".\"description\",\n           \"page_template\".\"id\",\n           \"page_template\".\"name\",\n           \"page_template\".\"description\"\n    FROM \"page_page\"\n    INNER JOIN \"page_template\" ON (\"page_page\".\"template_id\" = \"page_template\".\"id\")\n    WHERE \"page_page\".\"id\" = 1\n    \n    >>> print p.template.name\n    Home\n\nTODOs and BUGS\n==============\nSee: https://github.com/django-debug-toolbar/django-debug-toolbar/issues\n"
  },
  {
    "path": "debug_toolbar/__init__.py",
    "content": "VERSION = (0, 8, 5)\n__version__ = '.'.join(map(str, VERSION))\n"
  },
  {
    "path": "debug_toolbar/locale/de/LC_MESSAGES/django.po",
    "content": "# Django Debug Toolbar auf Deutsch.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# Jannis Leidel, 2009.\n#\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: PACKAGE VERSION\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"Logging\"\n\n#: panels/logger.py:63\n#, fuzzy\nmsgid \"Log Messages\"\nmsgstr \"Nachricht\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"Einstellungen\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"Signals\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"\"\n\n#: panels/sql.py:160\nmsgid \"SQL Queries\"\nmsgstr \"\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"Templates\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"Zeit\"\n\n#: panels/timer.py:47\n#, fuzzy\nmsgid \"Resource Usage\"\nmsgstr \"Ressource\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:80\n#, fuzzy\nmsgid \"Total CPU time\"\nmsgstr \"Zeit gesamt\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"\"\n\n#: panels/timer.py:82\nmsgid \"Context switches\"\nmsgstr \"\"\n\n#: panels/version.py:20 panels/version.py:29\n#, fuzzy\nmsgid \"Versions\"\nmsgstr \"Django-Version\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"Verbergen\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"Schließen\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"Ort\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"Aufrufe gesamt\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"Zeit gesamt\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"Aufrufe\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"Typ\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"Parameter\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"Funktion\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"Schlüssel\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"Wert\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"Niveau\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"Nachricht\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"Keine Nachricht gespeichert\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\n#, fuzzy\nmsgid \"View Function\"\nmsgstr \"Funktion\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\n#, fuzzy\nmsgid \"COOKIES Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\nmsgid \"Variable\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\nmsgid \"No COOKIE data\"\nmsgstr \"Keine COOKIE-Daten\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\n#, fuzzy\nmsgid \"SESSION Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"Keine SESSION-Daten\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\n#, fuzzy\nmsgid \"GET Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"Keine GET-Daten\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\n#, fuzzy\nmsgid \"POST Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"Keine POST-Daten\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"Einstellung\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"Signal\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"Aktion\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"Zeile\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"Methode\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"Datei\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"Zurück\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"Ausgeführtes SQL\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"Fehler\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"Leeres Set\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\n#, fuzzy\nmsgid \"Template Source\"\nmsgstr \"Template\"\n\n#: templates/debug_toolbar/panels/templates.html:2\n#, fuzzy\nmsgid \"Template path\"\nmsgstr \"Template\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"Template\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"Nichts\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"Ressource\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:7\n#, fuzzy\nmsgid \"Version\"\nmsgstr \"Django-Version\"\n"
  },
  {
    "path": "debug_toolbar/locale/en/LC_MESSAGES/django.po",
    "content": "# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# Percy Pérez-Pinedo, 2009.\n#\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: PACKAGE VERSION\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"\"\n\n#: panels/logger.py:63\nmsgid \"Log Messages\"\nmsgstr \"\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"\"\n\n#: panels/sql.py:160\nmsgid \"SQL Queries\"\nmsgstr \"\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"\"\n\n#: panels/timer.py:47\nmsgid \"Resource Usage\"\nmsgstr \"\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:80\nmsgid \"Total CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"\"\n\n#: panels/timer.py:82\nmsgid \"Context switches\"\nmsgstr \"\"\n\n#: panels/version.py:20 panels/version.py:29\nmsgid \"Versions\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\nmsgid \"View Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\nmsgid \"COOKIES Variables\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\nmsgid \"Variable\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\nmsgid \"No COOKIE data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\nmsgid \"SESSION Variables\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\nmsgid \"GET Variables\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\nmsgid \"POST Variables\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\nmsgid \"Template Source\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:2\nmsgid \"Template path\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:7\nmsgid \"Version\"\nmsgstr \"\"\n"
  },
  {
    "path": "debug_toolbar/locale/es/LC_MESSAGES/django.po",
    "content": "# Django Debug Toolbar en Español.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# Percy Pérez-Pinedo <percyp3@gmail.com>, 2009.\n#\n# Caracteres especiales: á, é, í, ó, ú, ñ,\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: PACKAGE VERSION\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"Registros\"\n\n#: panels/logger.py:63\n#, fuzzy\nmsgid \"Log Messages\"\nmsgstr \"Mensaje\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"Configuraciones\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"Señales\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"\"\n\n#: panels/sql.py:160\nmsgid \"SQL Queries\"\nmsgstr \"\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"Plantillas\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"Tiempo\"\n\n#: panels/timer.py:47\n#, fuzzy\nmsgid \"Resource Usage\"\nmsgstr \"Recurso\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:80\n#, fuzzy\nmsgid \"Total CPU time\"\nmsgstr \"Tiempo Total\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"\"\n\n#: panels/timer.py:82\nmsgid \"Context switches\"\nmsgstr \"\"\n\n#: panels/version.py:20 panels/version.py:29\n#, fuzzy\nmsgid \"Versions\"\nmsgstr \"Versión Django\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"Ocultar\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"Cerrar\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"Total Llamadas\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"Tiempo Total\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"Visitas\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"Tipo\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"Parámetros\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"Función\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"Llave\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"Valor\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"Nivel\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"Mensaje\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"No hay mensajes registrados\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\n#, fuzzy\nmsgid \"View Function\"\nmsgstr \"Función\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\n#, fuzzy\nmsgid \"COOKIES Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\n#, fuzzy\nmsgid \"Variable\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\n#, fuzzy\nmsgid \"No COOKIE data\"\nmsgstr \"No GET datos\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\n#, fuzzy\nmsgid \"SESSION Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"No SESSION datos\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\n#, fuzzy\nmsgid \"GET Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"No GET datos\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\n#, fuzzy\nmsgid \"POST Variables\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"No POST datos\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"Configuración\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"Señal\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"Acción\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"Línea\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"Método\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"Archivo\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"Regresar\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"SQL Ejecutado\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"Set Vacío\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\n#, fuzzy\nmsgid \"Template Source\"\nmsgstr \"Plantilla\"\n\n#: templates/debug_toolbar/panels/templates.html:2\n#, fuzzy\nmsgid \"Template path\"\nmsgstr \"Plantilla\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"Plantilla\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"Ninguno\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"Recurso\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:7\n#, fuzzy\nmsgid \"Version\"\nmsgstr \"Versión Django\"\n"
  },
  {
    "path": "debug_toolbar/locale/fr/LC_MESSAGES/django.po",
    "content": "# Django Debug Toolbar in French.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# David Paccoud, 2009.\n#\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Django Debug Toolbar 0.8.0\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: 2009-10-14 22:53+0200\\n\"\n\"Last-Translator: David Paccoud <dpaccoud@gmail.com>\\n\"\n\"Language-Team: French <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"Usage du cache\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"En-têtes HTTP\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"Journaux\"\n\n#: panels/logger.py:63\n#, fuzzy\nmsgid \"Log Messages\"\nmsgstr \"Message\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"Variables de requête\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"Paramètres\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"Paramètres de <code>%s</code>\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"Signaux\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"SQL\"\n\n#: panels/sql.py:160\n#, fuzzy\nmsgid \"SQL Queries\"\nmsgstr \"Requêtes SQL\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"Gabarits\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"Gabarits (%(num_templates)s affichés)\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"Temps\"\n\n#: panels/timer.py:47\n#, fuzzy\nmsgid \"Resource Usage\"\nmsgstr \"Usage des ressources\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"Temps CPU utilisateur\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"Temps CPU système\"\n\n#: panels/timer.py:80\n#, fuzzy\nmsgid \"Total CPU time\"\nmsgstr \"Temps CPU Total\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"Temps écoulé\"\n\n#: panels/timer.py:82\n#, fuzzy\nmsgid \"Context switches\"\nmsgstr \"Changements de contexte\"\n\n#: panels/version.py:20 panels/version.py:29\n#, fuzzy\nmsgid \"Versions\"\nmsgstr \"Versions\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"Masquer la barre\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"Masquer\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"Afficher la barre\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"Fermer\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"Emplacement\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\"La barre de Debug Django a intercepté une redirection vers l'adresse ci-\"\n\"dessous afin de permettre la consultation des messages de debug.  Vous \"\n\"pouvez cliquer sur le lien ci-dessus pour continuer normalement avec la \"\n\"redirection.  Si vous voulez désactiver cette fonctionnalité, paramétrez la \"\n\"valeur de la clé <code>INTERCEPT_REDIRECTS</code> du dictionnaire \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> à <code>False</code>.\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"Nombre total d'appels\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"Temps Total\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"Requêtes\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"Ratés\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"Cassé\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"Type\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"Paramètres\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"Fonction\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"Clé\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"Valeur\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"Niveau\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"Message\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"Aucun message dans le journal\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\n#, fuzzy\nmsgid \"View Function\"\nmsgstr \"Fonction\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\nmsgid \"COOKIES Variables\"\nmsgstr \"Variables des COOKIES\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\nmsgid \"Variable\"\nmsgstr \"Variable\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\nmsgid \"No COOKIE data\"\nmsgstr \"Aucune donnée de COOKIE\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\nmsgid \"SESSION Variables\"\nmsgstr \"Variables de SESSION\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"Aucune donnée de SESSION\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\nmsgid \"GET Variables\"\nmsgstr \"Variables GET\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"Aucune donnée GET\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\nmsgid \"POST Variables\"\nmsgstr \"Variables POST\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"Aucune donnée POST\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"Paramètre\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"Signal\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"Receveurs\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"Action\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"Pile d'appel\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"Requête\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"Ligne\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"Méthode\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"Fichier\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"Retour\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"SQL Expliqué\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"SQL Exécuté\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"SQL Profilé\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"Erreur\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"SQL Sélectionné\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"Ensemble vide\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\nmsgid \"Template Source\"\nmsgstr \"Source du gabarit\"\n\n#: templates/debug_toolbar/panels/templates.html:2\nmsgid \"Template path\"\nmsgstr \"Chemin du gabarit\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"Gabarit\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"Afficher/Masquer le contexte\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"Aucun\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"Processeur de contexte\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"Ressources\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"Paquet\"\n\n#: templates/debug_toolbar/panels/versions.html:7\nmsgid \"Version\"\nmsgstr \"Version\"\n"
  },
  {
    "path": "debug_toolbar/locale/he/LC_MESSAGES/django.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: PACKAGE VERSION\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: 2009-08-24 23:08-0600\\n\"\n\"Last-Translator: Alex <alex.gaynor@gmail.com>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"רישום יומן\"\n\n#: panels/logger.py:63\n#, fuzzy\nmsgid \"Log Messages\"\nmsgstr \"הודעה\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"סימנים\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"\"\n\n#: panels/sql.py:160\nmsgid \"SQL Queries\"\nmsgstr \"\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"תבניות\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"זמן\"\n\n#: panels/timer.py:47\nmsgid \"Resource Usage\"\nmsgstr \"\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:80\n#, fuzzy\nmsgid \"Total CPU time\"\nmsgstr \"זמן\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"\"\n\n#: panels/timer.py:82\nmsgid \"Context switches\"\nmsgstr \"\"\n\n#: panels/version.py:20 panels/version.py:29\n#, fuzzy\nmsgid \"Versions\"\nmsgstr \"ג 'נגו גירסה\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"הסתיר\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"סגור\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"מקום\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"זמן\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"הצלחות\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"סוג\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"מפתח\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"ערך\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"רמה\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"הודעה\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"אין הודעות\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\nmsgid \"View Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\n#, fuzzy\nmsgid \"COOKIES Variables\"\nmsgstr \"מזהה\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\nmsgid \"Variable\"\nmsgstr \"מזהה\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\nmsgid \"No COOKIE data\"\nmsgstr \"אין נתונים  לעוגיות\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\n#, fuzzy\nmsgid \"SESSION Variables\"\nmsgstr \"מזהה\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"אין נתונים  להתחברות\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\n#, fuzzy\nmsgid \"GET Variables\"\nmsgstr \"מזהה\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"שום דבר עבור GET\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\n#, fuzzy\nmsgid \"POST Variables\"\nmsgstr \"מזהה\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"שום דבר עבור POST\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"סימן\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"פעילות\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"שורה\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"קובץ\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"חזרה\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"הסבר עבור SQL\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"שגיאה\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"תוצאות ריק\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\n#, fuzzy\nmsgid \"Template Source\"\nmsgstr \"תבנית\"\n\n#: templates/debug_toolbar/panels/templates.html:2\n#, fuzzy\nmsgid \"Template path\"\nmsgstr \"תבנית\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"תבנית\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:7\n#, fuzzy\nmsgid \"Version\"\nmsgstr \"ג 'נגו גירסה\"\n"
  },
  {
    "path": "debug_toolbar/locale/ru/LC_MESSAGES/django.po",
    "content": "# Django Debug Toolbar in Russian.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# Mikhail Korobov, 2009.\n#\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: \\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2009-11-18 08:06-0800\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: Mikhail Korobov <kmike84@gmail.com>\\n\"\n\"Language-Team: \\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: panels/cache.py:92\n#, python-format\nmsgid \"Cache: %.2fms\"\nmsgstr \"\"\n\n#: panels/cache.py:95\nmsgid \"Cache Usage\"\nmsgstr \"\"\n\n#: panels/headers.py:36 panels/headers.py:39\nmsgid \"HTTP Headers\"\nmsgstr \"Заголовки HTTP\"\n\n#: panels/logger.py:56\nmsgid \"Logging\"\nmsgstr \"Журналирование\"\n\n#: panels/logger.py:63\n#, fuzzy\nmsgid \"Log Messages\"\nmsgstr \"Сообщение\"\n\n#: panels/request_vars.py:13 panels/request_vars.py:16\nmsgid \"Request Vars\"\nmsgstr \"Запрос\"\n\n#: panels/settings_vars.py:16\nmsgid \"Settings\"\nmsgstr \"Настройки\"\n\n#: panels/settings_vars.py:19\n#, python-format\nmsgid \"Settings from <code>%s</code>\"\nmsgstr \"\"\n\n#: panels/signals.py:39 panels/signals.py:42\nmsgid \"Signals\"\nmsgstr \"Сигналы\"\n\n#: panels/sql.py:146\nmsgid \"SQL\"\nmsgstr \"\"\n\n#: panels/sql.py:160\nmsgid \"SQL Queries\"\nmsgstr \"\"\n\n#: panels/template.py:47\nmsgid \"Templates\"\nmsgstr \"Шаблоны\"\n\n#: panels/template.py:52\n#, python-format\nmsgid \"Templates (%(num_templates)s rendered)\"\nmsgstr \"\"\n\n#: panels/timer.py:35 templates/debug_toolbar/panels/cache.html:39\n#: templates/debug_toolbar/panels/logger.html:7\n#: templates/debug_toolbar/panels/sql.html:5\n#: templates/debug_toolbar/panels/sql_explain.html:11\n#: templates/debug_toolbar/panels/sql_profile.html:12\n#: templates/debug_toolbar/panels/sql_select.html:11\nmsgid \"Time\"\nmsgstr \"Время\"\n\n#: panels/timer.py:47\n#, fuzzy\nmsgid \"Resource Usage\"\nmsgstr \"Ресурс\"\n\n#: panels/timer.py:78\nmsgid \"User CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:79\nmsgid \"System CPU time\"\nmsgstr \"\"\n\n#: panels/timer.py:80\n#, fuzzy\nmsgid \"Total CPU time\"\nmsgstr \"Общее время\"\n\n#: panels/timer.py:81\nmsgid \"Elapsed time\"\nmsgstr \"\"\n\n#: panels/timer.py:82\nmsgid \"Context switches\"\nmsgstr \"\"\n\n#: panels/version.py:20 panels/version.py:29\n#, fuzzy\nmsgid \"Versions\"\nmsgstr \"Версия Django\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:23\nmsgid \"Hide\"\nmsgstr \"Скрыть\"\n\n#: templates/debug_toolbar/base.html:48\nmsgid \"Show Toolbar\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/base.html:54\nmsgid \"Close\"\nmsgstr \"Закрыть\"\n\n#: templates/debug_toolbar/redirect.html:7\n#: templates/debug_toolbar/panels/logger.html:9\nmsgid \"Location\"\nmsgstr \"Место\"\n\n#: templates/debug_toolbar/redirect.html:9\nmsgid \"\"\n\"The Django Debug Toolbar has intercepted a redirect to the above URL for \"\n\"debug viewing purposes.  You can click the above link to continue with the \"\n\"redirect as normal.  If you'd like to disable this feature, set the \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key \"\n\"<code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\"\nmsgstr \"\"\n\"Django Debug Toolbar в отладочных целях перехватила редирект на адрес, \"\n\"указанный выше. Вы можете нажать на ссылку, чтобы продолжить обычное \"\n\"выполнение. Если хотите отключить это поведение, установите в словаре \"\n\"<code>DEBUG_TOOLBAR_CONFIG</code> ключ <code>INTERCEPT_REDIRECTS</code> \"\n\"равным <code>False</code>.\"\n\n#: templates/debug_toolbar/panels/cache.html:14\nmsgid \"Total Calls\"\nmsgstr \"Всего вызовов\"\n\n#: templates/debug_toolbar/panels/cache.html:16\nmsgid \"Total Time\"\nmsgstr \"Общее время\"\n\n#: templates/debug_toolbar/panels/cache.html:18\nmsgid \"Hits\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:20\nmsgid \"Misses\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:35\nmsgid \"Breakdown\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:40\nmsgid \"Type\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:41\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/cache.html:42\nmsgid \"Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/headers.html:5\nmsgid \"Key\"\nmsgstr \"Заголовок\"\n\n#: templates/debug_toolbar/panels/headers.html:6\n#: templates/debug_toolbar/panels/request_vars.html:37\n#: templates/debug_toolbar/panels/request_vars.html:63\n#: templates/debug_toolbar/panels/request_vars.html:85\n#: templates/debug_toolbar/panels/request_vars.html:107\n#: templates/debug_toolbar/panels/settings_vars.html:6\n#: templates/debug_toolbar/panels/timer.html:10\nmsgid \"Value\"\nmsgstr \"Значение\"\n\n#: templates/debug_toolbar/panels/logger.html:6\nmsgid \"Level\"\nmsgstr \"Уровень\"\n\n#: templates/debug_toolbar/panels/logger.html:8\nmsgid \"Message\"\nmsgstr \"Сообщение\"\n\n#: templates/debug_toolbar/panels/logger.html:24\nmsgid \"No messages logged\"\nmsgstr \"Сообщений нет\"\n\n#: templates/debug_toolbar/panels/request_vars.html:3\nmsgid \"View information\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:7\nmsgid \"View Function\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:8\nmsgid \"args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:9\nmsgid \"kwargs\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:27\n#, fuzzy\nmsgid \"COOKIES Variables\"\nmsgstr \"Переменная\"\n\n#: templates/debug_toolbar/panels/request_vars.html:36\n#: templates/debug_toolbar/panels/request_vars.html:62\n#: templates/debug_toolbar/panels/request_vars.html:84\n#: templates/debug_toolbar/panels/request_vars.html:106\nmsgid \"Variable\"\nmsgstr \"Переменная\"\n\n#: templates/debug_toolbar/panels/request_vars.html:50\nmsgid \"No COOKIE data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:53\n#, fuzzy\nmsgid \"SESSION Variables\"\nmsgstr \"Переменная\"\n\n#: templates/debug_toolbar/panels/request_vars.html:76\nmsgid \"No SESSION data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:79\n#, fuzzy\nmsgid \"GET Variables\"\nmsgstr \"Переменная\"\n\n#: templates/debug_toolbar/panels/request_vars.html:98\nmsgid \"No GET data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/request_vars.html:101\n#, fuzzy\nmsgid \"POST Variables\"\nmsgstr \"Переменная\"\n\n#: templates/debug_toolbar/panels/request_vars.html:120\nmsgid \"No POST data\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/settings_vars.html:5\nmsgid \"Setting\"\nmsgstr \"Параметр\"\n\n#: templates/debug_toolbar/panels/signals.html:5\nmsgid \"Signal\"\nmsgstr \"Сигналы\"\n\n#: templates/debug_toolbar/panels/signals.html:6\nmsgid \"Providing Args\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/signals.html:7\nmsgid \"Receivers\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:6\nmsgid \"Action\"\nmsgstr \"Действие\"\n\n#: templates/debug_toolbar/panels/sql.html:7\nmsgid \"Stacktrace\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql.html:8\nmsgid \"Query\"\nmsgstr \"Запрос\"\n\n#: templates/debug_toolbar/panels/sql.html:38\nmsgid \"Line\"\nmsgstr \"Строка\"\n\n#: templates/debug_toolbar/panels/sql.html:39\nmsgid \"Method\"\nmsgstr \"Метод\"\n\n#: templates/debug_toolbar/panels/sql.html:40\nmsgid \"File\"\nmsgstr \"Файл\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:3\n#: templates/debug_toolbar/panels/sql_profile.html:3\n#: templates/debug_toolbar/panels/sql_select.html:3\n#: templates/debug_toolbar/panels/template_source.html:3\nmsgid \"Back\"\nmsgstr \"Назад\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:4\nmsgid \"SQL Explained\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_explain.html:9\n#: templates/debug_toolbar/panels/sql_profile.html:10\n#: templates/debug_toolbar/panels/sql_select.html:9\nmsgid \"Executed SQL\"\nmsgstr \"Запрос\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:4\nmsgid \"SQL Profiled\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_profile.html:35\nmsgid \"Error\"\nmsgstr \"Ошибка\"\n\n#: templates/debug_toolbar/panels/sql_select.html:4\nmsgid \"SQL Selected\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/sql_select.html:34\nmsgid \"Empty set\"\nmsgstr \"Ничего\"\n\n#: templates/debug_toolbar/panels/template_source.html:4\n#, fuzzy\nmsgid \"Template Source\"\nmsgstr \"Шаблоны\"\n\n#: templates/debug_toolbar/panels/templates.html:2\n#, fuzzy\nmsgid \"Template path\"\nmsgstr \"Шаблоны\"\n\n#: templates/debug_toolbar/panels/templates.html:13\nmsgid \"Template\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:21\n#: templates/debug_toolbar/panels/templates.html:37\nmsgid \"Toggle Context\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:28\n#: templates/debug_toolbar/panels/templates.html:43\nmsgid \"None\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/templates.html:31\nmsgid \"Context processor\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/timer.html:9\nmsgid \"Resource\"\nmsgstr \"Ресурс\"\n\n#: templates/debug_toolbar/panels/versions.html:6\nmsgid \"Package\"\nmsgstr \"\"\n\n#: templates/debug_toolbar/panels/versions.html:7\n#, fuzzy\nmsgid \"Version\"\nmsgstr \"Версия Django\"\n"
  },
  {
    "path": "debug_toolbar/management/__init__.py",
    "content": ""
  },
  {
    "path": "debug_toolbar/management/commands/__init__.py",
    "content": ""
  },
  {
    "path": "debug_toolbar/management/commands/debugsqlshell.py",
    "content": "import os\nfrom optparse import make_option\n\nfrom django.core.management.base import NoArgsCommand\nfrom django.db.backends import util\n\nfrom debug_toolbar.utils import sqlparse\n\nclass PrintQueryWrapper(util.CursorDebugWrapper):\n    def execute(self, sql, params=()):\n        try:\n            return self.cursor.execute(sql, params)\n        finally:\n            raw_sql = self.db.ops.last_executed_query(self.cursor, sql, params)\n            print sqlparse.format(raw_sql, reindent=True)\n            print\n\nutil.CursorDebugWrapper = PrintQueryWrapper\n\n# The rest is copy/paste from django/core/management/commands/shell.py\n\nclass Command(NoArgsCommand):\n    option_list = NoArgsCommand.option_list + (\n        make_option('--plain', action='store_true', dest='plain',\n            help='Tells Django to use plain Python, not IPython.'),\n    )\n    help = \"Runs a Python interactive interpreter. Tries to use IPython, if it's available.\"\n\n    requires_model_validation = False\n\n    def handle_noargs(self, **options):\n        # XXX: (Temporary) workaround for ticket #1796: force early loading of all\n        # models from installed apps.\n        from django.db.models.loading import get_models\n        loaded_models = get_models()\n\n        use_plain = options.get('plain', False)\n\n        try:\n            if use_plain:\n                # Don't bother loading IPython, because the user wants plain Python.\n                raise ImportError\n            import IPython\n            # Explicitly pass an empty list as arguments, because otherwise IPython\n            # would use sys.argv from this script.\n            shell = IPython.Shell.IPShell(argv=[])\n            shell.mainloop()\n        except ImportError:\n            import code\n            # Set up a dictionary to serve as the environment for the shell, so\n            # that tab completion works on objects that are imported at runtime.\n            # See ticket 5082.\n            imported_objects = {}\n            try: # Try activating rlcompleter, because it's handy.\n                import readline\n            except ImportError:\n                pass\n            else:\n                # We don't have to wrap the following import in a 'try', because\n                # we already know 'readline' was imported successfully.\n                import rlcompleter\n                readline.set_completer(rlcompleter.Completer(imported_objects).complete)\n                readline.parse_and_bind(\"tab:complete\")\n\n            # We want to honor both $PYTHONSTARTUP and .pythonrc.py, so follow system\n            # conventions and get $PYTHONSTARTUP first then import user.\n            if not use_plain:\n                pythonrc = os.environ.get(\"PYTHONSTARTUP\")\n                if pythonrc and os.path.isfile(pythonrc):\n                    try:\n                        execfile(pythonrc)\n                    except NameError:\n                        pass\n                # This will import .pythonrc.py as a side-effect\n                import user\n            code.interact(local=imported_objects)\n"
  },
  {
    "path": "debug_toolbar/media/debug_toolbar/Makefile",
    "content": "# Make file to compress and join all JS files\nall: compress_js compress_css\n\ncompress_js:\n\tjava -jar ~/bin/yuicompressor.jar js/jquery.js > js/toolbar.min.js\n\tjava -jar ~/bin/yuicompressor.jar js/toolbar.js >> js/toolbar.min.js\n\ncompress_css:\n\tjava -jar ~/bin/yuicompressor.jar --type css css/toolbar.css > css/toolbar.min.css\n"
  },
  {
    "path": "debug_toolbar/media/debug_toolbar/css/toolbar.css",
    "content": "/* http://www.positioniseverything.net/easyclearing.html */\n.clearfix:after {\n    content: \".\"; \n    display: block; \n    height: 0; \n    clear: both; \n    visibility: hidden;\n}\n.clearfix {display: inline-block;}\n/* Hides from IE-mac \\*/\n.clearfix {display: block;}\n* html .clearfix {height: 1%;}\n/* end hide from IE-mac */\n\n/* Debug Toolbar CSS Reset, adapted from Eric Meyer's CSS Reset */\n#djDebug {color:#000;background:#FFF;}\n#djDebug, #djDebug div, #djDebug span, #djDebug applet, #djDebug object, #djDebug iframe,\n#djDebug h1, #djDebug h2, #djDebug h3, #djDebug h4, #djDebug h5, #djDebug h6, #djDebug p, #djDebug blockquote, #djDebug pre,\n#djDebug a, #djDebug abbr, #djDebug acronym, #djDebug address, #djDebug big, #djDebug cite, #djDebug code,\n#djDebug del, #djDebug dfn, #djDebug em, #djDebug font, #djDebug img, #djDebug ins, #djDebug kbd, #djDebug q, #djDebug s, #djDebug samp,\n#djDebug small, #djDebug strike, #djDebug strong, #djDebug sub, #djDebug sup, #djDebug tt, #djDebug var,\n#djDebug b, #djDebug u, #djDebug i, #djDebug center,\n#djDebug dl, #djDebug dt, #djDebug dd, #djDebug ol, #djDebug ul, #djDebug li,\n#djDebug fieldset, #djDebug form, #djDebug label, #djDebug legend,\n#djDebug table, #djDebug caption, #djDebug tbody, #djDebug tfoot, #djDebug thead, #djDebug tr, #djDebug th, #djDebug td {\n\tmargin:0;\n\tpadding:0;\n\tborder:0;\n\toutline:0;\n\tfont-size:12px;\n\tline-height:1.5em;\n\tcolor:#000;\n\tvertical-align:baseline;\n\tbackground:transparent;\n\tfont-family:sans-serif;\n\ttext-align:left;\n}\n\n#djDebug #djDebugToolbar {\n\tbackground:#111;\n\twidth:200px;\n\tz-index:100000000;\n\tposition:fixed;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\topacity:0.9;\n}\n\n#djDebug #djDebugToolbar small {\n\tcolor:#999;\n}\n\n#djDebug #djDebugToolbar ul {\n\tmargin:0;\n\tpadding:0;\n\tlist-style:none;\n}\n\n#djDebug #djDebugToolbar li {\n\tborder-bottom:1px solid #222;\n\tcolor:#fff;\n\tdisplay:block;\n\tfont-weight:bold;\n\tfloat:none;\n\tmargin:0;\n\tpadding:0;\n\tposition:relative;\n\twidth:auto;\n}\n\n#djDebug #djDebugToolbar li>a,\n#djDebug #djDebugToolbar li>div.contentless  {\n\tfont-weight:normal;\n\tfont-style:normal;\n\ttext-decoration:none;\n\tdisplay:block;\n\tfont-size:16px;\n\tpadding:10px 10px 5px 25px;\n\tcolor:#fff;\n}\n\n#djDebug #djDebugToolbar li a:hover {\n\tcolor:#111;\n\tbackground-color:#ffc;\n}\n\n#djDebug #djDebugToolbar li.active {\n\tbackground-image:url(../img/indicator.png);\n\tbackground-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgFJREFUeNqUlE1LAmEQx11fesNeDLt08hZ4KcgvIF7EgxcR9CT4IQwErx47WhFBdvPgwUNQeOiogiLRQSQUQaKD6Vpba7ar20izMe4+bjTwY5/Zl//OMzPPcCaTaRUwAxbTjynAdAHq84XGARuADQXN+MGEIJG1QmCaOZVK7WKUdmCdYMf7K/hDKwagwjRLPp9/cLvdzUKh8Ab+GgosExGz5hvFSJAbDAYKmFSpVM4DgUABX57l6wsYAR/AO64/MQUyyauiE1SdTqdTC4fDZ61W6x0FRUAAXvEqElGJCP5qzG3H5XIdFovFdCgUOgB3B3AC28AmyekSKSDH3LL2piRJcjabvU4kEnfg8sAL0Me1GulYE+ViQdWq1ep9NBrN9vv9J3B7KPyKOf3EtNAe1VVwzjwez36pVDoKBoMu3KpNs13dlg0FZ+ZwOJx+v3+PHATO6H2r0UOe54fJZPIil8vVSLtMjE7LQsFGo/EYiUSuut3uM/aimjPJSFQnCE0+hVNzE4/Hb1FoyOjBCasHdYKiKPLpdPo0k8k0GY1NKyvTyjIFe71eLRaLHZfLZYFx9AS8jhgR6gXb7faJ1+u9FATBglWU8cMxRjki0RmOMmu9Xo/4fL4y9pmVzEMZBcakGPJfw3YWzRY2rA19dWLLBMNCaAXXNHNPIVFO/zOtZ/YtwADKQgq0l7HbRAAAAABJRU5ErkJggg==);\n\tbackground-repeat:no-repeat;\n\tbackground-position:left center;\n\tbackground-color:#333;\n\tpadding-left:10px;\t\n}\n\n#djDebug #djDebugToolbar li.active a:hover {\n\tcolor:#b36a60;\n\tbackground-color:transparent;\n}\n\n#djDebug #djDebugToolbar li small {\n\tfont-size:12px;\n\tcolor:#999;\n\tfont-style:normal;\n\ttext-decoration:none;\n\tfont-variant:small-caps;\n}\n\n#djDebug #djDebugToolbarHandle {\n\tposition:fixed;\n\tbackground:#fff;\n\tborder:1px solid #111;\n\ttop:30px;\n\tright:0;\n\tz-index:100000000;\n\topacity:0.75;\n}\n\n#djDebug a#djShowToolBarButton {\n\tdisplay:block;\n\theight:75px;\n\twidth:30px;\n\tborder-right:none;\n\tborder-bottom:4px solid #fff;\n\tborder-top:4px solid #fff;\n\tborder-left:4px solid #fff;\n\tcolor:#fff;\n\tfont-size:10px;\n\tfont-weight:bold;\n\ttext-decoration:none;\n\ttext-align:center;\n\ttext-indent:-999999px;\n\tbackground:#000 url(../img/djdt_vertical.png) no-repeat left center;\n\tbackground-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABLCAYAAAACnsWZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAATCSURBVGiB7ZlvSBtnHMe/sckZY5aMw06r7aTLjGOwTKOMEWYs7M2EaaUdjG6+GDoQ9mIyupUxGIONwVZfDHwxg2E4igym24s5sFB0oDRq1yi1G0RijTjhjJBI86fR/LvbC+nFs7ncXR7jMsgXDp67e57vffI8v/s9z3NRAeBQxCr7rwGkVAIkVQmQVCVAUpUASVX0gGqxGxaLBTabDVqtFn6/H5OTk4jFYifJxovLdgwNDXGH1dDQkLVeoY+iH+KiBxSNwaOy2+0wmUyKzH0+H7xer2Koo5IVg/loZGSkuGOwtraW2KOggHt7e8QesmMwEomAZVlF5uvr64qBjko2YEtLC9bW1ogfqFRFn2b+v4CpVIovsyyrOP6OSyrksS8uKysDTdNQq9XY3d1FIpEoAFpGshJma2sr53A4OI/Hw7EsK0jIDMNw4+PjXFdXVyEWDLkr6PV6bmJiQvbs4XK5uJqampMBpCiKW1hYUDzF+Xw+zmAwFB5wcHBQMdxjDQ8PHwug6EtC0zS2trag0+kE16enp7G4uAiv14tUKgWz2Qyr1YrOzk6oVCq+XjweR11dHYLBYDZ7RcpK3tvbK+iRcDjMdXR0iP5Sm83GMQwjaNPX11e4IR4dHRU8bGBgQNKsp6dH0MbpdBYO0OVyCR5mNBolzTQaDZdOp/k2c3NzxICiMwlN03x5e3sboVBIrCqvZDIJhmH4c6PRKNlGSqKrGYqi+HJFRQX6+/tlGWq12qxlEmXt2pWVlbxTzGMtLS0VbogjkQjxLw+Hw8QeooA7OzvE5n6/n9hDNAbdbrfibeZRLS8vE7UH8lxunaSKfkUte9MEAAa6EhrqVNZ7HAc8DETBpo935a1oiJ1zH6O5rUH0fmI/iQ2PH1Nji/jpuxlwHHn0KOpBKVFaDRqbz6Gx+RysdjOudn9P7FmwGGy/+DLa3rQQ++QNmEykEA3t8UcsGn+izhvvvEIEBxAM8c2xO/iy74bgWu35KjhmPkLt+SoAwFnTaTI6HPMQMxsBLM1mvgdqdVSO2vKkqAdvXL+FuzOrYFkOd/9YzVqHfsbAlze95NNlnht3FQx0JU6pyxDejSGZyHyFOGs6DWu7GVVnjLh3+wGWZ8m+sMoGfLG1Ht3vvwZruxn1jdWCDVJgO4R7tx9gauwO5iZXiIAUA+r05fhi9D28/pZVluH9+XV8ctmBoJ98qQVIAGooNUZmr+KlV59TZMpsBHCl6Ss8Cu+T8uV+iz/4+qJiOOAg3Xz47eW8oQ5LtAcNdCWmtr55IlX8Oe3BX4sb2PTuIJ1Ko95cjResz6Kt0yKIy0Q8hY66awgFHxEBiqaZC91NArhYZB+fvu3E/M2/s9a32Ey4/ks/qs4c7OSocjUudDfhtx9cRICiQ9zc9rzgfPjzSVE44ODlGLr2q+BaPuFxVKKA9eZqwfnvP85Lmt362Q2WzURMfWN1jtryJApooCv5cmA7hGhI+j+PVDKNAPOQP9cbKwjxcsSghsrcKq/Q4FK/XZYhpdVk2h0q5ytRwFg0k8OeelqHzxzvKjbPtgRTKtEhjkXIzQuaqIM75FNV0C/9wUlKokPscW8SLzhXl/8hag+UNu7kKgGSqgRIqhIgqUqApCp6wH8B9cAOKo9Os8wAAAAASUVORK5CYII=);\n\topacity:0.5;\n}\n\n#djDebug a#djShowToolBarButton:hover {\n\tbackground-color:#111;\n\tpadding-right:6px;\n\tborder-top-color:#FFE761;\n\tborder-left-color:#FFE761;\n\tborder-bottom-color:#FFE761;\n\topacity:1.0;\n}\n\n#djDebug code {\n\tdisplay:block;\n\tfont-family:Consolas, Monaco, \"Bitstream Vera Sans Mono\", \"Lucida Console\", monospace;\n\twhite-space:pre;\n\toverflow:auto;\n}\n\n#djDebug tr.djDebugOdd {\n\tbackground-color:#f5f5f5;\n}\n\n#djDebug .panelContent {\n\tdisplay:none;\n\tposition:fixed;\n\tmargin:0;\n\ttop:0;\n\tright:200px;\n\tbottom:0;\n\tleft:0px;\n\tbackground-color:#eee;\n\tcolor:#666;\n\tz-index:100000000;\n}\n\n#djDebug .panelContent > div {\n\tborder-bottom:1px solid #ddd;\n}\n\n#djDebug .djDebugPanelTitle {\n\tposition:absolute;\n\tbackground-color:#ffc;\n\tcolor:#666;\n\tpadding-left:20px;\n\ttop:0;\n\tright:0;\n\tleft:0;\n\theight:50px;\n}\n\n#djDebug .djDebugPanelTitle code {\n\tdisplay:inline;\n\tfont-size:inherit;\n}\n\n#djDebug .djDebugPanelContent {\n\tposition:absolute;\n\ttop:50px;\n\tright:0;\n\tbottom:0;\n\tleft:0;\n\theight:auto;\n\tpadding:5px 0 0 20px;\n}\n\n#djDebug .djDebugPanelContent .scroll {\n\theight:100%;\n\toverflow:auto;\n\tdisplay:block;\n\tpadding:0 10px 0 0;\n}\n\n#djDebug h3 {\n\tfont-size:24px;\n\tfont-weight:normal;\n\tline-height:50px;\n}\n\n#djDebug h4 {\n\tfont-size:20px;\n\tfont-weight:bold;\n\tmargin-top:0.8em;\n}\n\n#djDebug .panelContent table {\n\tborder:1px solid #ccc;\n\tborder-collapse:collapse;\n\twidth:100%;\n\tbackground-color:#fff;\n\tdisplay:block;\n\tmargin-top:0.8em;\n\toverflow: auto;\n}\n#djDebug .panelContent tbody td,\n#djDebug .panelContent tbody th {\n\tvertical-align:top;\n\tpadding:2px 3px;\n}\n#djDebug .panelContent thead th {\n\tpadding:1px 6px 1px 3px;\n\ttext-align:left;\n\tfont-weight:bold;\n\tfont-size:14px;\n}\n#djDebug .panelContent tbody th {\n\twidth:12em;\n\ttext-align:right;\n\tcolor:#666;\n\tpadding-right:.5em;\n}\n\n#djDebug .djTemplateHideContextDiv {\n\tbackground-color:#fff;\n}\n\n/*\n#djDebug .panelContent p a:hover, #djDebug .panelContent dd a:hover {\n\tcolor:#111;\n\tbackground-color:#ffc;\n}\n\n#djDebug .panelContent p {\n\tpadding:0 5px;\n}\n\n#djDebug .panelContent p, #djDebug .panelContent table, #djDebug .panelContent ol, #djDebug .panelContent ul, #djDebug .panelContent dl {\n\tmargin:5px 0 15px;\n\tbackground-color:#fff;\n}\n#djDebug .panelContent table {\n\tclear:both;\n\tborder:0;\n\tpadding:0;\n\tmargin:0;\n\tborder-collapse:collapse;\n\tborder-spacing:0;\n}\n\n#djDebug .panelContent table a {\n\tcolor:#000;\n\tpadding:2px 4px;\n}\n#djDebug .panelContent table a:hover {\n\tbackground-color:#ffc;\n}\n\n#djDebug .panelContent table th {\n\tbackground-color:#333;\n\tfont-weight:bold;\n\tcolor:#fff;\n\tpadding:3px 7px 3px;\n\ttext-align:left;\n\tcursor:pointer;\n}\n#djDebug .panelContent table td {\n\tpadding:5px 10px;\n\tfont-size:14px;\n\tbackground:#fff;\n\tcolor:#000;\n\tvertical-align:top;\n\tborder:0;\n}\n#djDebug .panelContent table tr.djDebugOdd td {\n  background:#eee;\n}\n*/\n\n#djDebug .panelContent .djDebugClose {\n\ttext-indent:-9999999px;\n\tdisplay:block;\n\tposition:absolute;\n\ttop:4px;\n\tright:15px;\n\theight:40px;\n\twidth:40px;\n\tbackground:url(../img/close.png) no-repeat center center;\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7dJREFUeNqsWM1PE0EU3+7ShdJKoTRA8UYgIUKM3rmaEI0euXsw0YMHIZEbxBijEiIHLkb/A44SDYlXzkYPGBM+ri1NWz7aUmhp6+9tps10mLfdfrzkl2535r39zc77mvUdHh4abUoUCAD3xP/fQAFItWJkYmLC+e1p8eGPgQcC08ycf8BPgW2vhr0SeQa8AWIe5k4LvATiwCrwtZmS2WT8IfAL+OKRhCoxoftH2GqLyBLwHbhvdC53ha2lVrfmE/DKzbLP5yubplnt7e310f+rq6tqpVLxVatVy0VtHbgNLHohsupGIhQKFQG7v79f+8CLiwsjl8sVAZsxQbYTwFrDwpTwpaj4ptPu6+vLDw4OBkHA014QobOzs3yhUAgyUx4BP2rhq/rIe53GwMBAeXx83DMJEpobi8WCpMtMWeOc9TkwoyMRjUattrMedBkyM+KZN4isqDMDgUCuExIyGbKlGVpRiSzo8kQ4HA4ZXRLGVuzo6GhBJjKviw6dT5TLZSOTyRinp6cGQrV+n67hnEY6nTaur6+1PkM2NWTm5fCd0xDRhh89CKHpXCMijLGxMef6+PjYiRSSUqlUv6/arOlKMlcjQlV0qsGDTZPehpYIxurXRCSRSFByq5NQ56hvhWwj8cm2p7A9UdKYVBX8fn+F2+tIJGIgmzaQkUnYtm0MDw+zvsLYniQiEc2q/WxxwmqRHxrISA9xxiyLDzTGdsRsJwJoK3QPo3vctnhpAzLqTexhiVOg6JAdU5bLy0vHZ+Ro8mg7Q0QO1LvwenZZJycnN3yCIPsMRRYnjO0DU/SY+wprW7fiWmjKJMgnUIcafEaeoxZCJWJI9lH4UjV2u6pSPp/XJR9jaGiIKrERDAbrjllzYOQJZ4zm6ISxuSsntB3gqTyazWZtMowa0aBFb4HegC6aRkZG2C2hLSObmqEdOcVvUdJUZyBlZ7tVa1ASdEUvjW3ZUqvvO82e3kqlUuVOSZANvBFd0fugawM2VKclOT8/tzohQ7pkgzn/rHNdvLbLJkPxeDzHRRIXIaTDkCB57XacoJPZW8bZQpSskslk0Y0QjdEcmstsB8myegrsYbqmENfJU3dOpZyOEwjdCqLIWUyxWKygVzHFccJ2eVkbar/qdq5ZFC3/R5dUb6EBsqQmyEtLuawj0eykRwpPgL0uRO+esLXW7tmX9nEWeAEk2yCQFLqzzb4MeK3Zn4FRsapNEXqGy2eJTTF3VOh27bOE/Ia2pQ81YeCO+P+XknGrH2pq8l+AAQDv/n2Gmq99BgAAAABJRU5ErkJggg==);\n}\n\n#djDebug .panelContent .djDebugClose:hover {\n\tbackground-image:url(../img/close_hover.png);\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABCVJREFUeNqsWG1IU1EYfjfd0i1bTc2WFTW3tG2aFWlEf4KkMIrCvhH6U9DnjxTyV0ZEXxIVGBH1JyKIPiBK8kf1syCKwu8M3VQsK7OV6ba2udZ7bmd6d+85827zhYftnnPe5z73nvc95z1X5XQ6IUHLQqQjiul1E8KHGIqHxGw2C7+pcd58E6KMooAzphPxnKJBKbFSIfsRpxAmBWMLKI4iviBOIm5O5qSepL8c8R5xQ6EIqZmobzPlSkhINeIpYhkkb0WUqzreqbmEOBaTOjQGf/0+CHz7Klxqc+aAehrGbkrM2b6IyEVUKRFyMpYI38dW8HS0gc/5kdmfnpcPepsD0vMLeRSEm6ivEzeqJOlLsuIJyzs40Au/Xr+CP64uRXORZraCoXQ1aHMX8YZsRDRG0lcqpA1hl3p4mt+C+/nThILDWLYR9EtXsrraEY6IEHGwHmCJGG16k7AIYsTX0/KO1WWn95QJqZWODHxyws8XjUmnjPtZg8DFsFqpkB2sdWL4zWuYKuNwmVwu1w6xkA2s7GAFpnaGAcxbd8H8snJQa7QTUZ+aCrlr10NexR5Iy8yW+REuwsmwDeL0XSOLjfYW5pNZtldC9orS/4FoK4LWa5cgHP4L9n1HILNoudCuM82F1qsXgcXJSOs1ESFkF7WKe8JBfxifQMVMY8/o+P+Z+TYoPFwNoYAfMh3FE2udz8d8CPJWCLdKM03MbcXpySJTY5EtmsNuFW+uex4/gJFe14SYxUuiRHi/fIaue7f5CzKb20KEGKWtYx4Pl2jM54WW+joY6euR9Xm/DkDT5bMQHB3h+7O5jepEMiAUDDBvRtpCfn9CWUWEuGUbkF7PdSDZQQLTaC+S9Rks+VB4qCoqmxRyu4mQbmlrisEY5hEtLN8ynh2RmBjt74sK4LyK3VwhHO5uNa0xoxYMEtVk02KZbk7uxB400C/ERPOVc1EBrMsxcTdCScYQ68L9ZiiyjryUprC+wM5c0PoaH4EmIwMCv4eh6+6t8VghAWzdtVdYzHoaHjKFEE6GvRTvvmSZvScd8f3hHfjT2z0lS3zaQgtkb6tkde3EN3I/kjX3ET9kwVdSOmV7jaF0Fav5BxEh3X3PyPaVBVaYta48aRGkJtHOt7C6zrPKgMvSoCU2vbhEIEpGBKcw6qQ1LLNmrWaVioRIk2kUtvK4SsWSVaCdl8cbcjxW8UxOZqcRJ2TThITZCO+HZvB2dsQsnnUFNtAtWRpLZ430FKjinH0VHSdCXg8EhwaFS03WbEjR6Sc7TkRCoErp2beKlvwX+EtkKqRkGATEYTXSY4SSkx5x2Eyr7WStnXLVJXr2JfPoQBxEDCYgYJD6Oib7MqC0DLiOyKFPVU9TD2J8lqinY3Oo75R9lhC/oQbRhxoSIDZ63UGK9Xg/1ETsnwADAJrrTk7nZiozAAAAAElFTkSuQmCC);\n}\n\n#djDebug .panelContent .djDebugClose.djDebugBack {\n\tbackground-image:url(../img/back.png);\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7FJREFUeNrMWM1PE0EU3+7S7bZdKSFNSIFgJJAgINE7VxOi0SP/gYkePAiJ3CDGGJUQOXAx+h9wlGhIvHI2fgQ08mEkkjZNIZR2+7Httr63zMoyOzPdthx8yS+bnZn3m9/OvDcfG9jd3ZVatDggDLhO3j8DioBMMySDg4P2s6PJzu8AbhKMcNr8AHwkWPNL7FfIPcATQMJH2xGCh4AkYAHwtpGT3KD+FuAT4I1PEbQliO8XwtWSkFnAe8ANqX2bIFyzzU7NK8AjEXMgELBkWa6HQqEAvpfL5XqtVgvU63VF4LYE6APM+BGyIBKh67oJUCORCLPDQqEg5fN5E6ByKJA7BVg892FU+mJWvGN5a5pmdHV1RUGAr7lAQdls1igWi1FOk9uAD0760jHynOXR2dlp9fb2+haBhm0TiUQUfTlNFnnBeh8wxhIRj8eVllc98OWIGSN9eoTM0y3D4XC+HRFuMcjFqJqnhUyz1olYLKa730uVCrMjXrmIy1ln9vb2pt1CpljZQcdE1ihIW/sHHrayWbHLq1ZNGDPIyaiacguZZAhhph+K+fpr39Ppqcg/wtHhcE46QnAXHT4XwbJssjJECwbtp1EqS99AjNNpSD0r//77wH7yRgW5qeJhmJ44ChmiHYLBIHOMY9GINDrQ9y8uHDEoEMs7FNl+x5HhieFwD6GQbs8GJMtBbtCBmIkrA3anOD0YH2ci+21RWJ4vldibG5u7W5b+E8O95oguhM0LP1PhBauTOfj1Tnxg+c+DpD0aOFq6pjE75HAfoZAdunGlUpH9iLh6uc9+nsaFt5xlHO4dmZwxtynVKm5avIUrqoWkaxAnTmdOnGC5SARyIjdVvA0bX8ZRt0E7GYZhNgpWb0b1c0UIODfcC9o6XZvL5VTYwrnp6zaMEyd9eYZcyMmoWncLWQUcemIim82xFjTeQiey4+Nj1qZ3CNOySu++zxhzeimTyVjtpiZywIiwNr0XrGPAMh20aCcnJ0o7YtAXOTj3nyXeKZ55ykaiZDKZZ2WS6KiIPhwRaI9F1wm8mT3lBJueSqWkdDptigRhHbbBtpzpQJujb4EdnFOTzjvJ4+kcYF8nFEWpqapqf4xpmjXLsmRynVAFg7VMn1dF95oZcuR/yWPDDqvVKsIp8nOknGOJaHTTQ4e7gM0L2NM2Cddiq3dfnMdxwANAugUBaeI73ujPgN9jwGtAD/mqFZJ6kuC3xApp20N8L+y3hHuE1lw/amKAUfK+hYtxsz9qHPsrwACHs5P9Qys/0AAAAABJRU5ErkJggg==);\n}\n\n#djDebug .panelContent .djDebugClose.djDebugBack:hover  {\n\tbackground-image:url(../img/back_hover.png);\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6hJREFUeNrMWF1Ik1EYPtt0pkuGa/aDJTY3nNvSfkglvEwQpa7CbrosKAghBedNikKgEgVe1m03SVeJXmSXBmIozpxpuiUS/eicSc75m73vx/nGt7Nzvm8/BR14+Pjec85znp297znv++kCgQBJs1kBuYDz9H0KEAWEUiGx2WzSMyvFxa8B6iicgjFzgBGKwWSJdUnuyB1AF+BUisK/AToBz7V2RK9B1ACYBDxLQwShc3Cuj3IJm5qQVsAQ4ALJvFVQrlbRAJGPPAE8UKU+2Ce/d6Jk98d36dV44iTR54DvGlTd7jGgCNCSjJBONRHR+Q8kMjtDooF5bn9uaRkxuTwkt+yciAK5UX2fmrNiVLzmzd77ukR+jr0j28GFpP6LIzYHMVdfIcais6IhjYBh2VlZITMANzsj4ntPwiNDaTmHpa6RmCov87r8AA8vau7yRGxOjactAhvOjUxP8LrcdM0EIR3syN0vAbL+djjjkAm/GZS4OK2DFdLEOyc2xsfi/3frcb4/COxqXPI5EwwGm5RC6nnRwTpmgdNNKpq9iZFiLZTsWXkmoRDkQk5Oq1cKqU3wDf80lxDFXGzvTlhUFqm2OwLOWlkI3qIOZc/h3s4hL0y3QyvSM7+4hFxq74otGg2txuyVzW3SU7QryM2YHfD3WFGIPeHQ3AjreETrc34y3d8b8wtZDApE+/5WRHrHnRGJEXDbUYiFte5HIsLtRTGTPR3Sovj3oH8oRaIotB8t5h9kAm6LnvwnDe+acILRJPZ+ZeTgr5f9A+2u2/el3cDd2lz+zF+Qzx1GIYus1WC2oEPptET4+vukp+wXrJ3XBNyLeppjxoWILjtHh5eW6OD6tbxEJno6Y4vJfoJ2NRHIidyMeQHum5DsI6PsJJPTremsvIgSiVDhHFXevnjMvmRHrL56QbaXFuN2hLeQyB43psROCm/c4nXdhB0ZkHdkALDGjjBXVXMPNNFBp9bM1TU88xqKYG/fR+woY7GDFFxtyDg0MScxnrHzunpEGdon9rj/h4kR1j/logKrlZcqIlH2MYt0laeUKlbVEOPpUtGQNq0CqxvwUDR766OPbM3NqibPeU4XySuvVNPplZNnUc6aUjlxACG8Rx01GyLHgKmBQbOKfaosJ7Rq3xaa8vcK6WBBQ75ZQgrNy5YRyVR6OOE6zbYzbX7K1ZdOyUloNe8B3AOspCFghc71aH0Z0KX4feSvf5bQctZkP9Sgg7jo+ywm6+l+qPkjwADNS26fFM/O1QAAAABJRU5ErkJggg==);\n}\n\n#djDebug .panelContent dt, #djDebug .panelContent dd {\n\tdisplay:block;\n}\n\n#djDebug .panelContent dt {\n\tmargin-top:0.75em;\n}\n\n#djDebug .panelContent dd {\n\tmargin-left:10px;\n}\n\n#djDebug a.toggleTemplate {\n\tpadding:4px;\n\tbackground-color:#bbb;\n\t-moz-border-radius:3px;\n\t-webkit-border-radius:3px;\n}\n\n#djDebug a.toggleTemplate:hover {\n\tpadding:4px;\n\tbackground-color:#444;\n\tcolor:#ffe761;\n\t-moz-border-radius:3px;\n\t-webkit-border-radius:3px;\n}\n\n\n#djDebug a.djTemplateShowContext, #djDebug a.djTemplateShowContext span.toggleArrow {\n\tcolor:#999;\n}\n\n#djDebug a.djTemplateShowContext:hover,  #djDebug a.djTemplateShowContext:hover span.toggleArrow {\n\tcolor:#000;\n\tcursor:pointer;\n}\n\n#djDebug .djDebugSqlWrap {\n\tposition:relative;\n}\n\n#djDebug .djDebugCollapse {\n    display: inline-block;\n    background: #ddd;\n    background: url(data:image/gif;base64,R0lGODlhBgAKAJEDAJGRkdra2qysrP///yH5BAEAAAMALAAAAAAGAAoAAAIPnI+JIRImABBQ0sGc2qoAADs=) 0 3px repeat-x;\n    width: 18px;\n    text-indent: -10000em;\n}\n#djDebug .djSelected .djDebugCollapse {\n    background: inherit;\n    text-indent: 0;\n    width: auto;\n    display: inline;\n}\n#djDebug .djUnselected {\n    display: none;\n}\n#djDebug tr.djHiddenByDefault {\n    display: none;\n}\n#djDebug tr.djSelected {\n    display: table-row;\n}\n\n#djDebug .djDebugSql {\n\tz-index:100000002;\n}\n\n#djDebug .djSQLDetailsDiv tbody th {\n\ttext-align: left;\n}\n\n#djDebug .djSqlExplain td {\n\twhite-space: pre;\n}\n\n#djDebug span.djDebugLineChart {\n\tbackground-color:#777;\n\theight:3px;\n\tposition:absolute;\n\tbottom:0;\n\ttop:0;\n\tleft:0;\n\tdisplay:block;\n\tz-index:1000000001;\n}\n#djDebug span.djDebugLineChartWarning {\n\tbackground-color:#900;\n}\n\n#djDebug .highlight  { color:#000; }\n#djDebug .highlight .err { color:#000; } /* Error */\n#djDebug .highlight .g { color:#000; } /* Generic */\n#djDebug .highlight .k { color:#000; font-weight:bold } /* Keyword */\n#djDebug .highlight .o { color:#000; } /* Operator */\n#djDebug .highlight .n { color:#000; } /* Name */\n#djDebug .highlight .mi { color:#000; font-weight:bold } /* Literal.Number.Integer */\n#djDebug .highlight .l { color:#000; } /* Literal */\n#djDebug .highlight .x { color:#000; } /* Other */\n#djDebug .highlight .p { color:#000; } /* Punctuation */\n#djDebug .highlight .m { color:#000; font-weight:bold } /* Literal.Number */\n#djDebug .highlight .s { color:#333 } /* Literal.String */\n#djDebug .highlight .w { color:#888888 } /* Text.Whitespace */\n#djDebug .highlight .il { color:#000; font-weight:bold } /* Literal.Number.Integer.Long */\n#djDebug .highlight .na { color:#333 } /* Name.Attribute */\n#djDebug .highlight .nt { color:#000; font-weight:bold } /* Name.Tag */\n#djDebug .highlight .nv { color:#333 } /* Name.Variable */\n#djDebug .highlight .s2 { color:#333 } /* Literal.String.Double */\n#djDebug .highlight .cp { color:#333 } /* Comment.Preproc */\n\n#djDebug .timeline {\n    width: 30%;\n}\n#djDebug .djDebugTimeline {\n    position: relative;\n    height: 100%;\n    min-height: 100%;\n}\n#djDebug div.djDebugLineChart {\n    position: absolute;\n    left: 0;\n    right: 0;\n    top: 0;\n    bottom: 0;\n    vertical-align: middle;\n}\n#djDebug div.djDebugLineChart strong {\n    text-indent: -10000em;\n    display: block;\n    font-weight: normal;\n    vertical-align: middle;\n    background-color:#ccc;\n}\n\n#djDebug div.djDebugLineChartWarning strong {\n    background-color:#900;\n}\n\n#djDebug .djDebugInTransaction div.djDebugLineChart strong {\n    background-color: #d3ff82;\n}\n#djDebug .djDebugStartTransaction div.djDebugLineChart strong {\n    border-left: 1px solid #94b24d;\n}\n#djDebug .djDebugEndTransaction div.djDebugLineChart strong {\n    border-right: 1px solid #94b24d;\n}\n#djDebug .djDebugHover div.djDebugLineChart strong {\n    background-color: #000;\n}\n#djDebug .djDebugInTransaction.djDebugHover div.djDebugLineChart strong {\n    background-color: #94b24d;\n}\n\n\n#djDebug .panelContent ul.stats {\n    position: relative; \n}\n#djDebug .panelContent ul.stats li {\n    width: 30%;\n    float: left;\n}\n#djDebug .panelContent ul.stats li strong.label {\n    display: block;\n}\n#djDebug .panelContent ul.stats li span.color {\n    height: 12px;\n    width: 3px;\n    display: inline-block;\n}\n#djDebug .panelContent ul.stats li span.info {\n    display: block;\n    padding-left: 5px;\n}\n\n#djDebug .panelcontent thead th {\n    white-space: nowrap;\n}\n#djDebug .djDebugRowWarning .time {\n    color: red;\n}\n#djdebug .panelcontent table .toggle {\n    width: 14px;\n    padding-top: 3px;\n}\n#djdebug .panelcontent table .actions {\n    min-width: 70px;\n}\n#djdebug .panelcontent table .color {\n    width: 3px;\n}\n#djdebug .panelcontent table .color span {\n    width: 3px;\n    height: 12px;\n    overflow: hidden;\n    padding: 0;\n}\n#djDebug .djToggleSwitch {\n    text-decoration: none;\n    border: 1px solid #999;\n    height: 12px;\n    width: 12px;\n    line-height: 12px;\n    text-align: center;\n    color: #777;\n    display: inline-block;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF', endColorstr='#DCDCDC'); /* for IE */\n    background: -webkit-gradient(linear, left top, left bottom, from(#FFF), to(#DCDCDC)); /* for webkit browsers */\n    background:-moz-linear-gradient(center top , #FFFFFF 0pt, #DCDCDC 100%) repeat scroll 0 0 transparent;\n}\n#djDebug .djNoToggleSwitch {\n    height: 14px;\n    width: 14px;\n    display: inline-block;\n}\n\n#djDebug .djSQLDetailsDiv {\n    margin-top:0.8em;\n}\n#djDebug .djSQLDetailsDiv pre {\n    color: #777;\n    border:1px solid #ccc;\n    border-collapse:collapse;\n    background-color:#fff;\n    display:block;\n    overflow: auto;\n    padding:2px 3px;\n    margin-bottom: 3px;\n    font-family:Consolas, Monaco, \"Bitstream Vera Sans Mono\", \"Lucida Console\", monospace;\n}\n#djDebug .stack span {\n    color: #000;\n    font-weight: bold;\n}\n#djDebug .stack span.path {\n    color: #777;\n    font-weight: normal;\n}\n#djDebug .stack span.code {\n    font-weight: normal;\n}\n\n@media print {\n    #djDebug {\n        display: none;\n    }\n}\n"
  },
  {
    "path": "debug_toolbar/media/debug_toolbar/js/jquery.cookie.js",
    "content": "/**\n * Cookie plugin\n *\n * Copyright (c) 2006 Klaus Hartl (stilbuero.de)\n * Dual licensed under the MIT and GPL licenses:\n * http://www.opensource.org/licenses/mit-license.php\n * http://www.gnu.org/licenses/gpl.html\n *\n */\n\n/**\n * Create a cookie with the given name and value and other optional parameters.\n *\n * @example $.cookie('the_cookie', 'the_value');\n * @desc Set the value of a cookie.\n * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });\n * @desc Create a cookie with all available options.\n * @example $.cookie('the_cookie', 'the_value');\n * @desc Create a session cookie.\n * @example $.cookie('the_cookie', null);\n * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain\n *       used when the cookie was set.\n *\n * @param String name The name of the cookie.\n * @param String value The value of the cookie.\n * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.\n * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.\n *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.\n *                             If set to null or omitted, the cookie will be a session cookie and will not be retained\n *                             when the the browser exits.\n * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).\n * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).\n * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will\n *                        require a secure protocol (like HTTPS).\n * @type undefined\n *\n * @name $.cookie\n * @cat Plugins/Cookie\n * @author Klaus Hartl/klaus.hartl@stilbuero.de\n */\n\n/**\n * Get the value of a cookie with the given name.\n *\n * @example $.cookie('the_cookie');\n * @desc Get the value of a cookie.\n *\n * @param String name The name of the cookie.\n * @return The value of the cookie.\n * @type String\n *\n * @name $.cookie\n * @cat Plugins/Cookie\n * @author Klaus Hartl/klaus.hartl@stilbuero.de\n */\njQuery.cookie = function(name, value, options) {\n    if (typeof value != 'undefined') { // name and value given, set cookie\n        options = options || {};\n        if (value === null) {\n            value = '';\n            options.expires = -1;\n        }\n        var expires = '';\n        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {\n            var date;\n            if (typeof options.expires == 'number') {\n                date = new Date();\n                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));\n            } else {\n                date = options.expires;\n            }\n            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE\n        }\n        // CAUTION: Needed to parenthesize options.path and options.domain\n        // in the following expressions, otherwise they evaluate to undefined\n        // in the packed version for some reason...\n        var path = options.path ? '; path=' + (options.path) : '';\n        var domain = options.domain ? '; domain=' + (options.domain) : '';\n        var secure = options.secure ? '; secure' : '';\n        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');\n    } else { // only name given, get cookie\n        var cookieValue = null;\n        if (document.cookie && document.cookie != '') {\n            var cookies = document.cookie.split(';');\n            for (var i = 0; i < cookies.length; i++) {\n                var cookie = jQuery.trim(cookies[i]);\n                // Does this cookie string begin with the name we want?\n                if (cookie.substring(0, name.length + 1) == (name + '=')) {\n                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n                    break;\n                }\n            }\n        }\n        return cookieValue;\n    }\n};"
  },
  {
    "path": "debug_toolbar/media/debug_toolbar/js/jquery.js",
    "content": "/*!\n * jQuery JavaScript Library v1.4.1\n * http://jquery.com/\n *\n * Copyright 2010, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n * Copyright 2010, The Dojo Foundation\n * Released under the MIT, BSD, and GPL Licenses.\n *\n * Date: Mon Jan 25 19:43:33 2010 -0500\n */\n(function( window, undefined ) {\n\n// Define a local copy of jQuery\nvar jQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\t// Use the correct document accordingly with window argument (sandbox)\n\tdocument = window.document,\n\n\t// A central reference to the root jQuery(document)\n\trootjQuery,\n\n\t// A simple way to check for HTML strings or ID strings\n\t// (both of which we optimize for)\n\tquickExpr = /^[^<]*(<[\\w\\W]+>)[^>]*$|^#([\\w-]+)$/,\n\n\t// Is it a simple selector\n\tisSimple = /^.[^:#\\[\\.,]*$/,\n\n\t// Check if a string has a non-whitespace character in it\n\trnotwhite = /\\S/,\n\n\t// Used for trimming whitespace\n\trtrim = /^(\\s|\\u00A0)+|(\\s|\\u00A0)+$/g,\n\n\t// Match a standalone tag\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,\n\n\t// Keep a UserAgent string for use with jQuery.browser\n\tuserAgent = navigator.userAgent,\n\n\t// For matching the engine and version of the browser\n\tbrowserMatch,\n\t\n\t// Has the ready events already been bound?\n\treadyBound = false,\n\t\n\t// The functions to execute on DOM ready\n\treadyList = [],\n\n\t// The ready event handler\n\tDOMContentLoaded,\n\n\t// Save a reference to some core methods\n\ttoString = Object.prototype.toString,\n\thasOwnProperty = Object.prototype.hasOwnProperty,\n\tpush = Array.prototype.push,\n\tslice = Array.prototype.slice,\n\tindexOf = Array.prototype.indexOf;\n\njQuery.fn = jQuery.prototype = {\n\tinit: function( selector, context ) {\n\t\tvar match, elem, ret, doc;\n\n\t\t// Handle $(\"\"), $(null), or $(undefined)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tmatch = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tdoc = (context ? context.ownerDocument || context : document);\n\n\t\t\t\t\t// If a single string is passed in and it's a single tag\n\t\t\t\t\t// just do a createElement and skip the rest\n\t\t\t\t\tret = rsingleTag.exec( selector );\n\n\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\tif ( jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\t\tselector = [ document.createElement( ret[1] ) ];\n\t\t\t\t\t\t\tjQuery.fn.attr.call( selector, context, true );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselector = [ doc.createElement( ret[1] ) ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = buildFragment( [ match[1] ], [ doc ] );\n\t\t\t\t\t\tselector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;\n\t\t\t\t\t}\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(\"TAG\")\n\t\t\t} else if ( !context && /^\\w+$/.test( selector ) ) {\n\t\t\t\tthis.selector = selector;\n\t\t\t\tthis.context = document;\n\t\t\t\tselector = document.getElementsByTagName( selector );\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn (context || rootjQuery).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn jQuery( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn rootjQuery.ready( selector );\n\t\t}\n\n\t\tif (selector.selector !== undefined) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.isArray( selector ) ?\n\t\t\tthis.setArray( selector ) :\n\t\t\tjQuery.makeArray( selector, this );\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.4.1\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\ttoArray: function() {\n\t\treturn slice.call( this, 0 );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == null ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tthis.toArray() :\n\n\t\t\t// Return just the object\n\t\t\t( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery( elems || null );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" ) {\n\t\t\tret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n\t\t} else if ( name ) {\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\t\t}\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Force the current matched set of elements to become\n\t// the specified array of elements (destroying the stack in the process)\n\t// You should use pushStack() in order to do this, but maintain the stack\n\tsetArray: function( elems ) {\n\t\t// Resetting the length to 0, then using the native Array push\n\t\t// is a super-fast way to populate an object with array-like properties\n\t\tthis.length = 0;\n\t\tpush.apply( this, elems );\n\n\t\treturn this;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\t\n\tready: function( fn ) {\n\t\t// Attach the listeners\n\t\tjQuery.bindReady();\n\n\t\t// If the DOM is already ready\n\t\tif ( jQuery.isReady ) {\n\t\t\t// Execute the function immediately\n\t\t\tfn.call( document, jQuery );\n\n\t\t// Otherwise, remember the function for later\n\t\t} else if ( readyList ) {\n\t\t\t// Add the function to the wait list\n\t\t\treadyList.push( fn );\n\t\t}\n\n\t\treturn this;\n\t},\n\t\n\teq: function( i ) {\n\t\treturn i === -1 ?\n\t\t\tthis.slice( i ) :\n\t\t\tthis.slice( i, +i + 1 );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ),\n\t\t\t\"slice\", slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\t\n\tend: function() {\n\t\treturn this.prevObject || jQuery(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: [].sort,\n\tsplice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n\t// copy reference to target object\n\tvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length === i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging object literal values or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {\n\t\t\t\t\tvar clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src\n\t\t\t\t\t\t: jQuery.isArray(copy) ? [] : {};\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep ) {\n\t\t\twindow.jQuery = _jQuery;\n\t\t}\n\n\t\treturn jQuery;\n\t},\n\t\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\t\n\t// Handle when the DOM is ready\n\tready: function() {\n\t\t// Make sure that the DOM is not already loaded\n\t\tif ( !jQuery.isReady ) {\n\t\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\t\tif ( !document.body ) {\n\t\t\t\treturn setTimeout( jQuery.ready, 13 );\n\t\t\t}\n\n\t\t\t// Remember that the DOM is ready\n\t\t\tjQuery.isReady = true;\n\n\t\t\t// If there are functions bound, to execute\n\t\t\tif ( readyList ) {\n\t\t\t\t// Execute all of them\n\t\t\t\tvar fn, i = 0;\n\t\t\t\twhile ( (fn = readyList[ i++ ]) ) {\n\t\t\t\t\tfn.call( document, jQuery );\n\t\t\t\t}\n\n\t\t\t\t// Reset the list of functions\n\t\t\t\treadyList = null;\n\t\t\t}\n\n\t\t\t// Trigger any bound ready events\n\t\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\t}\n\t\t}\n\t},\n\t\n\tbindReady: function() {\n\t\tif ( readyBound ) {\n\t\t\treturn;\n\t\t}\n\n\t\treadyBound = true;\n\n\t\t// Catch cases where $(document).ready() is called after the\n\t\t// browser event has already occurred.\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\treturn jQuery.ready();\n\t\t}\n\n\t\t// Mozilla, Opera and webkit nightlies currently support this event\n\t\tif ( document.addEventListener ) {\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\t\t\t\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", jQuery.ready, false );\n\n\t\t// If IE event model is used\n\t\t} else if ( document.attachEvent ) {\n\t\t\t// ensure firing before onload,\n\t\t\t// maybe late but safe also for iframes\n\t\t\tdocument.attachEvent(\"onreadystatechange\", DOMContentLoaded);\n\t\t\t\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", jQuery.ready );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar toplevel = false;\n\n\t\t\ttry {\n\t\t\t\ttoplevel = window.frameElement == null;\n\t\t\t} catch(e) {}\n\n\t\t\tif ( document.documentElement.doScroll && toplevel ) {\n\t\t\t\tdoScrollCheck();\n\t\t\t}\n\t\t}\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Function]\";\n\t},\n\n\tisArray: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Array]\";\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || toString.call(obj) !== \"[object Object]\" || obj.nodeType || obj.setInterval ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Not own constructor property must be Object\n\t\tif ( obj.constructor\n\t\t\t&& !hasOwnProperty.call(obj, \"constructor\")\n\t\t\t&& !hasOwnProperty.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\n\t\tvar key;\n\t\tfor ( key in obj ) {}\n\t\t\n\t\treturn key === undefined || hasOwnProperty.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tfor ( var name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\t\n\terror: function( msg ) {\n\t\tthrow msg;\n\t},\n\t\n\tparseJSON: function( data ) {\n\t\tif ( typeof data !== \"string\" || !data ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Make sure the incoming data is actual JSON\n\t\t// Logic borrowed from http://json.org/json2.js\n\t\tif ( /^[\\],:{}\\s]*$/.test(data.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g, \"@\")\n\t\t\t.replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, \"]\")\n\t\t\t.replace(/(?:^|:|,)(?:\\s*\\[)+/g, \"\")) ) {\n\n\t\t\t// Try to use the native JSON parser first\n\t\t\treturn window.JSON && window.JSON.parse ?\n\t\t\t\twindow.JSON.parse( data ) :\n\t\t\t\t(new Function(\"return \" + data))();\n\n\t\t} else {\n\t\t\tjQuery.error( \"Invalid JSON: \" + data );\n\t\t}\n\t},\n\n\tnoop: function() {},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tif ( data && rnotwhite.test(data) ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\tscript.type = \"text/javascript\";\n\n\t\t\tif ( jQuery.support.scriptEval ) {\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\t\t\t} else {\n\t\t\t\tscript.text = data;\n\t\t\t}\n\n\t\t\t// Use insertBefore instead of appendChild to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0,\n\t\t\tlength = object.length,\n\t\t\tisObj = length === undefined || jQuery.isFunction(object);\n\n\t\tif ( args ) {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < length; ) {\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}\n\t\t\t}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\ttrim: function( text ) {\n\t\treturn (text || \"\").replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( array, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( array != null ) {\n\t\t\t// The window, strings (and functions) also have 'length'\n\t\t\t// The extra typeof function check is to prevent crashes\n\t\t\t// in Safari 2 (See: #3039)\n\t\t\tif ( array.length == null || typeof array === \"string\" || jQuery.isFunction(array) || (typeof array !== \"function\" && array.setInterval) ) {\n\t\t\t\tpush.call( ret, array );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( ret, array );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, array ) {\n\t\tif ( array.indexOf ) {\n\t\t\treturn array.indexOf( elem );\n\t\t}\n\n\t\tfor ( var i = 0, length = array.length; i < length; i++ ) {\n\t\t\tif ( array[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar i = first.length, j = 0;\n\n\t\tif ( typeof second.length === \"number\" ) {\n\t\t\tfor ( var l = second.length; j < l; j++ ) {\n\t\t\t\tfirst[ i++ ] = second[ j ];\n\t\t\t}\n\t\t} else {\n\t\t\twhile ( second[j] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar ret = [];\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tif ( !inv !== !callback( elems[ i ], i ) ) {\n\t\t\t\tret.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar ret = [], value;\n\n\t\t// Go through the array, translating each of the items to their\n\t\t// new value (or values).\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\tif ( value != null ) {\n\t\t\t\tret[ ret.length ] = value;\n\t\t\t}\n\t\t}\n\n\t\treturn ret.concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\tproxy: function( fn, proxy, thisObject ) {\n\t\tif ( arguments.length === 2 ) {\n\t\t\tif ( typeof proxy === \"string\" ) {\n\t\t\t\tthisObject = fn;\n\t\t\t\tfn = thisObject[ proxy ];\n\t\t\t\tproxy = undefined;\n\n\t\t\t} else if ( proxy && !jQuery.isFunction( proxy ) ) {\n\t\t\t\tthisObject = proxy;\n\t\t\t\tproxy = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( !proxy && fn ) {\n\t\t\tproxy = function() {\n\t\t\t\treturn fn.apply( thisObject || this, arguments );\n\t\t\t};\n\t\t}\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tif ( fn ) {\n\t\t\tproxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;\n\t\t}\n\n\t\t// So proxy can be declared as an argument\n\t\treturn proxy;\n\t},\n\n\t// Use of jQuery.browser is frowned upon.\n\t// More details: http://docs.jquery.com/Utilities/jQuery.browser\n\tuaMatch: function( ua ) {\n\t\tua = ua.toLowerCase();\n\n\t\tvar match = /(webkit)[ \\/]([\\w.]+)/.exec( ua ) ||\n\t\t\t/(opera)(?:.*version)?[ \\/]([\\w.]+)/.exec( ua ) ||\n\t\t\t/(msie) ([\\w.]+)/.exec( ua ) ||\n\t\t\t!/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\\w.]+))?/.exec( ua ) ||\n\t\t  \t[];\n\n\t\treturn { browser: match[1] || \"\", version: match[2] || \"0\" };\n\t},\n\n\tbrowser: {}\n});\n\nbrowserMatch = jQuery.uaMatch( userAgent );\nif ( browserMatch.browser ) {\n\tjQuery.browser[ browserMatch.browser ] = true;\n\tjQuery.browser.version = browserMatch.version;\n}\n\n// Deprecated, use jQuery.browser.webkit instead\nif ( jQuery.browser.webkit ) {\n\tjQuery.browser.safari = true;\n}\n\nif ( indexOf ) {\n\tjQuery.inArray = function( elem, array ) {\n\t\treturn indexOf.call( array, elem );\n\t};\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n\n// Cleanup functions for the document ready method\nif ( document.addEventListener ) {\n\tDOMContentLoaded = function() {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\t\tjQuery.ready();\n\t};\n\n} else if ( document.attachEvent ) {\n\tDOMContentLoaded = function() {\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\tdocument.detachEvent( \"onreadystatechange\", DOMContentLoaded );\n\t\t\tjQuery.ready();\n\t\t}\n\t};\n}\n\n// The DOM ready check for Internet Explorer\nfunction doScrollCheck() {\n\tif ( jQuery.isReady ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\t// If IE is used, use the trick by Diego Perini\n\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\tdocument.documentElement.doScroll(\"left\");\n\t} catch( error ) {\n\t\tsetTimeout( doScrollCheck, 1 );\n\t\treturn;\n\t}\n\n\t// and execute any waiting functions\n\tjQuery.ready();\n}\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src ) {\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\t} else {\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\t}\n\n\tif ( elem.parentNode ) {\n\t\telem.parentNode.removeChild( elem );\n\t}\n}\n\n// Mutifunctional method to get and set values to a collection\n// The value/s can be optionally by executed if its a function\nfunction access( elems, key, value, exec, fn, pass ) {\n\tvar length = elems.length;\n\t\n\t// Setting many attributes\n\tif ( typeof key === \"object\" ) {\n\t\tfor ( var k in key ) {\n\t\t\taccess( elems, k, key[k], exec, fn, value );\n\t\t}\n\t\treturn elems;\n\t}\n\t\n\t// Setting one attribute\n\tif ( value !== undefined ) {\n\t\t// Optionally, function values get executed if exec is true\n\t\texec = !pass && exec && jQuery.isFunction(value);\n\t\t\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\tfn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );\n\t\t}\n\t\t\n\t\treturn elems;\n\t}\n\t\n\t// Getting an attribute\n\treturn length ? fn( elems[0], key ) : null;\n}\n\nfunction now() {\n\treturn (new Date).getTime();\n}\n(function() {\n\n\tjQuery.support = {};\n\n\tvar root = document.documentElement,\n\t\tscript = document.createElement(\"script\"),\n\t\tdiv = document.createElement(\"div\"),\n\t\tid = \"script\" + now();\n\n\tdiv.style.display = \"none\";\n\tdiv.innerHTML = \"   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>\";\n\n\tvar all = div.getElementsByTagName(\"*\"),\n\t\ta = div.getElementsByTagName(\"a\")[0];\n\n\t// Can't get basic test support\n\tif ( !all || !all.length || !a ) {\n\t\treturn;\n\t}\n\n\tjQuery.support = {\n\t\t// IE strips leading whitespace when .innerHTML is used\n\t\tleadingWhitespace: div.firstChild.nodeType === 3,\n\n\t\t// Make sure that tbody elements aren't automatically inserted\n\t\t// IE will insert them into empty tables\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\n\n\t\t// Make sure that link elements get serialized correctly by innerHTML\n\t\t// This requires a wrapper element in IE\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\n\n\t\t// Get the style information from getAttribute\n\t\t// (IE uses .cssText insted)\n\t\tstyle: /red/.test( a.getAttribute(\"style\") ),\n\n\t\t// Make sure that URLs aren't manipulated\n\t\t// (IE normalizes it by default)\n\t\threfNormalized: a.getAttribute(\"href\") === \"/a\",\n\n\t\t// Make sure that element opacity exists\n\t\t// (IE uses filter instead)\n\t\t// Use a regex to work around a WebKit issue. See #5145\n\t\topacity: /^0.55$/.test( a.style.opacity ),\n\n\t\t// Verify style float existence\n\t\t// (IE uses styleFloat instead of cssFloat)\n\t\tcssFloat: !!a.style.cssFloat,\n\n\t\t// Make sure that if no value is specified for a checkbox\n\t\t// that it defaults to \"on\".\n\t\t// (WebKit defaults to \"\" instead)\n\t\tcheckOn: div.getElementsByTagName(\"input\")[0].value === \"on\",\n\n\t\t// Make sure that a selected-by-default option has a working selected property.\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\t\toptSelected: document.createElement(\"select\").appendChild( document.createElement(\"option\") ).selected,\n\n\t\t// Will be defined later\n\t\tcheckClone: false,\n\t\tscriptEval: false,\n\t\tnoCloneEvent: true,\n\t\tboxModel: null\n\t};\n\n\tscript.type = \"text/javascript\";\n\ttry {\n\t\tscript.appendChild( document.createTextNode( \"window.\" + id + \"=1;\" ) );\n\t} catch(e) {}\n\n\troot.insertBefore( script, root.firstChild );\n\n\t// Make sure that the execution of code works by injecting a script\n\t// tag with appendChild/createTextNode\n\t// (IE doesn't support this, fails, and uses .text instead)\n\tif ( window[ id ] ) {\n\t\tjQuery.support.scriptEval = true;\n\t\tdelete window[ id ];\n\t}\n\n\troot.removeChild( script );\n\n\tif ( div.attachEvent && div.fireEvent ) {\n\t\tdiv.attachEvent(\"onclick\", function click() {\n\t\t\t// Cloning a node shouldn't copy over any\n\t\t\t// bound event handlers (IE does this)\n\t\t\tjQuery.support.noCloneEvent = false;\n\t\t\tdiv.detachEvent(\"onclick\", click);\n\t\t});\n\t\tdiv.cloneNode(true).fireEvent(\"onclick\");\n\t}\n\n\tdiv = document.createElement(\"div\");\n\tdiv.innerHTML = \"<input type='radio' name='radiotest' checked='checked'/>\";\n\n\tvar fragment = document.createDocumentFragment();\n\tfragment.appendChild( div.firstChild );\n\n\t// WebKit doesn't clone checked state correctly in fragments\n\tjQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;\n\n\t// Figure out if the W3C box model works as expected\n\t// document.body must exist before we can do this\n\tjQuery(function() {\n\t\tvar div = document.createElement(\"div\");\n\t\tdiv.style.width = div.style.paddingLeft = \"1px\";\n\n\t\tdocument.body.appendChild( div );\n\t\tjQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;\n\t\tdocument.body.removeChild( div ).style.display = 'none';\n\t\tdiv = null;\n\t});\n\n\t// Technique from Juriy Zaytsev\n\t// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/\n\tvar eventSupported = function( eventName ) { \n\t\tvar el = document.createElement(\"div\"); \n\t\teventName = \"on\" + eventName; \n\n\t\tvar isSupported = (eventName in el); \n\t\tif ( !isSupported ) { \n\t\t\tel.setAttribute(eventName, \"return;\"); \n\t\t\tisSupported = typeof el[eventName] === \"function\"; \n\t\t} \n\t\tel = null; \n\n\t\treturn isSupported; \n\t};\n\t\n\tjQuery.support.submitBubbles = eventSupported(\"submit\");\n\tjQuery.support.changeBubbles = eventSupported(\"change\");\n\n\t// release memory in IE\n\troot = script = div = all = a = null;\n})();\n\njQuery.props = {\n\t\"for\": \"htmlFor\",\n\t\"class\": \"className\",\n\treadonly: \"readOnly\",\n\tmaxlength: \"maxLength\",\n\tcellspacing: \"cellSpacing\",\n\trowspan: \"rowSpan\",\n\tcolspan: \"colSpan\",\n\ttabindex: \"tabIndex\",\n\tusemap: \"useMap\",\n\tframeborder: \"frameBorder\"\n};\nvar expando = \"jQuery\" + now(), uuid = 0, windowData = {};\nvar emptyObject = {};\n\njQuery.extend({\n\tcache: {},\n\t\n\texpando:expando,\n\n\t// The following elements throw uncatchable exceptions if you\n\t// attempt to add expando properties to them.\n\tnoData: {\n\t\t\"embed\": true,\n\t\t\"object\": true,\n\t\t\"applet\": true\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\tif ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {\n\t\t\treturn;\n\t\t}\n\n\t\telem = elem == window ?\n\t\t\twindowData :\n\t\t\telem;\n\n\t\tvar id = elem[ expando ], cache = jQuery.cache, thisCache;\n\n\t\t// Handle the case where there's no name immediately\n\t\tif ( !name && !id ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Compute a unique ID for the element\n\t\tif ( !id ) { \n\t\t\tid = ++uuid;\n\t\t}\n\n\t\t// Avoid generating a new cache unless none exists and we\n\t\t// want to manipulate it.\n\t\tif ( typeof name === \"object\" ) {\n\t\t\telem[ expando ] = id;\n\t\t\tthisCache = cache[ id ] = jQuery.extend(true, {}, name);\n\t\t} else if ( cache[ id ] ) {\n\t\t\tthisCache = cache[ id ];\n\t\t} else if ( typeof data === \"undefined\" ) {\n\t\t\tthisCache = emptyObject;\n\t\t} else {\n\t\t\tthisCache = cache[ id ] = {};\n\t\t}\n\n\t\t// Prevent overriding the named cache with undefined values\n\t\tif ( data !== undefined ) {\n\t\t\telem[ expando ] = id;\n\t\t\tthisCache[ name ] = data;\n\t\t}\n\n\t\treturn typeof name === \"string\" ? thisCache[ name ] : thisCache;\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tif ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {\n\t\t\treturn;\n\t\t}\n\n\t\telem = elem == window ?\n\t\t\twindowData :\n\t\t\telem;\n\n\t\tvar id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];\n\n\t\t// If we want to remove a specific section of the element's data\n\t\tif ( name ) {\n\t\t\tif ( thisCache ) {\n\t\t\t\t// Remove the section of cache data\n\t\t\t\tdelete thisCache[ name ];\n\n\t\t\t\t// If we've removed all the data, remove the element's cache\n\t\t\t\tif ( jQuery.isEmptyObject(thisCache) ) {\n\t\t\t\t\tjQuery.removeData( elem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Otherwise, we want to remove all of the element's data\n\t\t} else {\n\t\t\t// Clean up the element expando\n\t\t\ttry {\n\t\t\t\tdelete elem[ expando ];\n\t\t\t} catch( e ) {\n\t\t\t\t// IE has trouble directly removing the expando\n\t\t\t\t// but it's ok with using removeAttribute\n\t\t\t\tif ( elem.removeAttribute ) {\n\t\t\t\t\telem.removeAttribute( expando );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Completely remove the data cache\n\t\t\tdelete cache[ id ];\n\t\t}\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tif ( typeof key === \"undefined\" && this.length ) {\n\t\t\treturn jQuery.data( this[0] );\n\n\t\t} else if ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t});\n\t\t}\n\n\t\tvar parts = key.split(\".\");\n\t\tparts[1] = parts[1] ? \".\" + parts[1] : \"\";\n\n\t\tif ( value === undefined ) {\n\t\t\tvar data = this.triggerHandler(\"getData\" + parts[1] + \"!\", [parts[0]]);\n\n\t\t\tif ( data === undefined && this.length ) {\n\t\t\t\tdata = jQuery.data( this[0], key );\n\t\t\t}\n\t\t\treturn data === undefined && parts[1] ?\n\t\t\t\tthis.data( parts[0] ) :\n\t\t\t\tdata;\n\t\t} else {\n\t\t\treturn this.trigger(\"setData\" + parts[1] + \"!\", [parts[0], value]).each(function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t});\n\t\t}\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t}\n});\njQuery.extend({\n\tqueue: function( elem, type, data ) {\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttype = (type || \"fx\") + \"queue\";\n\t\tvar q = jQuery.data( elem, type );\n\n\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\tif ( !data ) {\n\t\t\treturn q || [];\n\t\t}\n\n\t\tif ( !q || jQuery.isArray(data) ) {\n\t\t\tq = jQuery.data( elem, type, jQuery.makeArray(data) );\n\n\t\t} else {\n\t\t\tq.push( data );\n\t\t}\n\n\t\treturn q;\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ), fn = queue.shift();\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift(\"inprogress\");\n\t\t\t}\n\n\t\t\tfn.call(elem, function() {\n\t\t\t\tjQuery.dequeue(elem, type);\n\t\t\t});\n\t\t}\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t}\n\n\t\tif ( data === undefined ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\t\treturn this.each(function( i, elem ) {\n\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\n\t// Based off of the plugin by Clint Helfers, with permission.\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\n\tdelay: function( time, type ) {\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[time] || time : time;\n\t\ttype = type || \"fx\";\n\n\t\treturn this.queue( type, function() {\n\t\t\tvar elem = this;\n\t\t\tsetTimeout(function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t}, time );\n\t\t});\n\t},\n\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t}\n});\nvar rclass = /[\\n\\t]/g,\n\trspace = /\\s+/,\n\trreturn = /\\r/g,\n\trspecialurl = /href|src|style/,\n\trtype = /(button|input)/i,\n\trfocusable = /(button|input|object|select|textarea)/i,\n\trclickable = /^(a|area)$/i,\n\trradiocheck = /radio|checkbox/;\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn access( this, name, value, true, jQuery.attr );\n\t},\n\n\tremoveAttr: function( name, fn ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery.attr( this, name, \"\" );\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.removeAttribute( name );\n\t\t\t}\n\t\t});\n\t},\n\n\taddClass: function( value ) {\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.addClass( value.call(this, i, self.attr(\"class\")) );\n\t\t\t});\n\t\t}\n\n\t\tif ( value && typeof value === \"string\" ) {\n\t\t\tvar classNames = (value || \"\").split( rspace );\n\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar elem = this[i];\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !elem.className ) {\n\t\t\t\t\t\telem.className = value;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar className = \" \" + elem.className + \" \";\n\t\t\t\t\t\tfor ( var c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tif ( className.indexOf( \" \" + classNames[c] + \" \" ) < 0 ) {\n\t\t\t\t\t\t\t\telem.className += \" \" + classNames[c];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.removeClass( value.call(this, i, self.attr(\"class\")) );\n\t\t\t});\n\t\t}\n\n\t\tif ( (value && typeof value === \"string\") || value === undefined ) {\n\t\t\tvar classNames = (value || \"\").split(rspace);\n\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar elem = this[i];\n\n\t\t\t\tif ( elem.nodeType === 1 && elem.className ) {\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\tvar className = (\" \" + elem.className + \" \").replace(rclass, \" \");\n\t\t\t\t\t\tfor ( var c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tclassName = className.replace(\" \" + classNames[c] + \" \", \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telem.className = className.substring(1, className.length - 1);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.className = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value, isBool = typeof stateVal === \"boolean\";\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.toggleClass( value.call(this, i, self.attr(\"class\"), stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// toggle individual class names\n\t\t\t\tvar className, i = 0, self = jQuery(this),\n\t\t\t\t\tstate = stateVal,\n\t\t\t\t\tclassNames = value.split( rspace );\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// check each className given, space seperated list\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\n\t\t\t\t}\n\n\t\t\t} else if ( type === \"undefined\" || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery.data( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// toggle whole className\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery.data( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \";\n\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\tif ( (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tval: function( value ) {\n\t\tif ( value === undefined ) {\n\t\t\tvar elem = this[0];\n\n\t\t\tif ( elem ) {\n\t\t\t\tif ( jQuery.nodeName( elem, \"option\" ) ) {\n\t\t\t\t\treturn (elem.attributes.value || {}).specified ? elem.value : elem.text;\n\t\t\t\t}\n\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type === \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\tif ( option.selected ) {\n\t\t\t\t\t\t\t// Get the specifc value for the option\n\t\t\t\t\t\t\tvalue = jQuery(option).val();\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\n\t\t\t\t}\n\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\n\t\t\t\tif ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {\n\t\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\treturn (elem.value || \"\").replace(rreturn, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tvar isFunction = jQuery.isFunction(value);\n\n\t\treturn this.each(function(i) {\n\t\t\tvar self = jQuery(this), val = value;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call(this, i, self.val());\n\t\t\t}\n\n\t\t\t// Typecast each time if the value is a Function and the appended\n\t\t\t// value is therefore different each time.\n\t\t\tif ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t}\n\n\t\t\tif ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {\n\t\t\t\tthis.checked = jQuery.inArray( self.val(), val ) >= 0;\n\n\t\t\t} else if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(val);\n\n\t\t\t\tjQuery( \"option\", this ).each(function() {\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length ) {\n\t\t\t\t\tthis.selectedIndex = -1;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tattrFn: {\n\t\tval: true,\n\t\tcss: true,\n\t\thtml: true,\n\t\ttext: true,\n\t\tdata: true,\n\t\twidth: true,\n\t\theight: true,\n\t\toffset: true\n\t},\n\t\t\n\tattr: function( elem, name, value, pass ) {\n\t\t// don't set attributes on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( pass && name in jQuery.attrFn ) {\n\t\t\treturn jQuery(elem)[name](value);\n\t\t}\n\n\t\tvar notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),\n\t\t\t// Whether we are setting (or getting)\n\t\t\tset = value !== undefined;\n\n\t\t// Try to normalize/fix the name\n\t\tname = notxml && jQuery.props[ name ] || name;\n\n\t\t// Only do all the following if this is a node (faster for style)\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\t// These attributes require special treatment\n\t\t\tvar special = rspecialurl.test( name );\n\n\t\t\t// Safari mis-reports the default selected property of an option\n\t\t\t// Accessing the parent's selectedIndex property fixes it\n\t\t\tif ( name === \"selected\" && !jQuery.support.optSelected ) {\n\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.selectedIndex;\n\t\n\t\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If applicable, access the attribute via the DOM 0 way\n\t\t\tif ( name in elem && notxml && !special ) {\n\t\t\t\tif ( set ) {\n\t\t\t\t\t// We can't allow the type property to be changed (since it causes problems in IE)\n\t\t\t\t\tif ( name === \"type\" && rtype.test( elem.nodeName ) && elem.parentNode ) {\n\t\t\t\t\t\tjQuery.error( \"type property can't be changed\" );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ name ] = value;\n\t\t\t\t}\n\n\t\t\t\t// browsers index elements by id/name on forms, give priority to attributes.\n\t\t\t\tif ( jQuery.nodeName( elem, \"form\" ) && elem.getAttributeNode(name) ) {\n\t\t\t\t\treturn elem.getAttributeNode( name ).nodeValue;\n\t\t\t\t}\n\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\tif ( name === \"tabIndex\" ) {\n\t\t\t\t\tvar attributeNode = elem.getAttributeNode( \"tabIndex\" );\n\n\t\t\t\t\treturn attributeNode && attributeNode.specified ?\n\t\t\t\t\t\tattributeNode.value :\n\t\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\tundefined;\n\t\t\t\t}\n\n\t\t\t\treturn elem[ name ];\n\t\t\t}\n\n\t\t\tif ( !jQuery.support.style && notxml && name === \"style\" ) {\n\t\t\t\tif ( set ) {\n\t\t\t\t\telem.style.cssText = \"\" + value;\n\t\t\t\t}\n\n\t\t\t\treturn elem.style.cssText;\n\t\t\t}\n\n\t\t\tif ( set ) {\n\t\t\t\t// convert the value to a string (all browsers do this but IE) see #1070\n\t\t\t\telem.setAttribute( name, \"\" + value );\n\t\t\t}\n\n\t\t\tvar attr = !jQuery.support.hrefNormalized && notxml && special ?\n\t\t\t\t\t// Some attributes require a special call on IE\n\t\t\t\t\telem.getAttribute( name, 2 ) :\n\t\t\t\t\telem.getAttribute( name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn attr === null ? undefined : attr;\n\t\t}\n\n\t\t// elem is actually elem.style ... set the style\n\t\t// Using attr for specific style information is now deprecated. Use style insead.\n\t\treturn jQuery.style( elem, name, value );\n\t}\n});\nvar fcleanup = function( nm ) {\n\treturn nm.replace(/[^\\w\\s\\.\\|`]/g, function( ch ) {\n\t\treturn \"\\\\\" + ch;\n\t});\n};\n\n/*\n * A number of helper functions used for managing events.\n * Many of the ideas behind this code originated from\n * Dean Edwards' addEvent library.\n */\njQuery.event = {\n\n\t// Bind an event to an element\n\t// Original by Dean Edwards\n\tadd: function( elem, types, handler, data ) {\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For whatever reason, IE has trouble passing the window object\n\t\t// around, causing it to be cloned in the process\n\t\tif ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {\n\t\t\telem = window;\n\t\t}\n\n\t\t// Make sure that the function being executed has a unique ID\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// if data is passed, bind to handler\n\t\tif ( data !== undefined ) {\n\t\t\t// Create temporary function pointer to original handler\n\t\t\tvar fn = handler;\n\n\t\t\t// Create unique handler function, wrapped around original handler\n\t\t\thandler = jQuery.proxy( fn );\n\n\t\t\t// Store data in unique handler\n\t\t\thandler.data = data;\n\t\t}\n\n\t\t// Init the element's event structure\n\t\tvar events = jQuery.data( elem, \"events\" ) || jQuery.data( elem, \"events\", {} ),\n\t\t\thandle = jQuery.data( elem, \"handle\" ), eventHandle;\n\n\t\tif ( !handle ) {\n\t\t\teventHandle = function() {\n\t\t\t\t// Handle the second event of a trigger and when\n\t\t\t\t// an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && !jQuery.event.triggered ?\n\t\t\t\t\tjQuery.event.handle.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\thandle = jQuery.data( elem, \"handle\", eventHandle );\n\t\t}\n\n\t\t// If no handle is found then we must be trying to bind to one of the\n\t\t// banned noData elements\n\t\tif ( !handle ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add elem as a property of the handle function\n\t\t// This is to prevent a memory leak with non-native\n\t\t// event in IE.\n\t\thandle.elem = elem;\n\n\t\t// Handle multiple events separated by a space\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\n\t\ttypes = types.split( /\\s+/ );\n\n\t\tvar type, i = 0;\n\n\t\twhile ( (type = types[ i++ ]) ) {\n\t\t\t// Namespaced event handlers\n\t\t\tvar namespaces = type.split(\".\");\n\t\t\ttype = namespaces.shift();\n\n\t\t\tif ( i > 1 ) {\n\t\t\t\thandler = jQuery.proxy( handler );\n\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\thandler.data = data;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thandler.type = namespaces.slice(0).sort().join(\".\");\n\n\t\t\t// Get the current list of functions bound to this event\n\t\t\tvar handlers = events[ type ],\n\t\t\t\tspecial = this.special[ type ] || {};\n\n\t\t\t// Init the event handler queue\n\t\t\tif ( !handlers ) {\n\t\t\t\thandlers = events[ type ] = {};\n\n\t\t\t\t// Check for a special event handler\n\t\t\t\t// Only use addEventListener/attachEvent if the special\n\t\t\t\t// events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, handler) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, handle, false );\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, handle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( special.add ) { \n\t\t\t\tvar modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers ); \n\t\t\t\tif ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) { \n\t\t\t\t\tmodifiedHandler.guid = modifiedHandler.guid || handler.guid; \n\t\t\t\t\tmodifiedHandler.data = modifiedHandler.data || handler.data; \n\t\t\t\t\tmodifiedHandler.type = modifiedHandler.type || handler.type; \n\t\t\t\t\thandler = modifiedHandler; \n\t\t\t\t} \n\t\t\t} \n\t\t\t\n\t\t\t// Add the function to the element's handler list\n\t\t\thandlers[ handler.guid ] = handler;\n\n\t\t\t// Keep track of which events have been used, for global triggering\n\t\t\tthis.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\tglobal: {},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler ) {\n\t\t// don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar events = jQuery.data( elem, \"events\" ), ret, type, fn;\n\n\t\tif ( events ) {\n\t\t\t// Unbind all events for the element\n\t\t\tif ( types === undefined || (typeof types === \"string\" && types.charAt(0) === \".\") ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tthis.remove( elem, type + (types || \"\") );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// types is actually an event object here\n\t\t\t\tif ( types.type ) {\n\t\t\t\t\thandler = types.handler;\n\t\t\t\t\ttypes = types.type;\n\t\t\t\t}\n\n\t\t\t\t// Handle multiple events separated by a space\n\t\t\t\t// jQuery(...).unbind(\"mouseover mouseout\", fn);\n\t\t\t\ttypes = types.split(/\\s+/);\n\t\t\t\tvar i = 0;\n\t\t\t\twhile ( (type = types[ i++ ]) ) {\n\t\t\t\t\t// Namespaced event handlers\n\t\t\t\t\tvar namespaces = type.split(\".\");\n\t\t\t\t\ttype = namespaces.shift();\n\t\t\t\t\tvar all = !namespaces.length,\n\t\t\t\t\t\tcleaned = jQuery.map( namespaces.slice(0).sort(), fcleanup ),\n\t\t\t\t\t\tnamespace = new RegExp(\"(^|\\\\.)\" + cleaned.join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\"),\n\t\t\t\t\t\tspecial = this.special[ type ] || {};\n\n\t\t\t\t\tif ( events[ type ] ) {\n\t\t\t\t\t\t// remove the given handler for the given type\n\t\t\t\t\t\tif ( handler ) {\n\t\t\t\t\t\t\tfn = events[ type ][ handler.guid ];\n\t\t\t\t\t\t\tdelete events[ type ][ handler.guid ];\n\n\t\t\t\t\t\t// remove all handlers for the given type\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor ( var handle in events[ type ] ) {\n\t\t\t\t\t\t\t\t// Handle the removal of namespaced events\n\t\t\t\t\t\t\t\tif ( all || namespace.test( events[ type ][ handle ].type ) ) {\n\t\t\t\t\t\t\t\t\tdelete events[ type ][ handle ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\t\tspecial.remove.call( elem, namespaces, fn);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// remove generic event handler if no more handlers exist\n\t\t\t\t\t\tfor ( ret in events[ type ] ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( !ret ) {\n\t\t\t\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {\n\t\t\t\t\t\t\t\tif ( elem.removeEventListener ) {\n\t\t\t\t\t\t\t\t\telem.removeEventListener( type, jQuery.data( elem, \"handle\" ), false );\n\t\t\t\t\t\t\t\t} else if ( elem.detachEvent ) {\n\t\t\t\t\t\t\t\t\telem.detachEvent( \"on\" + type, jQuery.data( elem, \"handle\" ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tret = null;\n\t\t\t\t\t\t\tdelete events[ type ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the expando if it's no longer used\n\t\t\tfor ( ret in events ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !ret ) {\n\t\t\t\tvar handle = jQuery.data( elem, \"handle\" );\n\t\t\t\tif ( handle ) {\n\t\t\t\t\thandle.elem = null;\n\t\t\t\t}\n\t\t\t\tjQuery.removeData( elem, \"events\" );\n\t\t\t\tjQuery.removeData( elem, \"handle\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t// bubbling is internal\n\ttrigger: function( event, data, elem /*, bubbling */ ) {\n\t\t// Event object or event type\n\t\tvar type = event.type || event,\n\t\t\tbubbling = arguments[3];\n\n\t\tif ( !bubbling ) {\n\t\t\tevent = typeof event === \"object\" ?\n\t\t\t\t// jQuery.Event object\n\t\t\t\tevent[expando] ? event :\n\t\t\t\t// Object literal\n\t\t\t\tjQuery.extend( jQuery.Event(type), event ) :\n\t\t\t\t// Just the event type (string)\n\t\t\t\tjQuery.Event(type);\n\n\t\t\tif ( type.indexOf(\"!\") >= 0 ) {\n\t\t\t\tevent.type = type = type.slice(0, -1);\n\t\t\t\tevent.exclusive = true;\n\t\t\t}\n\n\t\t\t// Handle a global trigger\n\t\t\tif ( !elem ) {\n\t\t\t\t// Don't bubble custom events when global (to avoid too much overhead)\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t// Only trigger if we've ever bound an event for it\n\t\t\t\tif ( this.global[ type ] ) {\n\t\t\t\t\tjQuery.each( jQuery.cache, function() {\n\t\t\t\t\t\tif ( this.events && this.events[type] ) {\n\t\t\t\t\t\t\tjQuery.event.trigger( event, data, this.handle.elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle triggering a single element\n\n\t\t\t// don't do events on text and comment nodes\n\t\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Clean up in case it is reused\n\t\t\tevent.result = undefined;\n\t\t\tevent.target = elem;\n\n\t\t\t// Clone the incoming data, if any\n\t\t\tdata = jQuery.makeArray( data );\n\t\t\tdata.unshift( event );\n\t\t}\n\n\t\tevent.currentTarget = elem;\n\n\t\t// Trigger the event, it is assumed that \"handle\" is a function\n\t\tvar handle = jQuery.data( elem, \"handle\" );\n\t\tif ( handle ) {\n\t\t\thandle.apply( elem, data );\n\t\t}\n\n\t\tvar parent = elem.parentNode || elem.ownerDocument;\n\n\t\t// Trigger an inline bound script\n\t\ttry {\n\t\t\tif ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {\n\t\t\t\tif ( elem[ \"on\" + type ] && elem[ \"on\" + type ].apply( elem, data ) === false ) {\n\t\t\t\t\tevent.result = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// prevent IE from throwing an error for some elements with some event types, see #3533\n\t\t} catch (e) {}\n\n\t\tif ( !event.isPropagationStopped() && parent ) {\n\t\t\tjQuery.event.trigger( event, data, parent, true );\n\n\t\t} else if ( !event.isDefaultPrevented() ) {\n\t\t\tvar target = event.target, old,\n\t\t\t\tisClick = jQuery.nodeName(target, \"a\") && type === \"click\";\n\n\t\t\tif ( !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {\n\t\t\t\ttry {\n\t\t\t\t\tif ( target[ type ] ) {\n\t\t\t\t\t\t// Make sure that we don't accidentally re-trigger the onFOO events\n\t\t\t\t\t\told = target[ \"on\" + type ];\n\n\t\t\t\t\t\tif ( old ) {\n\t\t\t\t\t\t\ttarget[ \"on\" + type ] = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.triggered = true;\n\t\t\t\t\t\ttarget[ type ]();\n\t\t\t\t\t}\n\n\t\t\t\t// prevent IE from throwing an error for some elements with some event types, see #3533\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif ( old ) {\n\t\t\t\t\ttarget[ \"on\" + type ] = old;\n\t\t\t\t}\n\n\t\t\t\tthis.triggered = false;\n\t\t\t}\n\t\t}\n\t},\n\n\thandle: function( event ) {\n\t\t// returned undefined or false\n\t\tvar all, handlers;\n\n\t\tevent = arguments[0] = jQuery.event.fix( event || window.event );\n\t\tevent.currentTarget = this;\n\n\t\t// Namespaced event handlers\n\t\tvar namespaces = event.type.split(\".\");\n\t\tevent.type = namespaces.shift();\n\n\t\t// Cache this now, all = true means, any handler\n\t\tall = !namespaces.length && !event.exclusive;\n\n\t\tvar namespace = new RegExp(\"(^|\\\\.)\" + namespaces.slice(0).sort().join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\");\n\n\t\thandlers = ( jQuery.data(this, \"events\") || {} )[ event.type ];\n\n\t\tfor ( var j in handlers ) {\n\t\t\tvar handler = handlers[ j ];\n\n\t\t\t// Filter the functions by class\n\t\t\tif ( all || namespace.test(handler.type) ) {\n\t\t\t\t// Pass in a reference to the handler function itself\n\t\t\t\t// So that we can later remove it\n\t\t\t\tevent.handler = handler;\n\t\t\t\tevent.data = handler.data;\n\n\t\t\t\tvar ret = handler.apply( this, arguments );\n\n\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\tevent.result = ret;\n\t\t\t\t\tif ( ret === false ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( event.isImmediatePropagationStopped() ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tprops: \"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which\".split(\" \"),\n\n\tfix: function( event ) {\n\t\tif ( event[ expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// store a copy of the original event object\n\t\t// and \"clone\" to set read-only properties\n\t\tvar originalEvent = event;\n\t\tevent = jQuery.Event( originalEvent );\n\n\t\tfor ( var i = this.props.length, prop; i; ) {\n\t\t\tprop = this.props[ --i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Fix target property, if necessary\n\t\tif ( !event.target ) {\n\t\t\tevent.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either\n\t\t}\n\n\t\t// check if target is a textnode (safari)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Add relatedTarget, if necessary\n\t\tif ( !event.relatedTarget && event.fromElement ) {\n\t\t\tevent.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n\t\t}\n\n\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\tif ( event.pageX == null && event.clientX != null ) {\n\t\t\tvar doc = document.documentElement, body = document.body;\n\t\t\tevent.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n\t\t\tevent.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);\n\t\t}\n\n\t\t// Add which for key events\n\t\tif ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {\n\t\t\tevent.which = event.charCode || event.keyCode;\n\t\t}\n\n\t\t// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)\n\t\tif ( !event.metaKey && event.ctrlKey ) {\n\t\t\tevent.metaKey = event.ctrlKey;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t// Note: button is not normalized, so don't use it\n\t\tif ( !event.which && event.button !== undefined ) {\n\t\t\tevent.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));\n\t\t}\n\n\t\treturn event;\n\t},\n\n\t// Deprecated, use jQuery.guid instead\n\tguid: 1E8,\n\n\t// Deprecated, use jQuery.proxy instead\n\tproxy: jQuery.proxy,\n\n\tspecial: {\n\t\tready: {\n\t\t\t// Make sure the ready event is setup\n\t\t\tsetup: jQuery.bindReady,\n\t\t\tteardown: jQuery.noop\n\t\t},\n\n\t\tlive: {\n\t\t\tadd: function( proxy, data, namespaces, live ) {\n\t\t\t\tjQuery.extend( proxy, data || {} );\n\n\t\t\t\tproxy.guid += data.selector + data.live; \n\t\t\t\tdata.liveProxy = proxy;\n\n\t\t\t\tjQuery.event.add( this, data.live, liveHandler, data ); \n\t\t\t\t\n\t\t\t},\n\n\t\t\tremove: function( namespaces ) {\n\t\t\t\tif ( namespaces.length ) {\n\t\t\t\t\tvar remove = 0, name = new RegExp(\"(^|\\\\.)\" + namespaces[0] + \"(\\\\.|$)\");\n\n\t\t\t\t\tjQuery.each( (jQuery.data(this, \"events\").live || {}), function() {\n\t\t\t\t\t\tif ( name.test(this.type) ) {\n\t\t\t\t\t\t\tremove++;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif ( remove < 1 ) {\n\t\t\t\t\t\tjQuery.event.remove( this, namespaces[0], liveHandler );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tspecial: {}\n\t\t},\n\t\tbeforeunload: {\n\t\t\tsetup: function( data, namespaces, fn ) {\n\t\t\t\t// We only want to do this special case on windows\n\t\t\t\tif ( this.setInterval ) {\n\t\t\t\t\tthis.onbeforeunload = fn;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tteardown: function( namespaces, fn ) {\n\t\t\t\tif ( this.onbeforeunload === fn ) {\n\t\t\t\t\tthis.onbeforeunload = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.Event = function( src ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !this.preventDefault ) {\n\t\treturn new jQuery.Event( src );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// timeStamp is buggy for some events on Firefox(#3843)\n\t// So we won't rely on the native value\n\tthis.timeStamp = now();\n\n\t// Mark it as fixed\n\tthis[ expando ] = true;\n};\n\nfunction returnFalse() {\n\treturn false;\n}\nfunction returnTrue() {\n\treturn true;\n}\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tpreventDefault: function() {\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// if preventDefault exists run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\t\t}\n\t\t// otherwise set the returnValue property of the original event to false (IE)\n\t\te.returnValue = false;\n\t},\n\tstopPropagation: function() {\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t// if stopPropagation exists run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t\t// otherwise set the cancelBubble property of the original event to true (IE)\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\t\tthis.stopPropagation();\n\t},\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse\n};\n\n// Checks if an event happened on an element within another element\n// Used in jQuery.event.special.mouseenter and mouseleave handlers\nvar withinElement = function( event ) {\n\t// Check if mouse(over|out) are still within the same parent element\n\tvar parent = event.relatedTarget;\n\n\t// Traverse up the tree\n\twhile ( parent && parent !== this ) {\n\t\t// Firefox sometimes assigns relatedTarget a XUL element\n\t\t// which we cannot access the parentNode property of\n\t\ttry {\n\t\t\tparent = parent.parentNode;\n\n\t\t// assuming we've left the element since we most likely mousedover a xul element\n\t\t} catch(e) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( parent !== this ) {\n\t\t// set the correct event type\n\t\tevent.type = event.data;\n\n\t\t// handle event if we actually just moused on to a non sub-element\n\t\tjQuery.event.handle.apply( this, arguments );\n\t}\n\n},\n\n// In case of event delegation, we only need to rename the event.type,\n// liveHandler will take care of the rest.\ndelegate = function( event ) {\n\tevent.type = event.data;\n\tjQuery.event.handle.apply( this, arguments );\n};\n\n// Create mouseenter and mouseleave events\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tsetup: function( data ) {\n\t\t\tjQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );\n\t\t},\n\t\tteardown: function( data ) {\n\t\t\tjQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );\n\t\t}\n\t};\n});\n\n// submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\njQuery.event.special.submit = {\n\tsetup: function( data, namespaces, fn ) {\n\t\tif ( this.nodeName.toLowerCase() !== \"form\" ) {\n\t\t\tjQuery.event.add(this, \"click.specialSubmit.\" + fn.guid, function( e ) {\n\t\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\t\tif ( (type === \"submit\" || type === \"image\") && jQuery( elem ).closest(\"form\").length ) {\n\t\t\t\t\treturn trigger( \"submit\", this, arguments );\n\t\t\t\t}\n\t\t\t});\n\t \n\t\t\tjQuery.event.add(this, \"keypress.specialSubmit.\" + fn.guid, function( e ) {\n\t\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\t\tif ( (type === \"text\" || type === \"password\") && jQuery( elem ).closest(\"form\").length && e.keyCode === 13 ) {\n\t\t\t\t\treturn trigger( \"submit\", this, arguments );\n\t\t\t\t}\n\t\t\t});\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t},\n\n\tremove: function( namespaces, fn ) {\n\t\tjQuery.event.remove( this, \"click.specialSubmit\" + (fn ? \".\"+fn.guid : \"\") );\n\t\tjQuery.event.remove( this, \"keypress.specialSubmit\" + (fn ? \".\"+fn.guid : \"\") );\n\t}\n};\n\n}\n\n// change delegation, happens here so we have bind.\nif ( !jQuery.support.changeBubbles ) {\n\nvar formElems = /textarea|input|select/i;\n\nfunction getVal( elem ) {\n\tvar type = elem.type, val = elem.value;\n\n\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\tval = elem.checked;\n\n\t} else if ( type === \"select-multiple\" ) {\n\t\tval = elem.selectedIndex > -1 ?\n\t\t\tjQuery.map( elem.options, function( elem ) {\n\t\t\t\treturn elem.selected;\n\t\t\t}).join(\"-\") :\n\t\t\t\"\";\n\n\t} else if ( elem.nodeName.toLowerCase() === \"select\" ) {\n\t\tval = elem.selectedIndex;\n\t}\n\n\treturn val;\n}\n\nfunction testChange( e ) {\n\t\tvar elem = e.target, data, val;\n\n\t\tif ( !formElems.test( elem.nodeName ) || elem.readOnly ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata = jQuery.data( elem, \"_change_data\" );\n\t\tval = getVal(elem);\n\n\t\t// the current data will be also retrieved by beforeactivate\n\t\tif ( e.type !== \"focusout\" || elem.type !== \"radio\" ) {\n\t\t\tjQuery.data( elem, \"_change_data\", val );\n\t\t}\n\t\t\n\t\tif ( data === undefined || val === data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( data != null || val ) {\n\t\t\te.type = \"change\";\n\t\t\treturn jQuery.event.trigger( e, arguments[1], elem );\n\t\t}\n}\n\njQuery.event.special.change = {\n\tfilters: {\n\t\tfocusout: testChange, \n\n\t\tclick: function( e ) {\n\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" || elem.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\treturn testChange.call( this, e );\n\t\t\t}\n\t\t},\n\n\t\t// Change has to be called before submit\n\t\t// Keydown will be called before keypress, which is used in submit-event delegation\n\t\tkeydown: function( e ) {\n\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\tif ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== \"textarea\") ||\n\t\t\t\t(e.keyCode === 32 && (type === \"checkbox\" || type === \"radio\")) ||\n\t\t\t\ttype === \"select-multiple\" ) {\n\t\t\t\treturn testChange.call( this, e );\n\t\t\t}\n\t\t},\n\n\t\t// Beforeactivate happens also before the previous element is blurred\n\t\t// with this event you can't trigger a change event, but you can store\n\t\t// information/focus[in] is not needed anymore\n\t\tbeforeactivate: function( e ) {\n\t\t\tvar elem = e.target;\n\n\t\t\tif ( elem.nodeName.toLowerCase() === \"input\" && elem.type === \"radio\" ) {\n\t\t\t\tjQuery.data( elem, \"_change_data\", getVal(elem) );\n\t\t\t}\n\t\t}\n\t},\n\tsetup: function( data, namespaces, fn ) {\n\t\tfor ( var type in changeFilters ) {\n\t\t\tjQuery.event.add( this, type + \".specialChange.\" + fn.guid, changeFilters[type] );\n\t\t}\n\n\t\treturn formElems.test( this.nodeName );\n\t},\n\tremove: function( namespaces, fn ) {\n\t\tfor ( var type in changeFilters ) {\n\t\t\tjQuery.event.remove( this, type + \".specialChange\" + (fn ? \".\"+fn.guid : \"\"), changeFilters[type] );\n\t\t}\n\n\t\treturn formElems.test( this.nodeName );\n\t}\n};\n\nvar changeFilters = jQuery.event.special.change.filters;\n\n}\n\nfunction trigger( type, elem, args ) {\n\targs[0].type = type;\n\treturn jQuery.event.handle.apply( elem, args );\n}\n\n// Create \"bubbling\" focus and blur events\nif ( document.addEventListener ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tthis.addEventListener( orig, handler, true );\n\t\t\t}, \n\t\t\tteardown: function() { \n\t\t\t\tthis.removeEventListener( orig, handler, true );\n\t\t\t}\n\t\t};\n\n\t\tfunction handler( e ) { \n\t\t\te = jQuery.event.fix( e );\n\t\t\te.type = fix;\n\t\t\treturn jQuery.event.handle.call( this, e );\n\t\t}\n\t});\n}\n\njQuery.each([\"bind\", \"one\"], function( i, name ) {\n\tjQuery.fn[ name ] = function( type, data, fn ) {\n\t\t// Handle object literals\n\t\tif ( typeof type === \"object\" ) {\n\t\t\tfor ( var key in type ) {\n\t\t\t\tthis[ name ](key, data, type[key], fn);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\tvar handler = name === \"one\" ? jQuery.proxy( fn, function( event ) {\n\t\t\tjQuery( this ).unbind( event, handler );\n\t\t\treturn fn.apply( this, arguments );\n\t\t}) : fn;\n\n\t\treturn type === \"unload\" && name !== \"one\" ?\n\t\t\tthis.one( type, data, fn ) :\n\t\t\tthis.each(function() {\n\t\t\t\tjQuery.event.add( this, type, handler, data );\n\t\t\t});\n\t};\n});\n\njQuery.fn.extend({\n\tunbind: function( type, fn ) {\n\t\t// Handle object literals\n\t\tif ( typeof type === \"object\" && !type.preventDefault ) {\n\t\t\tfor ( var key in type ) {\n\t\t\t\tthis.unbind(key, type[key]);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.remove( this, type, fn );\n\t\t});\n\t},\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\n\ttriggerHandler: function( type, data ) {\n\t\tif ( this[0] ) {\n\t\t\tvar event = jQuery.Event( type );\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tjQuery.event.trigger( event, data, this[0] );\n\t\t\treturn event.result;\n\t\t}\n\t},\n\n\ttoggle: function( fn ) {\n\t\t// Save reference to arguments for access in closure\n\t\tvar args = arguments, i = 1;\n\n\t\t// link all the functions, so any of them can unbind this click handler\n\t\twhile ( i < args.length ) {\n\t\t\tjQuery.proxy( fn, args[ i++ ] );\n\t\t}\n\n\t\treturn this.click( jQuery.proxy( fn, function( event ) {\n\t\t\t// Figure out which function to execute\n\t\t\tvar lastToggle = ( jQuery.data( this, \"lastToggle\" + fn.guid ) || 0 ) % i;\n\t\t\tjQuery.data( this, \"lastToggle\" + fn.guid, lastToggle + 1 );\n\n\t\t\t// Make sure that clicks stop\n\t\t\tevent.preventDefault();\n\n\t\t\t// and execute the function\n\t\t\treturn args[ lastToggle ].apply( this, arguments ) || false;\n\t\t}));\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n});\n\njQuery.each([\"live\", \"die\"], function( i, name ) {\n\tjQuery.fn[ name ] = function( types, data, fn ) {\n\t\tvar type, i = 0;\n\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\ttypes = (types || \"\").split( /\\s+/ );\n\n\t\twhile ( (type = types[ i++ ]) != null ) {\n\t\t\ttype = type === \"focus\" ? \"focusin\" : // focus --> focusin\n\t\t\t\t\ttype === \"blur\" ? \"focusout\" : // blur --> focusout\n\t\t\t\t\ttype === \"hover\" ? types.push(\"mouseleave\") && \"mouseenter\" : // hover support\n\t\t\t\t\ttype;\n\t\t\t\n\t\t\tif ( name === \"live\" ) {\n\t\t\t\t// bind live handler\n\t\t\t\tjQuery( this.context ).bind( liveConvert( type, this.selector ), {\n\t\t\t\t\tdata: data, selector: this.selector, live: type\n\t\t\t\t}, fn );\n\n\t\t\t} else {\n\t\t\t\t// unbind live handler\n\t\t\t\tjQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this;\n\t}\n});\n\nfunction liveHandler( event ) {\n\tvar stop, elems = [], selectors = [], args = arguments,\n\t\trelated, match, fn, elem, j, i, l, data,\n\t\tlive = jQuery.extend({}, jQuery.data( this, \"events\" ).live);\n\n\t// Make sure we avoid non-left-click bubbling in Firefox (#3861)\n\tif ( event.button && event.type === \"click\" ) {\n\t\treturn;\n\t}\n\n\tfor ( j in live ) {\n\t\tfn = live[j];\n\t\tif ( fn.live === event.type ||\n\t\t\t\tfn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {\n\n\t\t\tdata = fn.data;\n\t\t\tif ( !(data.beforeFilter && data.beforeFilter[event.type] && \n\t\t\t\t\t!data.beforeFilter[event.type](event)) ) {\n\t\t\t\tselectors.push( fn.selector );\n\t\t\t}\n\t\t} else {\n\t\t\tdelete live[j];\n\t\t}\n\t}\n\n\tmatch = jQuery( event.target ).closest( selectors, event.currentTarget );\n\n\tfor ( i = 0, l = match.length; i < l; i++ ) {\n\t\tfor ( j in live ) {\n\t\t\tfn = live[j];\n\t\t\telem = match[i].elem;\n\t\t\trelated = null;\n\n\t\t\tif ( match[i].selector === fn.selector ) {\n\t\t\t\t// Those two events require additional checking\n\t\t\t\tif ( fn.live === \"mouseenter\" || fn.live === \"mouseleave\" ) {\n\t\t\t\t\trelated = jQuery( event.relatedTarget ).closest( fn.selector )[0];\n\t\t\t\t}\n\n\t\t\t\tif ( !related || related !== elem ) {\n\t\t\t\t\telems.push({ elem: elem, fn: fn });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( i = 0, l = elems.length; i < l; i++ ) {\n\t\tmatch = elems[i];\n\t\tevent.currentTarget = match.elem;\n\t\tevent.data = match.fn.data;\n\t\tif ( match.fn.apply( match.elem, args ) === false ) {\n\t\t\tstop = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn stop;\n}\n\nfunction liveConvert( type, selector ) {\n\treturn \"live.\" + (type ? type + \".\" : \"\") + selector.replace(/\\./g, \"`\").replace(/ /g, \"&\");\n}\n\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( fn ) {\n\t\treturn fn ? this.bind( name, fn ) : this.trigger( name );\n\t};\n\n\tif ( jQuery.attrFn ) {\n\t\tjQuery.attrFn[ name ] = true;\n\t}\n});\n\n// Prevent memory leaks in IE\n// Window isn't included so as not to unbind existing unload events\n// More info:\n//  - http://isaacschlueter.com/2006/10/msie-memory-leaks/\nif ( window.attachEvent && !window.addEventListener ) {\n\twindow.attachEvent(\"onunload\", function() {\n\t\tfor ( var id in jQuery.cache ) {\n\t\t\tif ( jQuery.cache[ id ].handle ) {\n\t\t\t\t// Try/Catch is to handle iframes being unloaded, see #4280\n\t\t\t\ttry {\n\t\t\t\t\tjQuery.event.remove( jQuery.cache[ id ].handle.elem );\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\t\t}\n\t});\n}\n/*!\n * Sizzle CSS Selector Engine - v1.0\n *  Copyright 2009, The Dojo Foundation\n *  Released under the MIT, BSD, and GPL Licenses.\n *  More information: http://sizzlejs.com/\n */\n(function(){\n\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|['\"][^'\"]*['\"]|[^[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n\tdone = 0,\n\ttoString = Object.prototype.toString,\n\thasDuplicate = false,\n\tbaseHasDuplicate = true;\n\n// Here we check if the JavaScript engine is using some sort of\n// optimization where it does not always call our comparision\n// function. If that is the case, discard the hasDuplicate value.\n//   Thus far that includes Google Chrome.\n[0, 0].sort(function(){\n\tbaseHasDuplicate = false;\n\treturn 0;\n});\n\nvar Sizzle = function(selector, context, results, seed) {\n\tresults = results || [];\n\tvar origContext = context = context || document;\n\n\tif ( context.nodeType !== 1 && context.nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\t\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tvar parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),\n\t\tsoFar = selector;\n\t\n\t// Reset the position of the chunker regexp (start from head)\n\twhile ( (chunker.exec(\"\"), m = chunker.exec(soFar)) !== null ) {\n\t\tsoFar = m[3];\n\t\t\n\t\tparts.push( m[1] );\n\t\t\n\t\tif ( m[2] ) {\n\t\t\textra = m[3];\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( parts.length > 1 && origPOS.exec( selector ) ) {\n\t\tif ( parts.length === 2 && Expr.relative[ parts[0] ] ) {\n\t\t\tset = posProcess( parts[0] + parts[1], context );\n\t\t} else {\n\t\t\tset = Expr.relative[ parts[0] ] ?\n\t\t\t\t[ context ] :\n\t\t\t\tSizzle( parts.shift(), context );\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tselector = parts.shift();\n\n\t\t\t\tif ( Expr.relative[ selector ] ) {\n\t\t\t\t\tselector += parts.shift();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tset = posProcess( selector, set );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t// (but not if it'll be faster if the inner selector is an ID)\n\t\tif ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&\n\t\t\t\tExpr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {\n\t\t\tvar ret = Sizzle.find( parts.shift(), context, contextXML );\n\t\t\tcontext = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];\n\t\t}\n\n\t\tif ( context ) {\n\t\t\tvar ret = seed ?\n\t\t\t\t{ expr: parts.pop(), set: makeArray(seed) } :\n\t\t\t\tSizzle.find( parts.pop(), parts.length === 1 && (parts[0] === \"~\" || parts[0] === \"+\") && context.parentNode ? context.parentNode : context, contextXML );\n\t\t\tset = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;\n\n\t\t\tif ( parts.length > 0 ) {\n\t\t\t\tcheckSet = makeArray(set);\n\t\t\t} else {\n\t\t\t\tprune = false;\n\t\t\t}\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tvar cur = parts.pop(), pop = cur;\n\n\t\t\t\tif ( !Expr.relative[ cur ] ) {\n\t\t\t\t\tcur = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpop = parts.pop();\n\t\t\t\t}\n\n\t\t\t\tif ( pop == null ) {\n\t\t\t\t\tpop = context;\n\t\t\t\t}\n\n\t\t\t\tExpr.relative[ cur ]( checkSet, pop, contextXML );\n\t\t\t}\n\t\t} else {\n\t\t\tcheckSet = parts = [];\n\t\t}\n\t}\n\n\tif ( !checkSet ) {\n\t\tcheckSet = set;\n\t}\n\n\tif ( !checkSet ) {\n\t\tSizzle.error( cur || selector );\n\t}\n\n\tif ( toString.call(checkSet) === \"[object Array]\" ) {\n\t\tif ( !prune ) {\n\t\t\tresults.push.apply( results, checkSet );\n\t\t} else if ( context && context.nodeType === 1 ) {\n\t\t\tfor ( var i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( var i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && checkSet[i].nodeType === 1 ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tmakeArray( checkSet, results );\n\t}\n\n\tif ( extra ) {\n\t\tSizzle( extra, origContext, results, seed );\n\t\tSizzle.uniqueSort( results );\n\t}\n\n\treturn results;\n};\n\nSizzle.uniqueSort = function(results){\n\tif ( sortOrder ) {\n\t\thasDuplicate = baseHasDuplicate;\n\t\tresults.sort(sortOrder);\n\n\t\tif ( hasDuplicate ) {\n\t\t\tfor ( var i = 1; i < results.length; i++ ) {\n\t\t\t\tif ( results[i] === results[i-1] ) {\n\t\t\t\t\tresults.splice(i--, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn results;\n};\n\nSizzle.matches = function(expr, set){\n\treturn Sizzle(expr, null, null, set);\n};\n\nSizzle.find = function(expr, context, isXML){\n\tvar set, match;\n\n\tif ( !expr ) {\n\t\treturn [];\n\t}\n\n\tfor ( var i = 0, l = Expr.order.length; i < l; i++ ) {\n\t\tvar type = Expr.order[i], match;\n\t\t\n\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) ) {\n\t\t\tvar left = match[1];\n\t\t\tmatch.splice(1,1);\n\n\t\t\tif ( left.substr( left.length - 1 ) !== \"\\\\\" ) {\n\t\t\t\tmatch[1] = (match[1] || \"\").replace(/\\\\/g, \"\");\n\t\t\t\tset = Expr.find[ type ]( match, context, isXML );\n\t\t\t\tif ( set != null ) {\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !set ) {\n\t\tset = context.getElementsByTagName(\"*\");\n\t}\n\n\treturn {set: set, expr: expr};\n};\n\nSizzle.filter = function(expr, set, inplace, not){\n\tvar old = expr, result = [], curLoop = set, match, anyFound,\n\t\tisXMLFilter = set && set[0] && isXML(set[0]);\n\n\twhile ( expr && set.length ) {\n\t\tfor ( var type in Expr.filter ) {\n\t\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {\n\t\t\t\tvar filter = Expr.filter[ type ], found, item, left = match[1];\n\t\t\t\tanyFound = false;\n\n\t\t\t\tmatch.splice(1,1);\n\n\t\t\t\tif ( left.substr( left.length - 1 ) === \"\\\\\" ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( curLoop === result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\n\t\t\t\tif ( Expr.preFilter[ type ] ) {\n\t\t\t\t\tmatch = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );\n\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\tanyFound = found = true;\n\t\t\t\t\t} else if ( match === true ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tfor ( var i = 0; (item = curLoop[i]) != null; i++ ) {\n\t\t\t\t\t\tif ( item ) {\n\t\t\t\t\t\t\tfound = filter( item, match, i, curLoop );\n\t\t\t\t\t\t\tvar pass = not ^ !!found;\n\n\t\t\t\t\t\t\tif ( inplace && found != null ) {\n\t\t\t\t\t\t\t\tif ( pass ) {\n\t\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( pass ) {\n\t\t\t\t\t\t\t\tresult.push( item );\n\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( found !== undefined ) {\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tcurLoop = result;\n\t\t\t\t\t}\n\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\n\t\t\t\t\tif ( !anyFound ) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Improper expression\n\t\tif ( expr === old ) {\n\t\t\tif ( anyFound == null ) {\n\t\t\t\tSizzle.error( expr );\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\told = expr;\n\t}\n\n\treturn curLoop;\n};\n\nSizzle.error = function( msg ) {\n\tthrow \"Syntax error, unrecognized expression: \" + msg;\n};\n\nvar Expr = Sizzle.selectors = {\n\torder: [ \"ID\", \"NAME\", \"TAG\" ],\n\tmatch: {\n\t\tID: /#((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)/,\n\t\tCLASS: /\\.((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)/,\n\t\tNAME: /\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)['\"]*\\]/,\n\t\tATTR: /\\[\\s*((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(['\"]*)(.*?)\\3|)\\s*\\]/,\n\t\tTAG: /^((?:[\\w\\u00c0-\\uFFFF\\*-]|\\\\.)+)/,\n\t\tCHILD: /:(only|nth|last|first)-child(?:\\((even|odd|[\\dn+-]*)\\))?/,\n\t\tPOS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^-]|$)/,\n\t\tPSEUDO: /:((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/\n\t},\n\tleftMatch: {},\n\tattrMap: {\n\t\t\"class\": \"className\",\n\t\t\"for\": \"htmlFor\"\n\t},\n\tattrHandle: {\n\t\thref: function(elem){\n\t\t\treturn elem.getAttribute(\"href\");\n\t\t}\n\t},\n\trelative: {\n\t\t\"+\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\",\n\t\t\t\tisTag = isPartStr && !/\\W/.test(part),\n\t\t\t\tisPartStrNotTag = isPartStr && !isTag;\n\n\t\t\tif ( isTag ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t}\n\n\t\t\tfor ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {\n\t\t\t\tif ( (elem = checkSet[i]) ) {\n\t\t\t\t\twhile ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}\n\n\t\t\t\t\tcheckSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?\n\t\t\t\t\t\telem || false :\n\t\t\t\t\t\telem === part;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isPartStrNotTag ) {\n\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t}\n\t\t},\n\t\t\">\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\";\n\n\t\t\tif ( isPartStr && !/\\W/.test(part) ) {\n\t\t\t\tpart = part.toLowerCase();\n\n\t\t\t\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\t\t\t\tvar elem = checkSet[i];\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\t\t\tcheckSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\t\t\t\tvar elem = checkSet[i];\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tcheckSet[i] = isPartStr ?\n\t\t\t\t\t\t\telem.parentNode :\n\t\t\t\t\t\t\telem.parentNode === part;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isPartStr ) {\n\t\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"\": function(checkSet, part, isXML){\n\t\t\tvar doneName = done++, checkFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !/\\W/.test(part) ) {\n\t\t\t\tvar nodeCheck = part = part.toLowerCase();\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn(\"parentNode\", part, doneName, checkSet, nodeCheck, isXML);\n\t\t},\n\t\t\"~\": function(checkSet, part, isXML){\n\t\t\tvar doneName = done++, checkFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !/\\W/.test(part) ) {\n\t\t\t\tvar nodeCheck = part = part.toLowerCase();\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn(\"previousSibling\", part, doneName, checkSet, nodeCheck, isXML);\n\t\t}\n\t},\n\tfind: {\n\t\tID: function(match, context, isXML){\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\treturn m ? [m] : [];\n\t\t\t}\n\t\t},\n\t\tNAME: function(match, context){\n\t\t\tif ( typeof context.getElementsByName !== \"undefined\" ) {\n\t\t\t\tvar ret = [], results = context.getElementsByName(match[1]);\n\n\t\t\t\tfor ( var i = 0, l = results.length; i < l; i++ ) {\n\t\t\t\t\tif ( results[i].getAttribute(\"name\") === match[1] ) {\n\t\t\t\t\t\tret.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn ret.length === 0 ? null : ret;\n\t\t\t}\n\t\t},\n\t\tTAG: function(match, context){\n\t\t\treturn context.getElementsByTagName(match[1]);\n\t\t}\n\t},\n\tpreFilter: {\n\t\tCLASS: function(match, curLoop, inplace, result, not, isXML){\n\t\t\tmatch = \" \" + match[1].replace(/\\\\/g, \"\") + \" \";\n\n\t\t\tif ( isXML ) {\n\t\t\t\treturn match;\n\t\t\t}\n\n\t\t\tfor ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {\n\t\t\t\tif ( elem ) {\n\t\t\t\t\tif ( not ^ (elem.className && (\" \" + elem.className + \" \").replace(/[\\t\\n]/g, \" \").indexOf(match) >= 0) ) {\n\t\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\t\tresult.push( elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( inplace ) {\n\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\tID: function(match){\n\t\t\treturn match[1].replace(/\\\\/g, \"\");\n\t\t},\n\t\tTAG: function(match, curLoop){\n\t\t\treturn match[1].toLowerCase();\n\t\t},\n\t\tCHILD: function(match){\n\t\t\tif ( match[1] === \"nth\" ) {\n\t\t\t\t// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n\t\t\t\tvar test = /(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(\n\t\t\t\t\tmatch[2] === \"even\" && \"2n\" || match[2] === \"odd\" && \"2n+1\" ||\n\t\t\t\t\t!/\\D/.test( match[2] ) && \"0n+\" + match[2] || match[2]);\n\n\t\t\t\t// calculate the numbers (first)n+(last) including if they are negative\n\t\t\t\tmatch[2] = (test[1] + (test[2] || 1)) - 0;\n\t\t\t\tmatch[3] = test[3] - 0;\n\t\t\t}\n\n\t\t\t// TODO: Move to normal caching system\n\t\t\tmatch[0] = done++;\n\n\t\t\treturn match;\n\t\t},\n\t\tATTR: function(match, curLoop, inplace, result, not, isXML){\n\t\t\tvar name = match[1].replace(/\\\\/g, \"\");\n\t\t\t\n\t\t\tif ( !isXML && Expr.attrMap[name] ) {\n\t\t\t\tmatch[1] = Expr.attrMap[name];\n\t\t\t}\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[4] = \" \" + match[4] + \" \";\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\t\tPSEUDO: function(match, curLoop, inplace, result, not){\n\t\t\tif ( match[1] === \"not\" ) {\n\t\t\t\t// If we're dealing with a complex expression, or a simple one\n\t\t\t\tif ( ( chunker.exec(match[3]) || \"\" ).length > 1 || /^\\w/.test(match[3]) ) {\n\t\t\t\t\tmatch[3] = Sizzle(match[3], null, null, curLoop);\n\t\t\t\t} else {\n\t\t\t\t\tvar ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tresult.push.apply( result, ret );\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn match;\n\t\t},\n\t\tPOS: function(match){\n\t\t\tmatch.unshift( true );\n\t\t\treturn match;\n\t\t}\n\t},\n\tfilters: {\n\t\tenabled: function(elem){\n\t\t\treturn elem.disabled === false && elem.type !== \"hidden\";\n\t\t},\n\t\tdisabled: function(elem){\n\t\t\treturn elem.disabled === true;\n\t\t},\n\t\tchecked: function(elem){\n\t\t\treturn elem.checked === true;\n\t\t},\n\t\tselected: function(elem){\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\telem.parentNode.selectedIndex;\n\t\t\treturn elem.selected === true;\n\t\t},\n\t\tparent: function(elem){\n\t\t\treturn !!elem.firstChild;\n\t\t},\n\t\tempty: function(elem){\n\t\t\treturn !elem.firstChild;\n\t\t},\n\t\thas: function(elem, i, match){\n\t\t\treturn !!Sizzle( match[3], elem ).length;\n\t\t},\n\t\theader: function(elem){\n\t\t\treturn /h\\d/i.test( elem.nodeName );\n\t\t},\n\t\ttext: function(elem){\n\t\t\treturn \"text\" === elem.type;\n\t\t},\n\t\tradio: function(elem){\n\t\t\treturn \"radio\" === elem.type;\n\t\t},\n\t\tcheckbox: function(elem){\n\t\t\treturn \"checkbox\" === elem.type;\n\t\t},\n\t\tfile: function(elem){\n\t\t\treturn \"file\" === elem.type;\n\t\t},\n\t\tpassword: function(elem){\n\t\t\treturn \"password\" === elem.type;\n\t\t},\n\t\tsubmit: function(elem){\n\t\t\treturn \"submit\" === elem.type;\n\t\t},\n\t\timage: function(elem){\n\t\t\treturn \"image\" === elem.type;\n\t\t},\n\t\treset: function(elem){\n\t\t\treturn \"reset\" === elem.type;\n\t\t},\n\t\tbutton: function(elem){\n\t\t\treturn \"button\" === elem.type || elem.nodeName.toLowerCase() === \"button\";\n\t\t},\n\t\tinput: function(elem){\n\t\t\treturn /input|select|textarea|button/i.test(elem.nodeName);\n\t\t}\n\t},\n\tsetFilters: {\n\t\tfirst: function(elem, i){\n\t\t\treturn i === 0;\n\t\t},\n\t\tlast: function(elem, i, match, array){\n\t\t\treturn i === array.length - 1;\n\t\t},\n\t\teven: function(elem, i){\n\t\t\treturn i % 2 === 0;\n\t\t},\n\t\todd: function(elem, i){\n\t\t\treturn i % 2 === 1;\n\t\t},\n\t\tlt: function(elem, i, match){\n\t\t\treturn i < match[3] - 0;\n\t\t},\n\t\tgt: function(elem, i, match){\n\t\t\treturn i > match[3] - 0;\n\t\t},\n\t\tnth: function(elem, i, match){\n\t\t\treturn match[3] - 0 === i;\n\t\t},\n\t\teq: function(elem, i, match){\n\t\t\treturn match[3] - 0 === i;\n\t\t}\n\t},\n\tfilter: {\n\t\tPSEUDO: function(elem, match, i, array){\n\t\t\tvar name = match[1], filter = Expr.filters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t} else if ( name === \"contains\" ) {\n\t\t\t\treturn (elem.textContent || elem.innerText || getText([ elem ]) || \"\").indexOf(match[3]) >= 0;\n\t\t\t} else if ( name === \"not\" ) {\n\t\t\t\tvar not = match[3];\n\n\t\t\t\tfor ( var i = 0, l = not.length; i < l; i++ ) {\n\t\t\t\t\tif ( not[i] === elem ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSizzle.error( \"Syntax error, unrecognized expression: \" + name );\n\t\t\t}\n\t\t},\n\t\tCHILD: function(elem, match){\n\t\t\tvar type = match[1], node = elem;\n\t\t\tswitch (type) {\n\t\t\t\tcase 'only':\n\t\t\t\tcase 'first':\n\t\t\t\t\twhile ( (node = node.previousSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( type === \"first\" ) { \n\t\t\t\t\t\treturn true; \n\t\t\t\t\t}\n\t\t\t\t\tnode = elem;\n\t\t\t\tcase 'last':\n\t\t\t\t\twhile ( (node = node.nextSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\tcase 'nth':\n\t\t\t\t\tvar first = match[2], last = match[3];\n\n\t\t\t\t\tif ( first === 1 && last === 0 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar doneName = match[0],\n\t\t\t\t\t\tparent = elem.parentNode;\n\t\n\t\t\t\t\tif ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {\n\t\t\t\t\t\tvar count = 0;\n\t\t\t\t\t\tfor ( node = parent.firstChild; node; node = node.nextSibling ) {\n\t\t\t\t\t\t\tif ( node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\tnode.nodeIndex = ++count;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tparent.sizcache = doneName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar diff = elem.nodeIndex - last;\n\t\t\t\t\tif ( first === 0 ) {\n\t\t\t\t\t\treturn diff === 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tID: function(elem, match){\n\t\t\treturn elem.nodeType === 1 && elem.getAttribute(\"id\") === match;\n\t\t},\n\t\tTAG: function(elem, match){\n\t\t\treturn (match === \"*\" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;\n\t\t},\n\t\tCLASS: function(elem, match){\n\t\t\treturn (\" \" + (elem.className || elem.getAttribute(\"class\")) + \" \")\n\t\t\t\t.indexOf( match ) > -1;\n\t\t},\n\t\tATTR: function(elem, match){\n\t\t\tvar name = match[1],\n\t\t\t\tresult = Expr.attrHandle[ name ] ?\n\t\t\t\t\tExpr.attrHandle[ name ]( elem ) :\n\t\t\t\t\telem[ name ] != null ?\n\t\t\t\t\t\telem[ name ] :\n\t\t\t\t\t\telem.getAttribute( name ),\n\t\t\t\tvalue = result + \"\",\n\t\t\t\ttype = match[2],\n\t\t\t\tcheck = match[4];\n\n\t\t\treturn result == null ?\n\t\t\t\ttype === \"!=\" :\n\t\t\t\ttype === \"=\" ?\n\t\t\t\tvalue === check :\n\t\t\t\ttype === \"*=\" ?\n\t\t\t\tvalue.indexOf(check) >= 0 :\n\t\t\t\ttype === \"~=\" ?\n\t\t\t\t(\" \" + value + \" \").indexOf(check) >= 0 :\n\t\t\t\t!check ?\n\t\t\t\tvalue && result !== false :\n\t\t\t\ttype === \"!=\" ?\n\t\t\t\tvalue !== check :\n\t\t\t\ttype === \"^=\" ?\n\t\t\t\tvalue.indexOf(check) === 0 :\n\t\t\t\ttype === \"$=\" ?\n\t\t\t\tvalue.substr(value.length - check.length) === check :\n\t\t\t\ttype === \"|=\" ?\n\t\t\t\tvalue === check || value.substr(0, check.length + 1) === check + \"-\" :\n\t\t\t\tfalse;\n\t\t},\n\t\tPOS: function(elem, match, i, array){\n\t\t\tvar name = match[2], filter = Expr.setFilters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar origPOS = Expr.match.POS;\n\nfor ( var type in Expr.match ) {\n\tExpr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\\[]*\\])(?![^\\(]*\\))/.source );\n\tExpr.leftMatch[ type ] = new RegExp( /(^(?:.|\\r|\\n)*?)/.source + Expr.match[ type ].source.replace(/\\\\(\\d+)/g, function(all, num){\n\t\treturn \"\\\\\" + (num - 0 + 1);\n\t}));\n}\n\nvar makeArray = function(array, results) {\n\tarray = Array.prototype.slice.call( array, 0 );\n\n\tif ( results ) {\n\t\tresults.push.apply( results, array );\n\t\treturn results;\n\t}\n\t\n\treturn array;\n};\n\n// Perform a simple check to determine if the browser is capable of\n// converting a NodeList to an array using builtin methods.\ntry {\n\tArray.prototype.slice.call( document.documentElement.childNodes, 0 );\n\n// Provide a fallback method if it does not work\n} catch(e){\n\tmakeArray = function(array, results) {\n\t\tvar ret = results || [];\n\n\t\tif ( toString.call(array) === \"[object Array]\" ) {\n\t\t\tArray.prototype.push.apply( ret, array );\n\t\t} else {\n\t\t\tif ( typeof array.length === \"number\" ) {\n\t\t\t\tfor ( var i = 0, l = array.length; i < l; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( var i = 0; array[i]; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nvar sortOrder;\n\nif ( document.documentElement.compareDocumentPosition ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t\t}\n\n\t\tvar ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n} else if ( \"sourceIndex\" in document.documentElement ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.sourceIndex || !b.sourceIndex ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.sourceIndex ? -1 : 1;\n\t\t}\n\n\t\tvar ret = a.sourceIndex - b.sourceIndex;\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n} else if ( document.createRange ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.ownerDocument || !b.ownerDocument ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.ownerDocument ? -1 : 1;\n\t\t}\n\n\t\tvar aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();\n\t\taRange.setStart(a, 0);\n\t\taRange.setEnd(a, 0);\n\t\tbRange.setStart(b, 0);\n\t\tbRange.setEnd(b, 0);\n\t\tvar ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n}\n\n// Utility function for retreiving the text value of an array of DOM nodes\nfunction getText( elems ) {\n\tvar ret = \"\", elem;\n\n\tfor ( var i = 0; elems[i]; i++ ) {\n\t\telem = elems[i];\n\n\t\t// Get the text from text nodes and CDATA nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\tret += elem.nodeValue;\n\n\t\t// Traverse everything else, except comment nodes\n\t\t} else if ( elem.nodeType !== 8 ) {\n\t\t\tret += getText( elem.childNodes );\n\t\t}\n\t}\n\n\treturn ret;\n}\n\n// Check to see if the browser returns elements by name when\n// querying by getElementById (and provide a workaround)\n(function(){\n\t// We're going to inject a fake input element with a specified name\n\tvar form = document.createElement(\"div\"),\n\t\tid = \"script\" + (new Date).getTime();\n\tform.innerHTML = \"<a name='\" + id + \"'/>\";\n\n\t// Inject it into the root element, check its status, and remove it quickly\n\tvar root = document.documentElement;\n\troot.insertBefore( form, root.firstChild );\n\n\t// The workaround has to do additional checks after a getElementById\n\t// Which slows things down for other browsers (hence the branching)\n\tif ( document.getElementById( id ) ) {\n\t\tExpr.find.ID = function(match, context, isXML){\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\treturn m ? m.id === match[1] || typeof m.getAttributeNode !== \"undefined\" && m.getAttributeNode(\"id\").nodeValue === match[1] ? [m] : undefined : [];\n\t\t\t}\n\t\t};\n\n\t\tExpr.filter.ID = function(elem, match){\n\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\t\t\treturn elem.nodeType === 1 && node && node.nodeValue === match;\n\t\t};\n\t}\n\n\troot.removeChild( form );\n\troot = form = null; // release memory in IE\n})();\n\n(function(){\n\t// Check to see if the browser returns only elements\n\t// when doing getElementsByTagName(\"*\")\n\n\t// Create a fake element\n\tvar div = document.createElement(\"div\");\n\tdiv.appendChild( document.createComment(\"\") );\n\n\t// Make sure no comments are found\n\tif ( div.getElementsByTagName(\"*\").length > 0 ) {\n\t\tExpr.find.TAG = function(match, context){\n\t\t\tvar results = context.getElementsByTagName(match[1]);\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( match[1] === \"*\" ) {\n\t\t\t\tvar tmp = [];\n\n\t\t\t\tfor ( var i = 0; results[i]; i++ ) {\n\t\t\t\t\tif ( results[i].nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresults = tmp;\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t}\n\n\t// Check to see if an attribute returns normalized href attributes\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\tif ( div.firstChild && typeof div.firstChild.getAttribute !== \"undefined\" &&\n\t\t\tdiv.firstChild.getAttribute(\"href\") !== \"#\" ) {\n\t\tExpr.attrHandle.href = function(elem){\n\t\t\treturn elem.getAttribute(\"href\", 2);\n\t\t};\n\t}\n\n\tdiv = null; // release memory in IE\n})();\n\nif ( document.querySelectorAll ) {\n\t(function(){\n\t\tvar oldSizzle = Sizzle, div = document.createElement(\"div\");\n\t\tdiv.innerHTML = \"<p class='TEST'></p>\";\n\n\t\t// Safari can't handle uppercase or unicode characters when\n\t\t// in quirks mode.\n\t\tif ( div.querySelectorAll && div.querySelectorAll(\".TEST\").length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tSizzle = function(query, context, extra, seed){\n\t\t\tcontext = context || document;\n\n\t\t\t// Only use querySelectorAll on non-XML documents\n\t\t\t// (ID selectors don't work in non-HTML documents)\n\t\t\tif ( !seed && context.nodeType === 9 && !isXML(context) ) {\n\t\t\t\ttry {\n\t\t\t\t\treturn makeArray( context.querySelectorAll(query), extra );\n\t\t\t\t} catch(e){}\n\t\t\t}\n\t\t\n\t\t\treturn oldSizzle(query, context, extra, seed);\n\t\t};\n\n\t\tfor ( var prop in oldSizzle ) {\n\t\t\tSizzle[ prop ] = oldSizzle[ prop ];\n\t\t}\n\n\t\tdiv = null; // release memory in IE\n\t})();\n}\n\n(function(){\n\tvar div = document.createElement(\"div\");\n\n\tdiv.innerHTML = \"<div class='test e'></div><div class='test'></div>\";\n\n\t// Opera can't find a second classname (in 9.6)\n\t// Also, make sure that getElementsByClassName actually exists\n\tif ( !div.getElementsByClassName || div.getElementsByClassName(\"e\").length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Safari caches class attributes, doesn't catch changes (in 3.2)\n\tdiv.lastChild.className = \"e\";\n\n\tif ( div.getElementsByClassName(\"e\").length === 1 ) {\n\t\treturn;\n\t}\n\t\n\tExpr.order.splice(1, 0, \"CLASS\");\n\tExpr.find.CLASS = function(match, context, isXML) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && !isXML ) {\n\t\t\treturn context.getElementsByClassName(match[1]);\n\t\t}\n\t};\n\n\tdiv = null; // release memory in IE\n})();\n\nfunction dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\t\tif ( elem ) {\n\t\t\telem = elem[dir];\n\t\t\tvar match = false;\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 && !isXML ){\n\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\telem.sizset = i;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeName.toLowerCase() === cur ) {\n\t\t\t\t\tmatch = elem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nfunction dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\t\tif ( elem ) {\n\t\t\telem = elem[dir];\n\t\t\tvar match = false;\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !isXML ) {\n\t\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\t\telem.sizset = i;\n\t\t\t\t\t}\n\t\t\t\t\tif ( typeof cur !== \"string\" ) {\n\t\t\t\t\t\tif ( elem === cur ) {\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {\n\t\t\t\t\t\tmatch = elem;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nvar contains = document.compareDocumentPosition ? function(a, b){\n\treturn a.compareDocumentPosition(b) & 16;\n} : function(a, b){\n\treturn a !== b && (a.contains ? a.contains(b) : true);\n};\n\nvar isXML = function(elem){\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833) \n\tvar documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\nvar posProcess = function(selector, context){\n\tvar tmpSet = [], later = \"\", match,\n\t\troot = context.nodeType ? [context] : context;\n\n\t// Position selectors must be done after the filter\n\t// And so must :not(positional) so we move all PSEUDOs to the end\n\twhile ( (match = Expr.match.PSEUDO.exec( selector )) ) {\n\t\tlater += match[0];\n\t\tselector = selector.replace( Expr.match.PSEUDO, \"\" );\n\t}\n\n\tselector = Expr.relative[selector] ? selector + \"*\" : selector;\n\n\tfor ( var i = 0, l = root.length; i < l; i++ ) {\n\t\tSizzle( selector, root[i], tmpSet );\n\t}\n\n\treturn Sizzle.filter( later, tmpSet );\n};\n\n// EXPOSE\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.filters;\njQuery.unique = Sizzle.uniqueSort;\njQuery.getText = getText;\njQuery.isXMLDoc = isXML;\njQuery.contains = contains;\n\nreturn;\n\nwindow.Sizzle = Sizzle;\n\n})();\nvar runtil = /Until$/,\n\trparentsprev = /^(?:parents|prevUntil|prevAll)/,\n\t// Note: This RegExp should be improved, or likely pulled from Sizzle\n\trmultiselector = /,/,\n\tslice = Array.prototype.slice;\n\n// Implement the identical functionality for filter and not\nvar winnow = function( elements, qualifier, keep ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) === keep;\n\t\t});\n\n\t} else if ( qualifier.nodeType ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\treturn (elem === qualifier) === keep;\n\t\t});\n\n\t} else if ( typeof qualifier === \"string\" ) {\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t});\n\n\t\tif ( isSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\n\t\t} else {\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\n\t\t}\n\t}\n\n\treturn jQuery.grep(elements, function( elem, i ) {\n\t\treturn (jQuery.inArray( elem, qualifier ) >= 0) === keep;\n\t});\n};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar ret = this.pushStack( \"\", \"find\", selector ), length = 0;\n\n\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\tlength = ret.length;\n\t\t\tjQuery.find( selector, this[i], ret );\n\n\t\t\tif ( i > 0 ) {\n\t\t\t\t// Make sure that the results are unique\n\t\t\t\tfor ( var n = length; n < ret.length; n++ ) {\n\t\t\t\t\tfor ( var r = 0; r < length; r++ ) {\n\t\t\t\t\t\tif ( ret[r] === ret[n] ) {\n\t\t\t\t\t\t\tret.splice(n--, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\thas: function( target ) {\n\t\tvar targets = jQuery( target );\n\t\treturn this.filter(function() {\n\t\t\tfor ( var i = 0, l = targets.length; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, false), \"not\", selector);\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, true), \"filter\", selector );\n\t},\n\t\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.filter( selector, this ).length > 0;\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tif ( jQuery.isArray( selectors ) ) {\n\t\t\tvar ret = [], cur = this[0], match, matches = {}, selector;\n\n\t\t\tif ( cur && selectors.length ) {\n\t\t\t\tfor ( var i = 0, l = selectors.length; i < l; i++ ) {\n\t\t\t\t\tselector = selectors[i];\n\n\t\t\t\t\tif ( !matches[selector] ) {\n\t\t\t\t\t\tmatches[selector] = jQuery.expr.match.POS.test( selector ) ? \n\t\t\t\t\t\t\tjQuery( selector, context || this.context ) :\n\t\t\t\t\t\t\tselector;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile ( cur && cur.ownerDocument && cur !== context ) {\n\t\t\t\t\tfor ( selector in matches ) {\n\t\t\t\t\t\tmatch = matches[selector];\n\n\t\t\t\t\t\tif ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {\n\t\t\t\t\t\t\tret.push({ selector: selector, elem: cur });\n\t\t\t\t\t\t\tdelete matches[selector];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcur = cur.parentNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ret;\n\t\t}\n\n\t\tvar pos = jQuery.expr.match.POS.test( selectors ) ? \n\t\t\tjQuery( selectors, context || this.context ) : null;\n\n\t\treturn this.map(function( i, cur ) {\n\t\t\twhile ( cur && cur.ownerDocument && cur !== context ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {\n\t\t\t\t\treturn cur;\n\t\t\t\t}\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t},\n\t\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\tif ( !elem || typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[0],\n\t\t\t\t// If it receives a string, the selector is used\n\t\t\t\t// If it receives nothing, the siblings are used\n\t\t\t\telem ? jQuery( elem ) : this.parent().children() );\n\t\t}\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[0] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\tvar set = typeof selector === \"string\" ?\n\t\t\t\tjQuery( selector, context || this.context ) :\n\t\t\t\tjQuery.makeArray( selector ),\n\t\t\tall = jQuery.merge( this.get(), set );\n\n\t\treturn this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?\n\t\t\tall :\n\t\t\tjQuery.unique( all ) );\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t}\n});\n\n// A painfully simple check to see if an element is disconnected\n// from a document (should be improved, where feasible).\nfunction isDisconnected( node ) {\n\treturn !node || !node.parentNode || node.parentNode.nodeType === 11;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( elem.parentNode.firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.makeArray( elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\t\t\n\t\tif ( !runtil.test( name ) ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tret = this.length > 1 ? jQuery.unique( ret ) : ret;\n\n\t\tif ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {\n\t\t\tret = ret.reverse();\n\t\t}\n\n\t\treturn this.pushStack( ret, name, slice.call(arguments).join(\",\") );\n\t};\n});\n\njQuery.extend({\n\tfilter: function( expr, elems, not ) {\n\t\tif ( not ) {\n\t\t\texpr = \":not(\" + expr + \")\";\n\t\t}\n\n\t\treturn jQuery.find.matches(expr, elems);\n\t},\n\t\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [], cur = elem[dir];\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n\t\t\tif ( cur.nodeType === 1 ) {\n\t\t\t\tmatched.push( cur );\n\t\t\t}\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tnth: function( cur, result, dir, elem ) {\n\t\tresult = result || 1;\n\t\tvar num = 0;\n\n\t\tfor ( ; cur; cur = cur[dir] ) {\n\t\t\tif ( cur.nodeType === 1 && ++num === result ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn cur;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tr.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n});\nvar rinlinejQuery = / jQuery\\d+=\"(?:\\d+|null)\"/g,\n\trleadingWhitespace = /^\\s+/,\n\trxhtmlTag = /(<([\\w:]+)[^>]*?)\\/>/g,\n\trselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,\n\trtagName = /<([\\w:]+)/,\n\trtbody = /<tbody/i,\n\trhtml = /<|&\\w+;/,\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,  // checked=\"checked\" or checked (html5)\n\tfcloseTag = function( all, front, tag ) {\n\t\treturn rselfClosing.test( tag ) ?\n\t\t\tall :\n\t\t\tfront + \"></\" + tag + \">\";\n\t},\n\twrapMap = {\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\n\t\t_default: [ 0, \"\", \"\" ]\n\t};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// IE can't serialize <link> and <script> tags normally\nif ( !jQuery.support.htmlSerialize ) {\n\twrapMap._default = [ 1, \"div<div>\", \"</div>\" ];\n}\n\njQuery.fn.extend({\n\ttext: function( text ) {\n\t\tif ( jQuery.isFunction(text) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.text( text.call(this, i, self.text()) );\n\t\t\t});\n\t\t}\n\n\t\tif ( typeof text !== \"object\" && text !== undefined ) {\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\t\t}\n\n\t\treturn jQuery.getText( this );\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n\t\t\tif ( this[0].parentNode ) {\n\t\t\t\twrap.insertBefore( this[0] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append(this);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ), contents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = jQuery(arguments[0]);\n\t\t\tset.push.apply( set, this.toArray() );\n\t\t\treturn this.pushStack( set, \"before\", arguments );\n\t\t}\n\t},\n\n\tafter: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = this.pushStack( this, \"after\", arguments );\n\t\t\tset.push.apply( set, jQuery(arguments[0]).toArray() );\n\t\t\treturn set;\n\t\t}\n\t},\n\n\tclone: function( events ) {\n\t\t// Do the clone\n\t\tvar ret = this.map(function() {\n\t\t\tif ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {\n\t\t\t\t// IE copies events bound via attachEvent when\n\t\t\t\t// using cloneNode. Calling detachEvent on the\n\t\t\t\t// clone will also remove the events from the orignal\n\t\t\t\t// In order to get around this, we use innerHTML.\n\t\t\t\t// Unfortunately, this means some modifications to\n\t\t\t\t// attributes in IE that are actually only stored\n\t\t\t\t// as properties will not be copied (such as the\n\t\t\t\t// the name attribute on an input).\n\t\t\t\tvar html = this.outerHTML, ownerDocument = this.ownerDocument;\n\t\t\t\tif ( !html ) {\n\t\t\t\t\tvar div = ownerDocument.createElement(\"div\");\n\t\t\t\t\tdiv.appendChild( this.cloneNode(true) );\n\t\t\t\t\thtml = div.innerHTML;\n\t\t\t\t}\n\n\t\t\t\treturn jQuery.clean([html.replace(rinlinejQuery, \"\")\n\t\t\t\t\t.replace(rleadingWhitespace, \"\")], ownerDocument)[0];\n\t\t\t} else {\n\t\t\t\treturn this.cloneNode(true);\n\t\t\t}\n\t\t});\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( events === true ) {\n\t\t\tcloneCopyEvent( this, ret );\n\t\t\tcloneCopyEvent( this.find(\"*\"), ret.find(\"*\") );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn ret;\n\t},\n\n\thtml: function( value ) {\n\t\tif ( value === undefined ) {\n\t\t\treturn this[0] && this[0].nodeType === 1 ?\n\t\t\t\tthis[0].innerHTML.replace(rinlinejQuery, \"\") :\n\t\t\t\tnull;\n\n\t\t// See if we can take a shortcut and just use innerHTML\n\t\t} else if ( typeof value === \"string\" && !/<script/i.test( value ) &&\n\t\t\t(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&\n\t\t\t!wrapMap[ (rtagName.exec( value ) || [\"\", \"\"])[1].toLowerCase() ] ) {\n\n\t\t\tvalue = value.replace(rxhtmlTag, fcloseTag);\n\n\t\t\ttry {\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\tif ( this[i].nodeType === 1 ) {\n\t\t\t\t\t\tjQuery.cleanData( this[i].getElementsByTagName(\"*\") );\n\t\t\t\t\t\tthis[i].innerHTML = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t} catch(e) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\n\t\t} else if ( jQuery.isFunction( value ) ) {\n\t\t\tthis.each(function(i){\n\t\t\t\tvar self = jQuery(this), old = self.html();\n\t\t\t\tself.empty().append(function(){\n\t\t\t\t\treturn value.call( this, i, old );\n\t\t\t\t});\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.empty().append( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\treplaceWith: function( value ) {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\t// Make sure that the elements are removed from the DOM before they are inserted\n\t\t\t// this can help fix replacing a parent with child elements\n\t\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\t\tvalue = jQuery( value ).detach();\n\n\t\t\t} else {\n\t\t\t\treturn this.each(function(i) {\n\t\t\t\t\tvar self = jQuery(this), old = self.html();\n\t\t\t\t\tself.replaceWith( value.call( this, i, old ) );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\tvar next = this.nextSibling, parent = this.parentNode;\n\n\t\t\t\tjQuery(this).remove();\n\n\t\t\t\tif ( next ) {\n\t\t\t\t\tjQuery(next).before( value );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(parent).append( value );\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\treturn this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), \"replaceWith\", value );\n\t\t}\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tvar results, first, value = args[0], scripts = [];\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === \"string\" && rchecked.test( value ) ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery(this).domManip( args, table, callback, true );\n\t\t\t});\n\t\t}\n\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\targs[0] = value.call(this, i, table ? self.html() : undefined);\n\t\t\t\tself.domManip( args, table, callback );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// If we're in a fragment, just use that instead of building a new one\n\t\t\tif ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {\n\t\t\t\tresults = { fragment: args[0].parentNode };\n\t\t\t} else {\n\t\t\t\tresults = buildFragment( args, this, scripts );\n\t\t\t}\n\n\t\t\tfirst = results.fragment.firstChild;\n\n\t\t\tif ( first ) {\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\n\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\t\tcallback.call(\n\t\t\t\t\t\ttable ?\n\t\t\t\t\t\t\troot(this[i], first) :\n\t\t\t\t\t\t\tthis[i],\n\t\t\t\t\t\tresults.cacheable || this.length > 1 || i > 0 ?\n\t\t\t\t\t\t\tresults.fragment.cloneNode(true) :\n\t\t\t\t\t\t\tresults.fragment\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( scripts ) {\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t\tfunction root( elem, cur ) {\n\t\t\treturn jQuery.nodeName(elem, \"table\") ?\n\t\t\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\t\t\telem;\n\t\t}\n\t}\n});\n\nfunction cloneCopyEvent(orig, ret) {\n\tvar i = 0;\n\n\tret.each(function() {\n\t\tif ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;\n\n\t\tif ( events ) {\n\t\t\tdelete curData.handle;\n\t\t\tcurData.events = {};\n\n\t\t\tfor ( var type in events ) {\n\t\t\t\tfor ( var handler in events[ type ] ) {\n\t\t\t\t\tjQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction buildFragment( args, nodes, scripts ) {\n\tvar fragment, cacheable, cacheresults, doc;\n\n\t// webkit does not clone 'checked' attribute of radio inputs on cloneNode, so don't cache if string has a checked\n\tif ( args.length === 1 && typeof args[0] === \"string\" && args[0].length < 512 && args[0].indexOf(\"<option\") < 0 && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {\n\t\tcacheable = true;\n\t\tcacheresults = jQuery.fragments[ args[0] ];\n\t\tif ( cacheresults ) {\n\t\t\tif ( cacheresults !== 1 ) {\n\t\t\t\tfragment = cacheresults;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !fragment ) {\n\t\tdoc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);\n\t\tfragment = doc.createDocumentFragment();\n\t\tjQuery.clean( args, doc, fragment, scripts );\n\t}\n\n\tif ( cacheable ) {\n\t\tjQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;\n\t}\n\n\treturn { fragment: fragment, cacheable: cacheable };\n}\n\njQuery.fragments = {};\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar ret = [], insert = jQuery( selector );\n\n\t\tfor ( var i = 0, l = insert.length; i < l; i++ ) {\n\t\t\tvar elems = (i > 0 ? this.clone(true) : this).get();\n\t\t\tjQuery.fn[ original ].apply( jQuery(insert[i]), elems );\n\t\t\tret = ret.concat( elems );\n\t\t}\n\t\treturn this.pushStack( ret, name, insert.selector );\n\t};\n});\n\njQuery.each({\n\t// keepData is for internal use only--do not document\n\tremove: function( selector, keepData ) {\n\t\tif ( !selector || jQuery.filter( selector, [ this ] ).length ) {\n\t\t\tif ( !keepData && this.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( this.getElementsByTagName(\"*\") );\n\t\t\t\tjQuery.cleanData( [ this ] );\n\t\t\t}\n\n\t\t\tif ( this.parentNode ) {\n\t\t\t\t this.parentNode.removeChild( this );\n\t\t\t}\n\t\t}\n\t},\n\n\tempty: function() {\n\t\t// Remove element nodes and prevent memory leaks\n\t\tif ( this.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( this.getElementsByTagName(\"*\") );\n\t\t}\n\n\t\t// Remove any remaining nodes\n\t\twhile ( this.firstChild ) {\n\t\t\tthis.removeChild( this.firstChild );\n\t\t}\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function() {\n\t\treturn this.each( fn, arguments );\n\t};\n});\n\njQuery.extend({\n\tclean: function( elems, context, fragment, scripts ) {\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" ) {\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\t\t}\n\n\t\tvar ret = [];\n\n\t\tjQuery.each(elems, function( i, elem ) {\n\t\t\tif ( typeof elem === \"number\" ) {\n\t\t\t\telem += \"\";\n\t\t\t}\n\n\t\t\tif ( !elem ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" && !rhtml.test( elem ) ) {\n\t\t\t\telem = context.createTextNode( elem );\n\n\t\t\t} else if ( typeof elem === \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(rxhtmlTag, fcloseTag);\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tag = (rtagName.exec( elem ) || [\"\", \"\"])[1].toLowerCase(),\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default,\n\t\t\t\t\tdepth = wrap[0],\n\t\t\t\t\tdiv = context.createElement(\"div\");\n\n\t\t\t\t// Go to html and back, then peel off extra wrappers\n\t\t\t\tdiv.innerHTML = wrap[1] + elem + wrap[2];\n\n\t\t\t\t// Move to the right depth\n\t\t\t\twhile ( depth-- ) {\n\t\t\t\t\tdiv = div.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( !jQuery.support.tbody ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\tvar hasBody = rtbody.test(elem),\n\t\t\t\t\t\ttbody = tag === \"table\" && !hasBody ?\n\t\t\t\t\t\t\tdiv.firstChild && div.firstChild.childNodes :\n\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !hasBody ?\n\t\t\t\t\t\t\t\tdiv.childNodes :\n\t\t\t\t\t\t\t\t[];\n\n\t\t\t\t\tfor ( var j = tbody.length - 1; j >= 0 ; --j ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( tbody[ j ], \"tbody\" ) && !tbody[ j ].childNodes.length ) {\n\t\t\t\t\t\t\ttbody[ j ].parentNode.removeChild( tbody[ j ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// IE completely kills leading whitespace when innerHTML is used\n\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\tdiv.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );\n\t\t\t\t}\n\n\t\t\t\telem = jQuery.makeArray( div.childNodes );\n\t\t\t}\n\n\t\t\tif ( elem.nodeType ) {\n\t\t\t\tret.push( elem );\n\t\t\t} else {\n\t\t\t\tret = jQuery.merge( ret, elem );\n\t\t\t}\n\n\t\t});\n\n\t\tif ( fragment ) {\n\t\t\tfor ( var i = 0; ret[i]; i++ ) {\n\t\t\t\tif ( scripts && jQuery.nodeName( ret[i], \"script\" ) && (!ret[i].type || ret[i].type.toLowerCase() === \"text/javascript\") ) {\n\t\t\t\t\tscripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );\n\t\t\t\t} else {\n\t\t\t\t\tif ( ret[i].nodeType === 1 ) {\n\t\t\t\t\t\tret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName(\"script\"))) );\n\t\t\t\t\t}\n\t\t\t\t\tfragment.appendChild( ret[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\t\n\tcleanData: function( elems ) {\n\t\tfor ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {\n\t\t\tjQuery.event.remove( elem );\n\t\t\tjQuery.removeData( elem );\n\t\t}\n\t}\n});\n// exclude the following css properties to add px\nvar rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,\n\tralpha = /alpha\\([^)]*\\)/,\n\tropacity = /opacity=([^)]*)/,\n\trfloat = /float/i,\n\trdashAlpha = /-([a-z])/ig,\n\trupper = /([A-Z])/g,\n\trnumpx = /^-?\\d+(?:px)?$/i,\n\trnum = /^-?\\d/,\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display:\"block\" },\n\tcssWidth = [ \"Left\", \"Right\" ],\n\tcssHeight = [ \"Top\", \"Bottom\" ],\n\n\t// cache check for defaultView.getComputedStyle\n\tgetComputedStyle = document.defaultView && document.defaultView.getComputedStyle,\n\t// normalize float css property\n\tstyleFloat = jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\",\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn.css = function( name, value ) {\n\treturn access( this, name, value, true, function( elem, name, value ) {\n\t\tif ( value === undefined ) {\n\t\t\treturn jQuery.curCSS( elem, name );\n\t\t}\n\t\t\n\t\tif ( typeof value === \"number\" && !rexclude.test(name) ) {\n\t\t\tvalue += \"px\";\n\t\t}\n\n\t\tjQuery.style( elem, name, value );\n\t});\n};\n\njQuery.extend({\n\tstyle: function( elem, name, value ) {\n\t\t// don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// ignore negative width and height values #1599\n\t\tif ( (name === \"width\" || name === \"height\") && parseFloat(value) < 0 ) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\tvar style = elem.style || elem, set = value !== undefined;\n\n\t\t// IE uses filters for opacity\n\t\tif ( !jQuery.support.opacity && name === \"opacity\" ) {\n\t\t\tif ( set ) {\n\t\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t\t// Force it by setting the zoom level\n\t\t\t\tstyle.zoom = 1;\n\n\t\t\t\t// Set the alpha filter to set the opacity\n\t\t\t\tvar opacity = parseInt( value, 10 ) + \"\" === \"NaN\" ? \"\" : \"alpha(opacity=\" + value * 100 + \")\";\n\t\t\t\tvar filter = style.filter || jQuery.curCSS( elem, \"filter\" ) || \"\";\n\t\t\t\tstyle.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;\n\t\t\t}\n\n\t\t\treturn style.filter && style.filter.indexOf(\"opacity=\") >= 0 ?\n\t\t\t\t(parseFloat( ropacity.exec(style.filter)[1] ) / 100) + \"\":\n\t\t\t\t\"\";\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( rfloat.test( name ) ) {\n\t\t\tname = styleFloat;\n\t\t}\n\n\t\tname = name.replace(rdashAlpha, fcamelCase);\n\n\t\tif ( set ) {\n\t\t\tstyle[ name ] = value;\n\t\t}\n\n\t\treturn style[ name ];\n\t},\n\n\tcss: function( elem, name, force, extra ) {\n\t\tif ( name === \"width\" || name === \"height\" ) {\n\t\t\tvar val, props = cssShow, which = name === \"width\" ? cssWidth : cssHeight;\n\n\t\t\tfunction getWH() {\n\t\t\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\n\t\t\t\tif ( extra === \"border\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tjQuery.each( which, function() {\n\t\t\t\t\tif ( !extra ) {\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"padding\" + this, true)) || 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( extra === \"margin\" ) {\n\t\t\t\t\t\tval += parseFloat(jQuery.curCSS( elem, \"margin\" + this, true)) || 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"border\" + this + \"Width\", true)) || 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( elem.offsetWidth !== 0 ) {\n\t\t\t\tgetWH();\n\t\t\t} else {\n\t\t\t\tjQuery.swap( elem, props, getWH );\n\t\t\t}\n\n\t\t\treturn Math.max(0, Math.round(val));\n\t\t}\n\n\t\treturn jQuery.curCSS( elem, name, force );\n\t},\n\n\tcurCSS: function( elem, name, force ) {\n\t\tvar ret, style = elem.style, filter;\n\n\t\t// IE uses filters for opacity\n\t\tif ( !jQuery.support.opacity && name === \"opacity\" && elem.currentStyle ) {\n\t\t\tret = ropacity.test(elem.currentStyle.filter || \"\") ?\n\t\t\t\t(parseFloat(RegExp.$1) / 100) + \"\" :\n\t\t\t\t\"\";\n\n\t\t\treturn ret === \"\" ?\n\t\t\t\t\"1\" :\n\t\t\t\tret;\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( rfloat.test( name ) ) {\n\t\t\tname = styleFloat;\n\t\t}\n\n\t\tif ( !force && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\n\t\t} else if ( getComputedStyle ) {\n\n\t\t\t// Only \"float\" is needed here\n\t\t\tif ( rfloat.test( name ) ) {\n\t\t\t\tname = \"float\";\n\t\t\t}\n\n\t\t\tname = name.replace( rupper, \"-$1\" ).toLowerCase();\n\n\t\t\tvar defaultView = elem.ownerDocument.defaultView;\n\n\t\t\tif ( !defaultView ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar computedStyle = defaultView.getComputedStyle( elem, null );\n\n\t\t\tif ( computedStyle ) {\n\t\t\t\tret = computedStyle.getPropertyValue( name );\n\t\t\t}\n\n\t\t\t// We should always get a number back from opacity\n\t\t\tif ( name === \"opacity\" && ret === \"\" ) {\n\t\t\t\tret = \"1\";\n\t\t\t}\n\n\t\t} else if ( elem.currentStyle ) {\n\t\t\tvar camelCase = name.replace(rdashAlpha, fcamelCase);\n\n\t\t\tret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];\n\n\t\t\t// From the awesome hack by Dean Edwards\n\t\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t\t// If we're not dealing with a regular pixel number\n\t\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t\tif ( !rnumpx.test( ret ) && rnum.test( ret ) ) {\n\t\t\t\t// Remember the original values\n\t\t\t\tvar left = style.left, rsLeft = elem.runtimeStyle.left;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t\tstyle.left = camelCase === \"fontSize\" ? \"1em\" : (ret || 0);\n\t\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.left = left;\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( var name in options ) {\n\t\t\telem.style[ name ] = old[ name ];\n\t\t}\n\t}\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.hidden = function( elem ) {\n\t\tvar width = elem.offsetWidth, height = elem.offsetHeight,\n\t\t\tskip = elem.nodeName.toLowerCase() === \"tr\";\n\n\t\treturn width === 0 && height === 0 && !skip ?\n\t\t\ttrue :\n\t\t\twidth > 0 && height > 0 && !skip ?\n\t\t\t\tfalse :\n\t\t\t\tjQuery.curCSS(elem, \"display\") === \"none\";\n\t};\n\n\tjQuery.expr.filters.visible = function( elem ) {\n\t\treturn !jQuery.expr.filters.hidden( elem );\n\t};\n}\nvar jsc = now(),\n\trscript = /<script(.|\\s)*?\\/script>/gi,\n\trselectTextarea = /select|textarea/i,\n\trinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,\n\tjsre = /=\\?(&|$)/,\n\trquery = /\\?/,\n\trts = /(\\?|&)_=.*?(&|$)/,\n\trurl = /^(\\w+:)?\\/\\/([^\\/?#]+)/,\n\tr20 = /%20/g;\n\njQuery.fn.extend({\n\t// Keep a copy of the old load\n\t_load: jQuery.fn.load,\n\n\tload: function( url, params, callback ) {\n\t\tif ( typeof url !== \"string\" ) {\n\t\t\treturn this._load( url );\n\n\t\t// Don't do a request if no elements are being requested\n\t\t} else if ( !this.length ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar off = url.indexOf(\" \");\n\t\tif ( off >= 0 ) {\n\t\t\tvar selector = url.slice(off, url.length);\n\t\t\turl = url.slice(0, off);\n\t\t}\n\n\t\t// Default to a GET request\n\t\tvar type = \"GET\";\n\n\t\t// If the second parameter was provided\n\t\tif ( params ) {\n\t\t\t// If it's a function\n\t\t\tif ( jQuery.isFunction( params ) ) {\n\t\t\t\t// We assume that it's the callback\n\t\t\t\tcallback = params;\n\t\t\t\tparams = null;\n\n\t\t\t// Otherwise, build a param string\n\t\t\t} else if ( typeof params === \"object\" ) {\n\t\t\t\tparams = jQuery.param( params, jQuery.ajaxSettings.traditional );\n\t\t\t\ttype = \"POST\";\n\t\t\t}\n\t\t}\n\n\t\tvar self = this;\n\n\t\t// Request the remote document\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params,\n\t\t\tcomplete: function( res, status ) {\n\t\t\t\t// If successful, inject the HTML into all the matched elements\n\t\t\t\tif ( status === \"success\" || status === \"notmodified\" ) {\n\t\t\t\t\t// See if a selector was specified\n\t\t\t\t\tself.html( selector ?\n\t\t\t\t\t\t// Create a dummy div to hold the results\n\t\t\t\t\t\tjQuery(\"<div />\")\n\t\t\t\t\t\t\t// inject the contents of the document in, removing the scripts\n\t\t\t\t\t\t\t// to avoid any 'Permission Denied' errors in IE\n\t\t\t\t\t\t\t.append(res.responseText.replace(rscript, \"\"))\n\n\t\t\t\t\t\t\t// Locate the specified elements\n\t\t\t\t\t\t\t.find(selector) :\n\n\t\t\t\t\t\t// If not, just inject the full result\n\t\t\t\t\t\tres.responseText );\n\t\t\t\t}\n\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tself.each( callback, [res.responseText, status, res] );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn this;\n\t},\n\n\tserialize: function() {\n\t\treturn jQuery.param(this.serializeArray());\n\t},\n\tserializeArray: function() {\n\t\treturn this.map(function() {\n\t\t\treturn this.elements ? jQuery.makeArray(this.elements) : this;\n\t\t})\n\t\t.filter(function() {\n\t\t\treturn this.name && !this.disabled &&\n\t\t\t\t(this.checked || rselectTextarea.test(this.nodeName) ||\n\t\t\t\t\trinput.test(this.type));\n\t\t})\n\t\t.map(function( i, elem ) {\n\t\t\tvar val = jQuery(this).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray(val) ?\n\t\t\t\t\tjQuery.map( val, function( val, i ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val };\n\t\t}).get();\n\t}\n});\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( \"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"), function( i, o ) {\n\tjQuery.fn[o] = function( f ) {\n\t\treturn this.bind(o, f);\n\t};\n});\n\njQuery.extend({\n\n\tget: function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omited\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = null;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: \"GET\",\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get(url, null, callback, \"script\");\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get(url, data, callback, \"json\");\n\t},\n\n\tpost: function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omited\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = {};\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t},\n\n\tajaxSetup: function( settings ) {\n\t\tjQuery.extend( jQuery.ajaxSettings, settings );\n\t},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\tglobal: true,\n\t\ttype: \"GET\",\n\t\tcontentType: \"application/x-www-form-urlencoded\",\n\t\tprocessData: true,\n\t\tasync: true,\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\ttraditional: false,\n\t\t*/\n\t\t// Create the request object; Microsoft failed to properly\n\t\t// implement the XMLHttpRequest in IE7 (can't request local files),\n\t\t// so we use the ActiveXObject when it is available\n\t\t// This function can be overriden by calling jQuery.ajaxSetup\n\t\txhr: window.XMLHttpRequest && (window.location.protocol !== \"file:\" || !window.ActiveXObject) ?\n\t\t\tfunction() {\n\t\t\t\treturn new window.XMLHttpRequest();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\ttry {\n\t\t\t\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t} catch(e) {}\n\t\t\t},\n\t\taccepts: {\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\thtml: \"text/html\",\n\t\t\tscript: \"text/javascript, application/javascript\",\n\t\t\tjson: \"application/json, text/javascript\",\n\t\t\ttext: \"text/plain\",\n\t\t\t_default: \"*/*\"\n\t\t}\n\t},\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajax: function( origSettings ) {\n\t\tvar s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);\n\t\t\n\t\tvar jsonp, status, data,\n\t\t\tcallbackContext = origSettings && origSettings.context || s,\n\t\t\ttype = s.type.toUpperCase();\n\n\t\t// convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Handle JSONP Parameter Callbacks\n\t\tif ( s.dataType === \"jsonp\" ) {\n\t\t\tif ( type === \"GET\" ) {\n\t\t\t\tif ( !jsre.test( s.url ) ) {\n\t\t\t\t\ts.url += (rquery.test( s.url ) ? \"&\" : \"?\") + (s.jsonp || \"callback\") + \"=?\";\n\t\t\t\t}\n\t\t\t} else if ( !s.data || !jsre.test(s.data) ) {\n\t\t\t\ts.data = (s.data ? s.data + \"&\" : \"\") + (s.jsonp || \"callback\") + \"=?\";\n\t\t\t}\n\t\t\ts.dataType = \"json\";\n\t\t}\n\n\t\t// Build temporary JSONP function\n\t\tif ( s.dataType === \"json\" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {\n\t\t\tjsonp = s.jsonpCallback || (\"jsonp\" + jsc++);\n\n\t\t\t// Replace the =? sequence both in the query string and the data\n\t\t\tif ( s.data ) {\n\t\t\t\ts.data = (s.data + \"\").replace(jsre, \"=\" + jsonp + \"$1\");\n\t\t\t}\n\n\t\t\ts.url = s.url.replace(jsre, \"=\" + jsonp + \"$1\");\n\n\t\t\t// We need to make sure\n\t\t\t// that a JSONP style response is executed properly\n\t\t\ts.dataType = \"script\";\n\n\t\t\t// Handle JSONP-style loading\n\t\t\twindow[ jsonp ] = window[ jsonp ] || function( tmp ) {\n\t\t\t\tdata = tmp;\n\t\t\t\tsuccess();\n\t\t\t\tcomplete();\n\t\t\t\t// Garbage collect\n\t\t\t\twindow[ jsonp ] = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tdelete window[ jsonp ];\n\t\t\t\t} catch(e) {}\n\n\t\t\t\tif ( head ) {\n\t\t\t\t\thead.removeChild( script );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tif ( s.dataType === \"script\" && s.cache === null ) {\n\t\t\ts.cache = false;\n\t\t}\n\n\t\tif ( s.cache === false && type === \"GET\" ) {\n\t\t\tvar ts = now();\n\n\t\t\t// try replacing _= if it is there\n\t\t\tvar ret = s.url.replace(rts, \"$1_=\" + ts + \"$2\");\n\n\t\t\t// if nothing was replaced, add timestamp to the end\n\t\t\ts.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? \"&\" : \"?\") + \"_=\" + ts : \"\");\n\t\t}\n\n\t\t// If data is available, append data to url for get requests\n\t\tif ( s.data && type === \"GET\" ) {\n\t\t\ts.url += (rquery.test(s.url) ? \"&\" : \"?\") + s.data;\n\t\t}\n\n\t\t// Watch for a new set of requests\n\t\tif ( s.global && ! jQuery.active++ ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Matches an absolute URL, and saves the domain\n\t\tvar parts = rurl.exec( s.url ),\n\t\t\tremote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);\n\n\t\t// If we're requesting a remote document\n\t\t// and trying to load JSON or Script with a GET\n\t\tif ( s.dataType === \"script\" && type === \"GET\" && remote ) {\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement;\n\t\t\tvar script = document.createElement(\"script\");\n\t\t\tscript.src = s.url;\n\t\t\tif ( s.scriptCharset ) {\n\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t}\n\n\t\t\t// Handle Script loading\n\t\t\tif ( !jsonp ) {\n\t\t\t\tvar done = false;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function() {\n\t\t\t\t\tif ( !done && (!this.readyState ||\n\t\t\t\t\t\t\tthis.readyState === \"loaded\" || this.readyState === \"complete\") ) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tsuccess();\n\t\t\t\t\t\tcomplete();\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\t\t\t\t\t\tif ( head && script.parentNode ) {\n\t\t\t\t\t\t\thead.removeChild( script );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Use insertBefore instead of appendChild  to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709 and #4378).\n\t\t\thead.insertBefore( script, head.firstChild );\n\n\t\t\t// We handle everything using the script element injection\n\t\t\treturn undefined;\n\t\t}\n\n\t\tvar requestDone = false;\n\n\t\t// Create the request object\n\t\tvar xhr = s.xhr();\n\n\t\tif ( !xhr ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Open the socket\n\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\tif ( s.username ) {\n\t\t\txhr.open(type, s.url, s.async, s.username, s.password);\n\t\t} else {\n\t\t\txhr.open(type, s.url, s.async);\n\t\t}\n\n\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\ttry {\n\t\t\t// Set the correct header, if data is being sent\n\t\t\tif ( s.data || origSettings && origSettings.contentType ) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", s.contentType);\n\t\t\t}\n\n\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\tif ( s.ifModified ) {\n\t\t\t\tif ( jQuery.lastModified[s.url] ) {\n\t\t\t\t\txhr.setRequestHeader(\"If-Modified-Since\", jQuery.lastModified[s.url]);\n\t\t\t\t}\n\n\t\t\t\tif ( jQuery.etag[s.url] ) {\n\t\t\t\t\txhr.setRequestHeader(\"If-None-Match\", jQuery.etag[s.url]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set header so the called script knows that it's an XMLHttpRequest\n\t\t\t// Only send the header if it's not a remote XHR\n\t\t\tif ( !remote ) {\n\t\t\t\txhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\t\t\t}\n\n\t\t\t// Set the Accepts header for the server, depending on the dataType\n\t\t\txhr.setRequestHeader(\"Accept\", s.dataType && s.accepts[ s.dataType ] ?\n\t\t\t\ts.accepts[ s.dataType ] + \", */*\" :\n\t\t\t\ts.accepts._default );\n\t\t} catch(e) {}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {\n\t\t\t// Handle the global AJAX counter\n\t\t\tif ( s.global && ! --jQuery.active ) {\n\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t}\n\n\t\t\t// close opended socket\n\t\t\txhr.abort();\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( s.global ) {\n\t\t\ttrigger(\"ajaxSend\", [xhr, s]);\n\t\t}\n\n\t\t// Wait for a response to come back\n\t\tvar onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {\n\t\t\t// The request was aborted\n\t\t\tif ( !xhr || xhr.readyState === 0 || isTimeout === \"abort\" ) {\n\t\t\t\t// Opera doesn't call onreadystatechange before this point\n\t\t\t\t// so we simulate the call\n\t\t\t\tif ( !requestDone ) {\n\t\t\t\t\tcomplete();\n\t\t\t\t}\n\n\t\t\t\trequestDone = true;\n\t\t\t\tif ( xhr ) {\n\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\t\t\t\t}\n\n\t\t\t// The transfer is complete and the data is available, or the request timed out\n\t\t\t} else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === \"timeout\") ) {\n\t\t\t\trequestDone = true;\n\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\n\t\t\t\tstatus = isTimeout === \"timeout\" ?\n\t\t\t\t\t\"timeout\" :\n\t\t\t\t\t!jQuery.httpSuccess( xhr ) ?\n\t\t\t\t\t\t\"error\" :\n\t\t\t\t\t\ts.ifModified && jQuery.httpNotModified( xhr, s.url ) ?\n\t\t\t\t\t\t\t\"notmodified\" :\n\t\t\t\t\t\t\t\"success\";\n\n\t\t\t\tvar errMsg;\n\n\t\t\t\tif ( status === \"success\" ) {\n\t\t\t\t\t// Watch for, and catch, XML document parse errors\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// process the data (runs the xml through httpData regardless of callback)\n\t\t\t\t\t\tdata = jQuery.httpData( xhr, s.dataType, s );\n\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\tstatus = \"parsererror\";\n\t\t\t\t\t\terrMsg = err;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Make sure that the request was successful or notmodified\n\t\t\t\tif ( status === \"success\" || status === \"notmodified\" ) {\n\t\t\t\t\t// JSONP handles its own success callback\n\t\t\t\t\tif ( !jsonp ) {\n\t\t\t\t\t\tsuccess();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.handleError(s, xhr, status, errMsg);\n\t\t\t\t}\n\n\t\t\t\t// Fire the complete handlers\n\t\t\t\tcomplete();\n\n\t\t\t\tif ( isTimeout === \"timeout\" ) {\n\t\t\t\t\txhr.abort();\n\t\t\t\t}\n\n\t\t\t\t// Stop memory leaks\n\t\t\t\tif ( s.async ) {\n\t\t\t\t\txhr = null;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Override the abort handler, if we can (IE doesn't allow it, but that's OK)\n\t\t// Opera doesn't fire onreadystatechange at all on abort\n\t\ttry {\n\t\t\tvar oldAbort = xhr.abort;\n\t\t\txhr.abort = function() {\n\t\t\t\tif ( xhr ) {\n\t\t\t\t\toldAbort.call( xhr );\n\t\t\t\t}\n\n\t\t\t\tonreadystatechange( \"abort\" );\n\t\t\t};\n\t\t} catch(e) { }\n\n\t\t// Timeout checker\n\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\tsetTimeout(function() {\n\t\t\t\t// Check to see if the request is still happening\n\t\t\t\tif ( xhr && !requestDone ) {\n\t\t\t\t\tonreadystatechange( \"timeout\" );\n\t\t\t\t}\n\t\t\t}, s.timeout);\n\t\t}\n\n\t\t// Send the data\n\t\ttry {\n\t\t\txhr.send( type === \"POST\" || type === \"PUT\" || type === \"DELETE\" ? s.data : null );\n\t\t} catch(e) {\n\t\t\tjQuery.handleError(s, xhr, null, e);\n\t\t\t// Fire the complete handlers\n\t\t\tcomplete();\n\t\t}\n\n\t\t// firefox 1.5 doesn't fire statechange for sync requests\n\t\tif ( !s.async ) {\n\t\t\tonreadystatechange();\n\t\t}\n\n\t\tfunction success() {\n\t\t\t// If a local callback was specified, fire it and pass it the data\n\t\t\tif ( s.success ) {\n\t\t\t\ts.success.call( callbackContext, data, status, xhr );\n\t\t\t}\n\n\t\t\t// Fire the global callback\n\t\t\tif ( s.global ) {\n\t\t\t\ttrigger( \"ajaxSuccess\", [xhr, s] );\n\t\t\t}\n\t\t}\n\n\t\tfunction complete() {\n\t\t\t// Process result\n\t\t\tif ( s.complete ) {\n\t\t\t\ts.complete.call( callbackContext, xhr, status);\n\t\t\t}\n\n\t\t\t// The request was completed\n\t\t\tif ( s.global ) {\n\t\t\t\ttrigger( \"ajaxComplete\", [xhr, s] );\n\t\t\t}\n\n\t\t\t// Handle the global AJAX counter\n\t\t\tif ( s.global && ! --jQuery.active ) {\n\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction trigger(type, args) {\n\t\t\t(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);\n\t\t}\n\n\t\t// return XMLHttpRequest to allow aborting the request etc.\n\t\treturn xhr;\n\t},\n\n\thandleError: function( s, xhr, status, e ) {\n\t\t// If a local callback was specified, fire it\n\t\tif ( s.error ) {\n\t\t\ts.error.call( s.context || s, xhr, status, e );\n\t\t}\n\n\t\t// Fire the global callback\n\t\tif ( s.global ) {\n\t\t\t(s.context ? jQuery(s.context) : jQuery.event).trigger( \"ajaxError\", [xhr, s, e] );\n\t\t}\n\t},\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Determines if an XMLHttpRequest was successful or not\n\thttpSuccess: function( xhr ) {\n\t\ttry {\n\t\t\t// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450\n\t\t\treturn !xhr.status && location.protocol === \"file:\" ||\n\t\t\t\t// Opera returns 0 when status is 304\n\t\t\t\t( xhr.status >= 200 && xhr.status < 300 ) ||\n\t\t\t\txhr.status === 304 || xhr.status === 1223 || xhr.status === 0;\n\t\t} catch(e) {}\n\n\t\treturn false;\n\t},\n\n\t// Determines if an XMLHttpRequest returns NotModified\n\thttpNotModified: function( xhr, url ) {\n\t\tvar lastModified = xhr.getResponseHeader(\"Last-Modified\"),\n\t\t\tetag = xhr.getResponseHeader(\"Etag\");\n\n\t\tif ( lastModified ) {\n\t\t\tjQuery.lastModified[url] = lastModified;\n\t\t}\n\n\t\tif ( etag ) {\n\t\t\tjQuery.etag[url] = etag;\n\t\t}\n\n\t\t// Opera returns 0 when status is 304\n\t\treturn xhr.status === 304 || xhr.status === 0;\n\t},\n\n\thttpData: function( xhr, type, s ) {\n\t\tvar ct = xhr.getResponseHeader(\"content-type\") || \"\",\n\t\t\txml = type === \"xml\" || !type && ct.indexOf(\"xml\") >= 0,\n\t\t\tdata = xml ? xhr.responseXML : xhr.responseText;\n\n\t\tif ( xml && data.documentElement.nodeName === \"parsererror\" ) {\n\t\t\tjQuery.error( \"parsererror\" );\n\t\t}\n\n\t\t// Allow a pre-filtering function to sanitize the response\n\t\t// s is checked to keep backwards compatibility\n\t\tif ( s && s.dataFilter ) {\n\t\t\tdata = s.dataFilter( data, type );\n\t\t}\n\n\t\t// The filter can actually parse the response\n\t\tif ( typeof data === \"string\" ) {\n\t\t\t// Get the JavaScript object, if JSON is used.\n\t\t\tif ( type === \"json\" || !type && ct.indexOf(\"json\") >= 0 ) {\n\t\t\t\tdata = jQuery.parseJSON( data );\n\n\t\t\t// If the type is \"script\", eval it in global context\n\t\t\t} else if ( type === \"script\" || !type && ct.indexOf(\"javascript\") >= 0 ) {\n\t\t\t\tjQuery.globalEval( data );\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t// Serialize an array of form elements or a set of\n\t// key/values into a query string\n\tparam: function( a, traditional ) {\n\t\tvar s = [];\n\t\t\n\t\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\t\tif ( traditional === undefined ) {\n\t\t\ttraditional = jQuery.ajaxSettings.traditional;\n\t\t}\n\t\t\n\t\t// If an array was passed in, assume that it is an array of form elements.\n\t\tif ( jQuery.isArray(a) || a.jquery ) {\n\t\t\t// Serialize the form elements\n\t\t\tjQuery.each( a, function() {\n\t\t\t\tadd( this.name, this.value );\n\t\t\t});\n\t\t\t\n\t\t} else {\n\t\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t\t// did it), otherwise encode params recursively.\n\t\t\tfor ( var prefix in a ) {\n\t\t\t\tbuildParams( prefix, a[prefix] );\n\t\t\t}\n\t\t}\n\n\t\t// Return the resulting serialization\n\t\treturn s.join(\"&\").replace(r20, \"+\");\n\n\t\tfunction buildParams( prefix, obj ) {\n\t\t\tif ( jQuery.isArray(obj) ) {\n\t\t\t\t// Serialize array item.\n\t\t\t\tjQuery.each( obj, function( i, v ) {\n\t\t\t\t\tif ( traditional ) {\n\t\t\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\t\t\tadd( prefix, v );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If array item is non-scalar (array or object), encode its\n\t\t\t\t\t\t// numeric index to resolve deserialization ambiguity issues.\n\t\t\t\t\t\t// Note that rack (as of 1.0.0) can't currently deserialize\n\t\t\t\t\t\t// nested arrays properly, and attempting to do so may cause\n\t\t\t\t\t\t// a server error. Possible fixes are to modify rack's\n\t\t\t\t\t\t// deserialization algorithm or to provide an option or flag\n\t\t\t\t\t\t// to force array serialization to be shallow.\n\t\t\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" || jQuery.isArray(v) ? i : \"\" ) + \"]\", v );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\t\n\t\t\t} else if ( !traditional && obj != null && typeof obj === \"object\" ) {\n\t\t\t\t// Serialize object item.\n\t\t\t\tjQuery.each( obj, function( k, v ) {\n\t\t\t\t\tbuildParams( prefix + \"[\" + k + \"]\", v );\n\t\t\t\t});\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Serialize scalar item.\n\t\t\t\tadd( prefix, obj );\n\t\t\t}\n\t\t}\n\n\t\tfunction add( key, value ) {\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction(value) ? value() : value;\n\t\t\ts[ s.length ] = encodeURIComponent(key) + \"=\" + encodeURIComponent(value);\n\t\t}\n\t}\n});\nvar elemdisplay = {},\n\trfxtypes = /toggle|show|hide/,\n\trfxnum = /^([+-]=)?([\\d+-.]+)(.*)$/,\n\ttimerId,\n\tfxAttrs = [\n\t\t// height animations\n\t\t[ \"height\", \"marginTop\", \"marginBottom\", \"paddingTop\", \"paddingBottom\" ],\n\t\t// width animations\n\t\t[ \"width\", \"marginLeft\", \"marginRight\", \"paddingLeft\", \"paddingRight\" ],\n\t\t// opacity animations\n\t\t[ \"opacity\" ]\n\t];\n\njQuery.fn.extend({\n\tshow: function( speed, callback ) {\n\t\tif ( speed || speed === 0) {\n\t\t\treturn this.animate( genFx(\"show\", 3), speed, callback);\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar old = jQuery.data(this[i], \"olddisplay\");\n\n\t\t\t\tthis[i].style.display = old || \"\";\n\n\t\t\t\tif ( jQuery.css(this[i], \"display\") === \"none\" ) {\n\t\t\t\t\tvar nodeName = this[i].nodeName, display;\n\n\t\t\t\t\tif ( elemdisplay[ nodeName ] ) {\n\t\t\t\t\t\tdisplay = elemdisplay[ nodeName ];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar elem = jQuery(\"<\" + nodeName + \" />\").appendTo(\"body\");\n\n\t\t\t\t\t\tdisplay = elem.css(\"display\");\n\n\t\t\t\t\t\tif ( display === \"none\" ) {\n\t\t\t\t\t\t\tdisplay = \"block\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telem.remove();\n\n\t\t\t\t\t\telemdisplay[ nodeName ] = display;\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.data(this[i], \"olddisplay\", display);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( var j = 0, k = this.length; j < k; j++ ) {\n\t\t\t\tthis[j].style.display = jQuery.data(this[j], \"olddisplay\") || \"\";\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\thide: function( speed, callback ) {\n\t\tif ( speed || speed === 0 ) {\n\t\t\treturn this.animate( genFx(\"hide\", 3), speed, callback);\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar old = jQuery.data(this[i], \"olddisplay\");\n\t\t\t\tif ( !old && old !== \"none\" ) {\n\t\t\t\t\tjQuery.data(this[i], \"olddisplay\", jQuery.css(this[i], \"display\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( var j = 0, k = this.length; j < k; j++ ) {\n\t\t\t\tthis[j].style.display = \"none\";\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\t// Save the old toggle function\n\t_toggle: jQuery.fn.toggle,\n\n\ttoggle: function( fn, fn2 ) {\n\t\tvar bool = typeof fn === \"boolean\";\n\n\t\tif ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {\n\t\t\tthis._toggle.apply( this, arguments );\n\n\t\t} else if ( fn == null || bool ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar state = bool ? fn : jQuery(this).is(\":hidden\");\n\t\t\t\tjQuery(this)[ state ? \"show\" : \"hide\" ]();\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.animate(genFx(\"toggle\", 3), fn, fn2);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tfadeTo: function( speed, to, callback ) {\n\t\treturn this.filter(\":hidden\").css(\"opacity\", 0).show().end()\n\t\t\t\t\t.animate({opacity: to}, speed, callback);\n\t},\n\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar optall = jQuery.speed(speed, easing, callback);\n\n\t\tif ( jQuery.isEmptyObject( prop ) ) {\n\t\t\treturn this.each( optall.complete );\n\t\t}\n\n\t\treturn this[ optall.queue === false ? \"each\" : \"queue\" ](function() {\n\t\t\tvar opt = jQuery.extend({}, optall), p,\n\t\t\t\thidden = this.nodeType === 1 && jQuery(this).is(\":hidden\"),\n\t\t\t\tself = this;\n\n\t\t\tfor ( p in prop ) {\n\t\t\t\tvar name = p.replace(rdashAlpha, fcamelCase);\n\n\t\t\t\tif ( p !== name ) {\n\t\t\t\t\tprop[ name ] = prop[ p ];\n\t\t\t\t\tdelete prop[ p ];\n\t\t\t\t\tp = name;\n\t\t\t\t}\n\n\t\t\t\tif ( prop[p] === \"hide\" && hidden || prop[p] === \"show\" && !hidden ) {\n\t\t\t\t\treturn opt.complete.call(this);\n\t\t\t\t}\n\n\t\t\t\tif ( ( p === \"height\" || p === \"width\" ) && this.style ) {\n\t\t\t\t\t// Store display property\n\t\t\t\t\topt.display = jQuery.css(this, \"display\");\n\n\t\t\t\t\t// Make sure that nothing sneaks out\n\t\t\t\t\topt.overflow = this.style.overflow;\n\t\t\t\t}\n\n\t\t\t\tif ( jQuery.isArray( prop[p] ) ) {\n\t\t\t\t\t// Create (if needed) and add to specialEasing\n\t\t\t\t\t(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];\n\t\t\t\t\tprop[p] = prop[p][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( opt.overflow != null ) {\n\t\t\t\tthis.style.overflow = \"hidden\";\n\t\t\t}\n\n\t\t\topt.curAnim = jQuery.extend({}, prop);\n\n\t\t\tjQuery.each( prop, function( name, val ) {\n\t\t\t\tvar e = new jQuery.fx( self, opt, name );\n\n\t\t\t\tif ( rfxtypes.test(val) ) {\n\t\t\t\t\te[ val === \"toggle\" ? hidden ? \"show\" : \"hide\" : val ]( prop );\n\n\t\t\t\t} else {\n\t\t\t\t\tvar parts = rfxnum.exec(val),\n\t\t\t\t\t\tstart = e.cur(true) || 0;\n\n\t\t\t\t\tif ( parts ) {\n\t\t\t\t\t\tvar end = parseFloat( parts[2] ),\n\t\t\t\t\t\t\tunit = parts[3] || \"px\";\n\n\t\t\t\t\t\t// We need to compute starting value\n\t\t\t\t\t\tif ( unit !== \"px\" ) {\n\t\t\t\t\t\t\tself.style[ name ] = (end || 1) + unit;\n\t\t\t\t\t\t\tstart = ((end || 1) / e.cur(true)) * start;\n\t\t\t\t\t\t\tself.style[ name ] = start + unit;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\t\t\tif ( parts[1] ) {\n\t\t\t\t\t\t\tend = ((parts[1] === \"-=\" ? -1 : 1) * end) + start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\te.custom( start, end, unit );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.custom( start, val, \"\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// For JS strict compliance\n\t\t\treturn true;\n\t\t});\n\t},\n\n\tstop: function( clearQueue, gotoEnd ) {\n\t\tvar timers = jQuery.timers;\n\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue([]);\n\t\t}\n\n\t\tthis.each(function() {\n\t\t\t// go in reverse order so anything added to the queue during the loop is ignored\n\t\t\tfor ( var i = timers.length - 1; i >= 0; i-- ) {\n\t\t\t\tif ( timers[i].elem === this ) {\n\t\t\t\t\tif (gotoEnd) {\n\t\t\t\t\t\t// force the next step to be the last\n\t\t\t\t\t\ttimers[i](true);\n\t\t\t\t\t}\n\n\t\t\t\t\ttimers.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// start the next in the queue if the last step wasn't forced\n\t\tif ( !gotoEnd ) {\n\t\t\tthis.dequeue();\n\t\t}\n\n\t\treturn this;\n\t}\n\n});\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx(\"show\", 1),\n\tslideUp: genFx(\"hide\", 1),\n\tslideToggle: genFx(\"toggle\", 1),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, callback ) {\n\t\treturn this.animate( props, speed, callback );\n\t};\n});\n\njQuery.extend({\n\tspeed: function( speed, easing, fn ) {\n\t\tvar opt = speed && typeof speed === \"object\" ? speed : {\n\t\t\tcomplete: fn || !fn && easing ||\n\t\t\t\tjQuery.isFunction( speed ) && speed,\n\t\t\tduration: speed,\n\t\t\teasing: fn && easing || easing && !jQuery.isFunction(easing) && easing\n\t\t};\n\n\t\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\t\tjQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;\n\n\t\t// Queueing\n\t\topt.old = opt.complete;\n\t\topt.complete = function() {\n\t\t\tif ( opt.queue !== false ) {\n\t\t\t\tjQuery(this).dequeue();\n\t\t\t}\n\t\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\t\topt.old.call( this );\n\t\t\t}\n\t\t};\n\n\t\treturn opt;\n\t},\n\n\teasing: {\n\t\tlinear: function( p, n, firstNum, diff ) {\n\t\t\treturn firstNum + diff * p;\n\t\t},\n\t\tswing: function( p, n, firstNum, diff ) {\n\t\t\treturn ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;\n\t\t}\n\t},\n\n\ttimers: [],\n\n\tfx: function( elem, options, prop ) {\n\t\tthis.options = options;\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\n\t\tif ( !options.orig ) {\n\t\t\toptions.orig = {};\n\t\t}\n\t}\n\n});\n\njQuery.fx.prototype = {\n\t// Simple function for setting a style value\n\tupdate: function() {\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\t(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );\n\n\t\t// Set display property to block for height/width animations\n\t\tif ( ( this.prop === \"height\" || this.prop === \"width\" ) && this.elem.style ) {\n\t\t\tthis.elem.style.display = \"block\";\n\t\t}\n\t},\n\n\t// Get the current size\n\tcur: function( force ) {\n\t\tif ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {\n\t\t\treturn this.elem[ this.prop ];\n\t\t}\n\n\t\tvar r = parseFloat(jQuery.css(this.elem, this.prop, force));\n\t\treturn r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;\n\t},\n\n\t// Start an animation from one number to another\n\tcustom: function( from, to, unit ) {\n\t\tthis.startTime = now();\n\t\tthis.start = from;\n\t\tthis.end = to;\n\t\tthis.unit = unit || this.unit || \"px\";\n\t\tthis.now = this.start;\n\t\tthis.pos = this.state = 0;\n\n\t\tvar self = this;\n\t\tfunction t( gotoEnd ) {\n\t\t\treturn self.step(gotoEnd);\n\t\t}\n\n\t\tt.elem = this.elem;\n\n\t\tif ( t() && jQuery.timers.push(t) && !timerId ) {\n\t\t\ttimerId = setInterval(jQuery.fx.tick, 13);\n\t\t}\n\t},\n\n\t// Simple 'show' function\n\tshow: function() {\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.style( this.elem, this.prop );\n\t\tthis.options.show = true;\n\n\t\t// Begin the animation\n\t\t// Make sure that we start at a small width/height to avoid any\n\t\t// flash of content\n\t\tthis.custom(this.prop === \"width\" || this.prop === \"height\" ? 1 : 0, this.cur());\n\n\t\t// Start by showing the element\n\t\tjQuery( this.elem ).show();\n\t},\n\n\t// Simple 'hide' function\n\thide: function() {\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.style( this.elem, this.prop );\n\t\tthis.options.hide = true;\n\n\t\t// Begin the animation\n\t\tthis.custom(this.cur(), 0);\n\t},\n\n\t// Each step of an animation\n\tstep: function( gotoEnd ) {\n\t\tvar t = now(), done = true;\n\n\t\tif ( gotoEnd || t >= this.options.duration + this.startTime ) {\n\t\t\tthis.now = this.end;\n\t\t\tthis.pos = this.state = 1;\n\t\t\tthis.update();\n\n\t\t\tthis.options.curAnim[ this.prop ] = true;\n\n\t\t\tfor ( var i in this.options.curAnim ) {\n\t\t\t\tif ( this.options.curAnim[i] !== true ) {\n\t\t\t\t\tdone = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( done ) {\n\t\t\t\tif ( this.options.display != null ) {\n\t\t\t\t\t// Reset the overflow\n\t\t\t\t\tthis.elem.style.overflow = this.options.overflow;\n\n\t\t\t\t\t// Reset the display\n\t\t\t\t\tvar old = jQuery.data(this.elem, \"olddisplay\");\n\t\t\t\t\tthis.elem.style.display = old ? old : this.options.display;\n\n\t\t\t\t\tif ( jQuery.css(this.elem, \"display\") === \"none\" ) {\n\t\t\t\t\t\tthis.elem.style.display = \"block\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Hide the element if the \"hide\" operation was done\n\t\t\t\tif ( this.options.hide ) {\n\t\t\t\t\tjQuery(this.elem).hide();\n\t\t\t\t}\n\n\t\t\t\t// Reset the properties, if the item has been hidden or shown\n\t\t\t\tif ( this.options.hide || this.options.show ) {\n\t\t\t\t\tfor ( var p in this.options.curAnim ) {\n\t\t\t\t\t\tjQuery.style(this.elem, p, this.options.orig[p]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Execute the complete function\n\t\t\t\tthis.options.complete.call( this.elem );\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t} else {\n\t\t\tvar n = t - this.startTime;\n\t\t\tthis.state = n / this.options.duration;\n\n\t\t\t// Perform the easing function, defaults to swing\n\t\t\tvar specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];\n\t\t\tvar defaultEasing = this.options.easing || (jQuery.easing.swing ? \"swing\" : \"linear\");\n\t\t\tthis.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);\n\t\t\tthis.now = this.start + ((this.end - this.start) * this.pos);\n\n\t\t\t// Perform the next step of the animation\n\t\t\tthis.update();\n\t\t}\n\n\t\treturn true;\n\t}\n};\n\njQuery.extend( jQuery.fx, {\n\ttick: function() {\n\t\tvar timers = jQuery.timers;\n\n\t\tfor ( var i = 0; i < timers.length; i++ ) {\n\t\t\tif ( !timers[i]() ) {\n\t\t\t\ttimers.splice(i--, 1);\n\t\t\t}\n\t\t}\n\n\t\tif ( !timers.length ) {\n\t\t\tjQuery.fx.stop();\n\t\t}\n\t},\n\t\t\n\tstop: function() {\n\t\tclearInterval( timerId );\n\t\ttimerId = null;\n\t},\n\t\n\tspeeds: {\n\t\tslow: 600,\n \t\tfast: 200,\n \t\t// Default speed\n \t\t_default: 400\n\t},\n\n\tstep: {\n\t\topacity: function( fx ) {\n\t\t\tjQuery.style(fx.elem, \"opacity\", fx.now);\n\t\t},\n\n\t\t_default: function( fx ) {\n\t\t\tif ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {\n\t\t\t\tfx.elem.style[ fx.prop ] = (fx.prop === \"width\" || fx.prop === \"height\" ? Math.max(0, fx.now) : fx.now) + fx.unit;\n\t\t\t} else {\n\t\t\t\tfx.elem[ fx.prop ] = fx.now;\n\t\t\t}\n\t\t}\n\t}\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.animated = function( elem ) {\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\t\treturn elem === fn.elem;\n\t\t}).length;\n\t};\n}\n\nfunction genFx( type, num ) {\n\tvar obj = {};\n\n\tjQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {\n\t\tobj[ this ] = type;\n\t});\n\n\treturn obj;\n}\nif ( \"getBoundingClientRect\" in document.documentElement ) {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0];\n\n\t\tif ( options ) { \n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\tvar box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,\n\t\t\tclientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,\n\t\t\ttop  = box.top  + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,\n\t\t\tleft = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;\n\n\t\treturn { top: top, left: left };\n\t};\n\n} else {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0];\n\n\t\tif ( options ) { \n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\tjQuery.offset.initialize();\n\n\t\tvar offsetParent = elem.offsetParent, prevOffsetParent = elem,\n\t\t\tdoc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,\n\t\t\tbody = doc.body, defaultView = doc.defaultView,\n\t\t\tprevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,\n\t\t\ttop = elem.offsetTop, left = elem.offsetLeft;\n\n\t\twhile ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {\n\t\t\tif ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcomputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;\n\t\t\ttop  -= elem.scrollTop;\n\t\t\tleft -= elem.scrollLeft;\n\n\t\t\tif ( elem === offsetParent ) {\n\t\t\t\ttop  += elem.offsetTop;\n\t\t\t\tleft += elem.offsetLeft;\n\n\t\t\t\tif ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {\n\t\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t\t}\n\n\t\t\t\tprevOffsetParent = offsetParent, offsetParent = elem.offsetParent;\n\t\t\t}\n\n\t\t\tif ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== \"visible\" ) {\n\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t}\n\n\t\t\tprevComputedStyle = computedStyle;\n\t\t}\n\n\t\tif ( prevComputedStyle.position === \"relative\" || prevComputedStyle.position === \"static\" ) {\n\t\t\ttop  += body.offsetTop;\n\t\t\tleft += body.offsetLeft;\n\t\t}\n\n\t\tif ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\ttop  += Math.max( docElem.scrollTop, body.scrollTop );\n\t\t\tleft += Math.max( docElem.scrollLeft, body.scrollLeft );\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t};\n}\n\njQuery.offset = {\n\tinitialize: function() {\n\t\tvar body = document.body, container = document.createElement(\"div\"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, \"marginTop\", true) ) || 0,\n\t\t\thtml = \"<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>\";\n\n\t\tjQuery.extend( container.style, { position: \"absolute\", top: 0, left: 0, margin: 0, border: 0, width: \"1px\", height: \"1px\", visibility: \"hidden\" } );\n\n\t\tcontainer.innerHTML = html;\n\t\tbody.insertBefore( container, body.firstChild );\n\t\tinnerDiv = container.firstChild;\n\t\tcheckDiv = innerDiv.firstChild;\n\t\ttd = innerDiv.nextSibling.firstChild.firstChild;\n\n\t\tthis.doesNotAddBorder = (checkDiv.offsetTop !== 5);\n\t\tthis.doesAddBorderForTableAndCells = (td.offsetTop === 5);\n\n\t\tcheckDiv.style.position = \"fixed\", checkDiv.style.top = \"20px\";\n\t\t// safari subtracts parent border width here which is 5px\n\t\tthis.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);\n\t\tcheckDiv.style.position = checkDiv.style.top = \"\";\n\n\t\tinnerDiv.style.overflow = \"hidden\", innerDiv.style.position = \"relative\";\n\t\tthis.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);\n\n\t\tthis.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);\n\n\t\tbody.removeChild( container );\n\t\tbody = container = innerDiv = checkDiv = table = td = null;\n\t\tjQuery.offset.initialize = jQuery.noop;\n\t},\n\n\tbodyOffset: function( body ) {\n\t\tvar top = body.offsetTop, left = body.offsetLeft;\n\n\t\tjQuery.offset.initialize();\n\n\t\tif ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {\n\t\t\ttop  += parseFloat( jQuery.curCSS(body, \"marginTop\",  true) ) || 0;\n\t\t\tleft += parseFloat( jQuery.curCSS(body, \"marginLeft\", true) ) || 0;\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t},\n\t\n\tsetOffset: function( elem, options, i ) {\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( /static/.test( jQuery.curCSS( elem, \"position\" ) ) ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\t\tvar curElem   = jQuery( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurTop    = parseInt( jQuery.curCSS( elem, \"top\",  true ), 10 ) || 0,\n\t\t\tcurLeft   = parseInt( jQuery.curCSS( elem, \"left\", true ), 10 ) || 0;\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tvar props = {\n\t\t\ttop:  (options.top  - curOffset.top)  + curTop,\n\t\t\tleft: (options.left - curOffset.left) + curLeft\n\t\t};\n\t\t\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\n\njQuery.fn.extend({\n\tposition: function() {\n\t\tif ( !this[0] ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar elem = this[0],\n\n\t\t// Get *real* offsetParent\n\t\toffsetParent = this.offsetParent(),\n\n\t\t// Get correct offsets\n\t\toffset       = this.offset(),\n\t\tparentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();\n\n\t\t// Subtract element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\toffset.top  -= parseFloat( jQuery.curCSS(elem, \"marginTop\",  true) ) || 0;\n\t\toffset.left -= parseFloat( jQuery.curCSS(elem, \"marginLeft\", true) ) || 0;\n\n\t\t// Add offsetParent borders\n\t\tparentOffset.top  += parseFloat( jQuery.curCSS(offsetParent[0], \"borderTopWidth\",  true) ) || 0;\n\t\tparentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], \"borderLeftWidth\", true) ) || 0;\n\n\t\t// Subtract the two offsets\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top,\n\t\t\tleft: offset.left - parentOffset.left\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || document.body;\n\t\t\twhile ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, \"position\") === \"static\") ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent;\n\t\t});\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( [\"Left\", \"Top\"], function( i, name ) {\n\tvar method = \"scroll\" + name;\n\n\tjQuery.fn[ method ] = function(val) {\n\t\tvar elem = this[0], win;\n\t\t\n\t\tif ( !elem ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( val !== undefined ) {\n\t\t\t// Set the scroll offset\n\t\t\treturn this.each(function() {\n\t\t\t\twin = getWindow( this );\n\n\t\t\t\tif ( win ) {\n\t\t\t\t\twin.scrollTo(\n\t\t\t\t\t\t!i ? val : jQuery(win).scrollLeft(),\n\t\t\t\t\t\t i ? val : jQuery(win).scrollTop()\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\t\t\t\t\tthis[ method ] = val;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\twin = getWindow( elem );\n\n\t\t\t// Return the scroll offset\n\t\t\treturn win ? (\"pageXOffset\" in win) ? win[ i ? \"pageYOffset\" : \"pageXOffset\" ] :\n\t\t\t\tjQuery.support.boxModel && win.document.documentElement[ method ] ||\n\t\t\t\t\twin.document.body[ method ] :\n\t\t\t\telem[ method ];\n\t\t}\n\t};\n});\n\nfunction getWindow( elem ) {\n\treturn (\"scrollTo\" in elem && elem.document) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n// Create innerHeight, innerWidth, outerHeight and outerWidth methods\njQuery.each([ \"Height\", \"Width\" ], function( i, name ) {\n\n\tvar type = name.toLowerCase();\n\n\t// innerHeight and innerWidth\n\tjQuery.fn[\"inner\" + name] = function() {\n\t\treturn this[0] ?\n\t\t\tjQuery.css( this[0], type, false, \"padding\" ) :\n\t\t\tnull;\n\t};\n\n\t// outerHeight and outerWidth\n\tjQuery.fn[\"outer\" + name] = function( margin ) {\n\t\treturn this[0] ?\n\t\t\tjQuery.css( this[0], type, false, margin ? \"margin\" : \"border\" ) :\n\t\t\tnull;\n\t};\n\n\tjQuery.fn[ type ] = function( size ) {\n\t\t// Get window width or height\n\t\tvar elem = this[0];\n\t\tif ( !elem ) {\n\t\t\treturn size == null ? null : this;\n\t\t}\n\t\t\n\t\tif ( jQuery.isFunction( size ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tvar self = jQuery( this );\n\t\t\t\tself[ type ]( size.call( this, i, self[ type ]() ) );\n\t\t\t});\n\t\t}\n\n\t\treturn (\"scrollTo\" in elem && elem.document) ? // does it walk and quack like a window?\n\t\t\t// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode\n\t\t\telem.document.compatMode === \"CSS1Compat\" && elem.document.documentElement[ \"client\" + name ] ||\n\t\t\telem.document.body[ \"client\" + name ] :\n\n\t\t\t// Get document width or height\n\t\t\t(elem.nodeType === 9) ? // is it a document\n\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n\t\t\t\tMath.max(\n\t\t\t\t\telem.documentElement[\"client\" + name],\n\t\t\t\t\telem.body[\"scroll\" + name], elem.documentElement[\"scroll\" + name],\n\t\t\t\t\telem.body[\"offset\" + name], elem.documentElement[\"offset\" + name]\n\t\t\t\t) :\n\n\t\t\t\t// Get or set width or height on the element\n\t\t\t\tsize === undefined ?\n\t\t\t\t\t// Get width or height on the element\n\t\t\t\t\tjQuery.css( elem, type ) :\n\n\t\t\t\t\t// Set the width or height on the element (default to pixels if value is unitless)\n\t\t\t\t\tthis.css( type, typeof size === \"string\" ? size : size + \"px\" );\n\t};\n\n});\n// Expose jQuery to the global object\nwindow.jQuery = window.$ = jQuery;\n\n})(window);"
  },
  {
    "path": "debug_toolbar/media/debug_toolbar/js/toolbar.js",
    "content": "window.djdt = (function(window, document, jQuery) {\n\tjQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = $.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };\n\tvar $ = jQuery;\n\tvar COOKIE_NAME = 'djdt';\n\tvar djdt = {\n\t\tjQuery: jQuery,\n\t\tevents: {\n\t\t\tready: []\n\t\t},\n\t\tisReady: false,\n\t\tinit: function() {\n\t\t\t$('#djDebug').show();\n\t\t\tvar current = null;\n\t\t\t$('#djDebugPanelList li a').click(function() {\n\t\t\t\tif (!this.className) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcurrent = $('#djDebug #' + this.className);\n\t\t\t\tif (current.is(':visible')) {\n\t\t\t\t    $(document).trigger('close.djDebug');\n\t\t\t\t\t$(this).parent().removeClass('active');\n\t\t\t\t} else {\n\t\t\t\t\t$('.panelContent').hide(); // Hide any that are already open\n\t\t\t\t\tcurrent.show();\n\t\t\t\t\t$('#djDebugToolbar li').removeClass('active');\n\t\t\t\t\t$(this).parent().addClass('active');\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$('#djDebug a.djDebugClose').click(function() {\n\t\t\t\t$(document).trigger('close.djDebug');\n\t\t\t\t$('#djDebugToolbar li').removeClass('active');\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$('#djDebug a.remoteCall').click(function() {\n\t\t\t\t$('#djDebugWindow').load(this.href, function(response, status, xhr) {\n\t\t\t\t\tif (status == \"error\") {\n\t\t\t\t\t\tvar message = '<div class=\"djDebugPanelTitle\"><a class=\"djDebugClose djDebugBack\" href=\"\">Back</a><h3>'+xhr.status+': '+xhr.statusText+'</h3></div>';\n\t\t\t\t\t\t$('#djDebugWindow').html(message);\n\t\t\t\t\t}\n\t\t\t\t\t$('#djDebugWindow a.djDebugBack').click(function() {\n\t\t\t\t\t\t$(this).parent().parent().hide();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t$('#djDebugWindow').show();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$('#djDebugTemplatePanel a.djTemplateShowContext').click(function() {\n\t\t\t\tdjdt.toggle_arrow($(this).children('.toggleArrow'));\n\t\t\t\tdjdt.toggle_content($(this).parent().next());\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$('#djDebug a.djToggleSwitch').click(function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar btn = $(this);\n\t\t\t\tvar id = btn.attr('data-toggle-id');\n\t\t\t\tvar open_me = btn.text() == btn.attr('data-toggle-open');\n\t\t\t\tif (id == '' || !id) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$(this).parents('.djDebugPanelContent').find('.djToggleDetails_' + id).each(function(){\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tif (open_me) {\n\t\t\t\t\t\t$this.addClass('djSelected');\n\t\t\t\t\t\t$this.removeClass('djUnselected');\n\t\t\t\t\t\tbtn.text(btn.attr('data-toggle-close'));\n\t\t\t\t\t\t$this.find('.djToggleSwitch').text(btn.text());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.removeClass('djSelected');\n\t\t\t\t\t\t$this.addClass('djUnselected');\n\t\t\t\t\t\tbtn.text(btn.attr('data-toggle-open'));\n\t\t\t\t\t\t$this.find('.djToggleSwitch').text(btn.text());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t});\n\t\t\tfunction getSubcalls(row) {\n\t\t\t  id = row.attr('id');\n\t\t\t  return $('.djDebugProfileRow[id^=\"'+id+'_\"]');\n\t\t\t}\n\t\t\tfunction getDirectSubcalls(row) {\n\t\t\t  subcalls = getSubcalls(row);\n\t\t\t  depth = parseInt(row.attr('depth')) + 1;\n\t\t\t  return subcalls.filter('[depth='+depth+']');\n\t\t\t}\n\t\t\t$('.djDebugProfileRow .djDebugProfileToggle').click(function(){\n\t\t\t  row = $(this).closest('.djDebugProfileRow')\n\t\t\t  subcalls = getSubcalls(row);\n\t\t\t  if (subcalls.css('display')=='none') {\n\t\t\t    getDirectSubcalls(row).show();\n\t\t\t  } else {\n\t\t\t    subcalls.hide();\n\t\t\t  }\n\t\t\t});\n\t\t\t$('#djHideToolBarButton').click(function() {\n\t\t\t\tdjdt.hide_toolbar(true);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$('#djShowToolBarButton').click(function() {\n\t\t\t\tdjdt.show_toolbar();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$(document).bind('close.djDebug', function() {\n\t\t\t\t// If a sub-panel is open, close that\n\t\t\t\tif ($('#djDebugWindow').is(':visible')) {\n\t\t\t\t\t$('#djDebugWindow').hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// If a panel is open, close that\n\t\t\t\tif ($('.panelContent').is(':visible')) {\n\t\t\t\t\t$('.panelContent').hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Otherwise, just minimize the toolbar\n\t\t\t\tif ($('#djDebugToolbar').is(':visible')) {\n\t\t\t\t\tdjdt.hide_toolbar(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif ($.cookie(COOKIE_NAME)) {\n\t\t\t\tdjdt.hide_toolbar(false);\n\t\t\t} else {\n\t\t\t\tdjdt.show_toolbar(false);\n\t\t\t}\n\t\t\t$('#djDebug .djDebugHoverable').hover(function(){\n\t\t\t\t$(this).addClass('djDebugHover');\n\t\t\t}, function(){\n\t\t\t    $(this).removeClass('djDebugHover');\n\t\t\t});\n\t\t\tdjdt.isReady = true;\n\t\t\t$.each(djdt.events.ready, function(_, callback){\n\t\t\t    callback(djdt);\n\t\t\t});\n\t\t},\n\t\ttoggle_content: function(elem) {\n\t\t\tif (elem.is(':visible')) {\n\t\t\t\telem.hide();\n\t\t\t} else {\n\t\t\t\telem.show();\n\t\t\t}\n\t\t},\n\t\tclose: function() {\n\t\t\t$(document).trigger('close.djDebug');\n\t\t\treturn false;\n\t\t},\n\t\thide_toolbar: function(setCookie) {\n\t\t\t// close any sub panels\n\t\t\t$('#djDebugWindow').hide();\n\t\t\t// close all panels\n\t\t\t$('.panelContent').hide();\n\t\t\t$('#djDebugToolbar li').removeClass('active');\n\t\t\t// finally close toolbar\n\t\t\t$('#djDebugToolbar').hide('fast');\n\t\t\t$('#djDebugToolbarHandle').show();\n\t\t\t// Unbind keydown\n\t\t\t$(document).unbind('keydown.djDebug');\n\t\t\tif (setCookie) {\n\t\t\t\t$.cookie(COOKIE_NAME, 'hide', {\n\t\t\t\t\tpath: '/',\n\t\t\t\t\texpires: 10\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tshow_toolbar: function(animate) {\n\t\t\t// Set up keybindings\n\t\t\t$(document).bind('keydown.djDebug', function(e) {\n\t\t\t\tif (e.keyCode == 27) {\n\t\t\t\t\tdjdt.close();\n\t\t\t\t}\n\t\t\t});\n\t\t\t$('#djDebugToolbarHandle').hide();\n\t\t\tif (animate) {\n\t\t\t\t$('#djDebugToolbar').show('fast');\n\t\t\t} else {\n\t\t\t\t$('#djDebugToolbar').show();\n\t\t\t}\n\t\t\t$.cookie(COOKIE_NAME, null, {\n\t\t\t\tpath: '/',\n\t\t\t\texpires: -1\n\t\t\t});\n\t\t},\n\t\ttoggle_arrow: function(elem) {\n\t\t\tvar uarr = String.fromCharCode(0x25b6);\n\t\t\tvar darr = String.fromCharCode(0x25bc);\n\t\t\telem.html(elem.html() == uarr ? darr : uarr);\n\t\t},\n\t\tready: function(callback){\n\t\t\tif (djdt.isReady) {\n\t\t\t\tcallback(djdt);\n\t\t\t} else {\n\t\t\t\tdjdt.events.ready.push(callback);\n\t\t\t}\n\t\t}\n\t};\n\t$(document).ready(function() {\n\t\tdjdt.init();\n\t});\n\treturn djdt;\n}(window, document, jQuery.noConflict()));\n"
  },
  {
    "path": "debug_toolbar/middleware.py",
    "content": "\"\"\"\nDebug Toolbar middleware\n\"\"\"\nimport thread\n\nfrom django.conf import settings\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render_to_response\nfrom django.utils.encoding import smart_unicode\nfrom django.conf.urls.defaults import include, patterns\n\nimport debug_toolbar.urls\nfrom debug_toolbar.toolbar.loader import DebugToolbar\n\n_HTML_TYPES = ('text/html', 'application/xhtml+xml')\n\ndef replace_insensitive(string, target, replacement):\n    \"\"\"\n    Similar to string.replace() but is case insensitive\n    Code borrowed from: http://forums.devshed.com/python-programming-11/case-insensitive-string-replace-490921.html\n    \"\"\"\n    no_case = string.lower()\n    index = no_case.rfind(target.lower())\n    if index >= 0:\n        return string[:index] + replacement + string[index + len(target):]\n    else: # no results so return the original string\n        return string\n\nclass DebugToolbarMiddleware(object):\n    \"\"\"\n    Middleware to set up Debug Toolbar on incoming request and render toolbar\n    on outgoing response.\n    \"\"\"\n    debug_toolbars = {}\n    \n    @classmethod\n    def get_current(cls):\n        return cls.debug_toolbars.get(thread.get_ident())\n\n    def __init__(self):\n        self.override_url = True\n\n        # Set method to use to decide to show toolbar\n        self.show_toolbar = self._show_toolbar # default\n\n        # The tag to attach the toolbar to\n        self.tag= u'</body>'\n\n        if hasattr(settings, 'DEBUG_TOOLBAR_CONFIG'):\n            show_toolbar_callback = settings.DEBUG_TOOLBAR_CONFIG.get(\n                'SHOW_TOOLBAR_CALLBACK', None)\n            if show_toolbar_callback:\n                self.show_toolbar = show_toolbar_callback\n\n            tag = settings.DEBUG_TOOLBAR_CONFIG.get('TAG', None)\n            if tag:\n                self.tag = u'</' + tag + u'>'\n\n    def _show_toolbar(self, request):\n        x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR', None)\n        if x_forwarded_for:\n            remote_addr = x_forwarded_for.split(',')[0].strip()\n        else:\n            remote_addr = request.META.get('REMOTE_ADDR', None)\n        if not remote_addr in settings.INTERNAL_IPS \\\n            or (request.is_ajax() and \\\n                not debug_toolbar.urls._PREFIX in request.path) \\\n                    or not (settings.DEBUG or getattr(settings, 'TEST', False)):\n            return False\n        return True\n\n    def process_request(self, request):\n        if self.show_toolbar(request):\n            if self.override_url:\n                original_urlconf = __import__(getattr(request, 'urlconf', settings.ROOT_URLCONF), {}, {}, ['*'])\n                debug_toolbar.urls.urlpatterns += patterns('',\n                    ('', include(original_urlconf)),\n                )\n                if hasattr(original_urlconf, 'handler404'):\n                    debug_toolbar.urls.handler404 = original_urlconf.handler404\n                if hasattr(original_urlconf, 'handler500'):\n                    debug_toolbar.urls.handler500 = original_urlconf.handler500\n                self.override_url = False\n            request.urlconf = 'debug_toolbar.urls'\n\n            toolbar = DebugToolbar(request)\n            for panel in toolbar.panels:\n                panel.process_request(request)\n            self.__class__.debug_toolbars[thread.get_ident()] = toolbar\n\n    def process_view(self, request, view_func, view_args, view_kwargs):\n        toolbar = self.__class__.debug_toolbars.get(thread.get_ident())\n        if not toolbar:\n            return\n        for panel in toolbar.panels:\n            panel.process_view(request, view_func, view_args, view_kwargs)\n\n    def process_response(self, request, response):\n        ident = thread.get_ident()\n        toolbar = self.__class__.debug_toolbars.get(ident)\n        if not toolbar:\n            return response\n        if toolbar.config['INTERCEPT_REDIRECTS']:\n            if isinstance(response, HttpResponseRedirect):\n                redirect_to = response.get('Location', None)\n                if redirect_to:\n                    cookies = response.cookies\n                    response = render_to_response(\n                        'debug_toolbar/redirect.html',\n                        {'redirect_to': redirect_to}\n                    )\n                    response.cookies = cookies\n        if response.status_code == 200 and 'gzip' not in response.get('Content-Encoding', '') and \\\n           response['Content-Type'].split(';')[0] in _HTML_TYPES:\n            for panel in toolbar.panels:\n                panel.process_response(request, response)\n            response.content = replace_insensitive(\n                smart_unicode(response.content), \n                self.tag,\n                smart_unicode(toolbar.render_toolbar() + self.tag))\n            if response.get('Content-Length', None):\n                response['Content-Length'] = len(response.content)\n        del self.__class__.debug_toolbars[ident]\n        return response\n"
  },
  {
    "path": "debug_toolbar/models.py",
    "content": ""
  },
  {
    "path": "debug_toolbar/panels/__init__.py",
    "content": "\"\"\"Base DebugPanel class\"\"\"\n\nclass DebugPanel(object):\n    \"\"\"\n    Base class for debug panels.\n    \"\"\"\n    # name = Base\n    has_content = False # If content returns something, set to true in subclass\n\n    # We'll maintain a local context instance so we can expose our template\n    # context variables to panels which need them:\n    context = {}\n\n    # Panel methods\n    def __init__(self, context={}):\n        self.context.update(context)\n\n    def dom_id(self):\n        return 'djDebug%sPanel' % (self.name.replace(' ', ''))\n\n    def nav_title(self):\n        \"\"\"Title showing in toolbar\"\"\"\n        raise NotImplementedError\n\n    def nav_subtitle(self):\n        \"\"\"Subtitle showing until title in toolbar\"\"\"\n        return ''\n\n    def title(self):\n        \"\"\"Title showing in panel\"\"\"\n        raise NotImplementedError\n\n    def url(self):\n        raise NotImplementedError\n\n    def content(self):\n        raise NotImplementedError\n\n    # Standard middleware methods\n    def process_request(self, request):\n        pass\n\n    def process_view(self, request, view_func, view_args, view_kwargs):\n        pass\n\n    def process_response(self, request, response):\n        pass\n\n"
  },
  {
    "path": "debug_toolbar/panels/cache.py",
    "content": "import time\nimport inspect\n\nfrom django.core import cache\nfrom django.core.cache.backends.base import BaseCache\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\nclass CacheStatTracker(BaseCache):\n    \"\"\"A small class used to track cache calls.\"\"\"\n    def __init__(self, cache):\n        self.cache = cache\n        self.reset()\n\n    def reset(self):\n        self.calls = []\n        self.hits = 0\n        self.misses = 0\n        self.sets = 0\n        self.gets = 0\n        self.get_many = 0\n        self.deletes = 0\n        self.total_time = 0\n\n    def _get_func_info(self):\n        stack = inspect.stack()[2]\n        return (stack[1], stack[2], stack[3], stack[4])\n\n    def get(self, key, default=None):\n        t = time.time()\n        value = self.cache.get(key, default)\n        this_time = time.time() - t\n        self.total_time += this_time * 1000\n        if value is None:\n            self.misses += 1\n        else:\n            self.hits += 1\n        self.gets += 1\n        self.calls.append((this_time, 'get', (key,), self._get_func_info()))\n        return value\n\n    def set(self, key, value, timeout=None):\n        t = time.time()\n        self.cache.set(key, value, timeout)\n        this_time = time.time() - t\n        self.total_time += this_time * 1000\n        self.sets += 1\n        self.calls.append((this_time, 'set', (key, value, timeout), self._get_func_info()))\n\n    def delete(self, key):\n        t = time.time()\n        self.cache.delete(key)\n        this_time = time.time() - t\n        self.total_time += this_time * 1000\n        self.deletes += 1\n        self.calls.append((this_time, 'delete', (key,), self._get_func_info()))\n\n    def get_many(self, keys):\n        t = time.time()\n        results = self.cache.get_many(keys)\n        this_time = time.time() - t\n        self.total_time += this_time * 1000\n        self.get_many += 1\n        for key, value in results.iteritems():\n            if value is None:\n                self.misses += 1\n            else:\n                self.hits += 1\n        self.calls.append((this_time, 'get_many', (keys,), self._get_func_info()))\n\nclass CacheDebugPanel(DebugPanel):\n    \"\"\"\n    Panel that displays the cache statistics.\n    \"\"\"\n    name = 'Cache'\n    has_content = True\n\n    def __init__(self, *args, **kwargs):\n        super(self.__class__, self).__init__(*args, **kwargs)\n        # This is hackish but to prevent threading issues is somewhat needed\n        if isinstance(cache.cache, CacheStatTracker):\n            cache.cache.reset()\n            self.cache = cache.cache\n        else:\n            self.cache = CacheStatTracker(cache.cache)\n            cache.cache = self.cache\n\n    def nav_title(self):\n        return _('Cache: %.2fms') % self.cache.total_time\n\n    def title(self):\n        return _('Cache Usage')\n\n    def url(self):\n        return ''\n\n    def content(self):\n        context = self.context.copy()\n        context.update({\n            'cache_calls': len(self.cache.calls),\n            'cache_time': self.cache.total_time,\n            'cache': self.cache,\n        })\n        return render_to_string('debug_toolbar/panels/cache.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/headers.py",
    "content": "from django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\nclass HeaderDebugPanel(DebugPanel):\n    \"\"\"\n    A panel to display HTTP headers.\n    \"\"\"\n    name = 'Header'\n    has_content = True\n    # List of headers we want to display\n    header_filter = (\n        'CONTENT_TYPE',\n        'HTTP_ACCEPT',\n        'HTTP_ACCEPT_CHARSET',\n        'HTTP_ACCEPT_ENCODING',\n        'HTTP_ACCEPT_LANGUAGE',\n        'HTTP_CACHE_CONTROL',\n        'HTTP_CONNECTION',\n        'HTTP_HOST',\n        'HTTP_KEEP_ALIVE',\n        'HTTP_REFERER',\n        'HTTP_USER_AGENT',\n        'QUERY_STRING',\n        'REMOTE_ADDR',\n        'REMOTE_HOST',\n        'REQUEST_METHOD',\n        'SCRIPT_NAME',\n        'SERVER_NAME',\n        'SERVER_PORT',\n        'SERVER_PROTOCOL',\n        'SERVER_SOFTWARE',\n    )\n\n    def nav_title(self):\n        return _('HTTP Headers')\n\n    def title(self):\n        return _('HTTP Headers')\n\n    def url(self):\n        return ''\n\n    def process_request(self, request):\n        self.headers = dict(\n            [(k, request.META[k]) for k in self.header_filter if k in request.META]\n        )\n\n    def content(self):\n        context = self.context.copy()\n        context.update({\n            'headers': self.headers\n        })\n        return render_to_string('debug_toolbar/panels/headers.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/logger.py",
    "content": "import datetime\nimport logging\ntry:\n    import threading\nexcept ImportError:\n    threading = None\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\n\nclass LogCollector(object):\n    def __init__(self):\n        if threading is None:\n            raise NotImplementedError(\"threading module is not available, \\\n                the logging panel cannot be used without it\")\n        self.records = {} # a dictionary that maps threads to log records\n\n    def add_record(self, record, thread=None):\n        # Avoid logging SQL queries since they are already in the SQL panel\n        # TODO: Make this check whether SQL panel is enabled\n        if record.get('channel', '') == 'django.db.backends':\n            return\n\n        self.get_records(thread).append(record)\n\n    def get_records(self, thread=None):\n        \"\"\"\n        Returns a list of records for the provided thread, of if none is provided,\n        returns a list for the current thread.\n        \"\"\"\n        if thread is None:\n            thread = threading.currentThread()\n        if thread not in self.records:\n            self.records[thread] = []\n        return self.records[thread]\n\n    def clear_records(self, thread=None):\n        if thread is None:\n            thread = threading.currentThread()\n        if thread in self.records:\n            del self.records[thread]\n\n\nclass ThreadTrackingHandler(logging.Handler):\n    def __init__(self, collector):\n        logging.Handler.__init__(self)\n        self.collector = collector\n\n    def emit(self, record):\n        record = {\n            'message': record.getMessage(),\n            'time': datetime.datetime.fromtimestamp(record.created),\n            'level': record.levelname,\n            'file': record.pathname,\n            'line': record.lineno,\n            'channel': record.name,\n        }\n        self.collector.add_record(record)\n\n\ncollector = LogCollector()\nlogging_handler = ThreadTrackingHandler(collector)\nlogging.root.setLevel(logging.NOTSET)\nlogging.root.addHandler(logging_handler)  # register with logging\n\ntry:\n    import logbook\n    logbook_supported = True\nexcept ImportError:\n    # logbook support is optional, so fail silently\n    logbook_supported = False\n\nif logbook_supported:\n    class LogbookThreadTrackingHandler(logbook.handlers.Handler):\n        def __init__(self, collector):\n            logbook.handlers.Handler.__init__(self, bubble=True)\n            self.collector = collector\n\n        def emit(self, record):\n            record = {\n                'message': record.message,\n                'time': record.time,\n                'level': record.level_name,\n                'file': record.filename,\n                'line': record.lineno,\n                'channel': record.channel,\n            }\n            self.collector.add_record(record)\n\n\n    logbook_handler = LogbookThreadTrackingHandler(collector)\n    logbook_handler.push_application()        # register with logbook\n\nclass LoggingPanel(DebugPanel):\n    name = 'Logging'\n    has_content = True\n\n    def process_request(self, request):\n        collector.clear_records()\n\n    def get_and_delete(self):\n        records = collector.get_records()\n        collector.clear_records()\n        return records\n\n    def nav_title(self):\n        return _(\"Logging\")\n\n    def nav_subtitle(self):\n        # FIXME l10n: use ngettext\n        return \"%s message%s\" % (len(collector.get_records()), (len(collector.get_records()) == 1) and '' or 's')\n\n    def title(self):\n        return _('Log Messages')\n\n    def url(self):\n        return ''\n\n    def content(self):\n        records = self.get_and_delete()\n        context = self.context.copy()\n        context.update({'records': records})\n\n        return render_to_string('debug_toolbar/panels/logger.html', context)\n\n"
  },
  {
    "path": "debug_toolbar/panels/profiling.py",
    "content": "from __future__ import division\n\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.safestring import mark_safe\nfrom debug_toolbar.panels import DebugPanel\n\nimport cProfile\nfrom pstats import Stats\nfrom colorsys import hsv_to_rgb\n\nclass DjangoDebugToolbarStats(Stats):\n    __root = None\n    \n    def get_root_func(self):\n        if self.__root is None:\n            for func, (cc, nc, tt, ct, callers) in self.stats.iteritems():\n                if len(callers) == 0:\n                    self.__root = func\n                    break\n        return self.__root\n    \n    def print_call_tree_node(self, function, depth, max_depth, cum_filter=0.1):\n        self.print_line(function, depth=depth)\n        if depth < max_depth:\n            for called in self.all_callees[function].keys():\n                if self.stats[called][3] >= cum_filter:\n                    self.print_call_tree_node(called, depth+1, max_depth, cum_filter=cum_filter)\n\nclass FunctionCall(object):\n    def __init__(self, statobj, func, depth=0, stats=None, id=0, parent_ids=[], hsv=(0,0.5,1)):\n        self.statobj = statobj\n        self.func = func\n        if stats:\n            self.stats = stats\n        else:\n            self.stats = statobj.stats[func][:4]\n        self.depth = depth\n        self.id = id\n        self.parent_ids = parent_ids\n        self.hsv = hsv\n    \n    def parent_classes(self):\n        return self.parent_classes\n    \n    def background(self):\n        r,g,b = hsv_to_rgb(*self.hsv)\n        return 'rgb(%f%%,%f%%,%f%%)' %(r*100, g*100, b*100)\n    \n    def func_std_string(self): # match what old profile produced\n        func_name = self.func\n        if func_name[:2] == ('~', 0):\n            # special case for built-in functions\n            name = func_name[2]\n            if name.startswith('<') and name.endswith('>'):\n                return '{%s}' % name[1:-1]\n            else:\n                return name\n        else:\n            file_name, line_num, method = self.func\n            idx = file_name.find('/site-packages/')\n            if idx > -1:\n                file_name=file_name[idx+14:]\n            \n            file_path, file_name = file_name.rsplit('/', 1)\n            \n            return mark_safe('<span class=\"path\">{0}/</span><span class=\"file\">{1}</span> in <span class=\"func\">{3}</span>(<span class=\"lineno\">{2}</span>)'.format(\n                file_path,\n                file_name,\n                line_num,\n                method,\n            ))\n    \n    def subfuncs(self):\n        i=0\n        h,s,v = self.hsv\n        count = len(self.statobj.all_callees[self.func])\n        for func, stats in self.statobj.all_callees[self.func].iteritems():\n            i += 1\n            h1 = h + (i/count)/(self.depth+1)\n            if stats[3] == 0:\n                s1 = 0\n            else:\n                s1 = s*(stats[3]/self.stats[3])\n            yield FunctionCall(self.statobj,\n                               func, \n                               self.depth+1, \n                               stats=stats,\n                               id=str(self.id) + '_' + str(i),\n                               parent_ids=self.parent_ids + [self.id],\n                               hsv=(h1,s1,1))\n    \n    def count(self):\n        return self.stats[1]\n    \n    def tottime(self):\n        return self.stats[2]\n    \n    def cumtime(self):\n        cc, nc, tt, ct = self.stats\n        return self.stats[3]\n    \n    def tottime_per_call(self):\n        cc, nc, tt, ct = self.stats\n\n        if nc == 0:\n            return 0\n\n        return tt/nc\n    \n    def cumtime_per_call(self):\n        cc, nc, tt, ct = self.stats\n\n        if cc == 0:\n            return 0\n\n        return ct/cc\n\n    def indent(self):\n        return 16 * self.depth\n\nclass ProfilingDebugPanel(DebugPanel):\n    \"\"\"\n    Panel that displays the Django version.\n    \"\"\"\n    name = 'Profiling'\n    has_content = True\n\n    def nav_title(self):\n        return _('Profiling')\n\n    def url(self):\n        return ''\n    \n    def title(self):\n        return _('Profiling')\n\n    def process_view(self, request, view_func, view_args, view_kwargs):\n        self.profiler = cProfile.Profile()\n        args = (request,) + view_args\n        return self.profiler.runcall(view_func, *args, **view_kwargs)\n\n    def process_response(self, request, response):\n        self.profiler.create_stats()\n        self.stats = DjangoDebugToolbarStats(self.profiler)\n        return response\n\n    def add_node(self, func_list, func, max_depth, cum_time=0.1):\n        func_list.append(func)\n        func.has_subfuncs = False\n        if func.depth < max_depth:\n            for subfunc in func.subfuncs():\n                if subfunc.stats[3] >= cum_time:\n                    func.has_subfuncs = True\n                    self.add_node(func_list, subfunc, max_depth, cum_time=cum_time)\n    \n    def content(self):\n        \n        self.stats.calc_callees()\n        root = FunctionCall(self.stats, self.stats.get_root_func(), depth=0)\n        \n        func_list = []\n        self.add_node(func_list, root, 10, root.stats[3]/8)\n        context = self.context.copy()\n        context.update({\n            'func_list': func_list,\n        })\n\n        return render_to_string('debug_toolbar/panels/profiling.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/request_vars.py",
    "content": "from django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\nclass RequestVarsDebugPanel(DebugPanel):\n    \"\"\"\n    A panel to display request variables (POST/GET, session, cookies).\n    \"\"\"\n    name = 'RequestVars'\n    has_content = True\n\n    def nav_title(self):\n        return _('Request Vars')\n\n    def title(self):\n        return _('Request Vars')\n\n    def url(self):\n        return ''\n\n    def process_request(self, request):\n        self.request = request\n\n    def process_view(self, request, view_func, view_args, view_kwargs):\n        self.view_func = view_func\n        self.view_args = view_args\n        self.view_kwargs = view_kwargs\n\n    def content(self):\n        context = self.context.copy()\n        context.update({\n            'get': [(k, self.request.GET.getlist(k)) for k in self.request.GET],\n            'post': [(k, self.request.POST.getlist(k)) for k in self.request.POST],\n            'cookies': [(k, self.request.COOKIES.get(k)) for k in self.request.COOKIES],\n            'view_func': '%s.%s' % (self.view_func.__module__, self.view_func.__name__),\n            'view_args': self.view_args,\n            'view_kwargs': self.view_kwargs\n        })\n        if hasattr(self.request, 'session'):\n            context.update({\n                'session': [(k, self.request.session.get(k)) for k in self.request.session.iterkeys()]\n            })\n\n        return render_to_string('debug_toolbar/panels/request_vars.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/settings_vars.py",
    "content": "from django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.views.debug import get_safe_settings\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\n\nclass SettingsVarsDebugPanel(DebugPanel):\n    \"\"\"\n    A panel to display all variables in django.conf.settings\n    \"\"\"\n    name = 'SettingsVars'\n    has_content = True\n\n    def nav_title(self):\n        return _('Settings')\n\n    def title(self):\n        return _('Settings from <code>%s</code>') % settings.SETTINGS_MODULE\n\n    def url(self):\n        return ''\n\n    def content(self):\n        context = self.context.copy()\n        context.update({\n            'settings': get_safe_settings(),\n        })\n        return render_to_string('debug_toolbar/panels/settings_vars.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/signals.py",
    "content": "import sys\n\nfrom django.conf import settings\nfrom django.core.signals import request_started, request_finished, \\\n    got_request_exception\nfrom django.db.models.signals import class_prepared, pre_init, post_init, \\\n    pre_save, post_save, pre_delete, post_delete, post_syncdb\nfrom django.dispatch.dispatcher import WEAKREF_TYPES\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\n\ntry:\n    from django.db.backends.signals import connection_created\nexcept ImportError:\n    connection_created = None\n\nfrom debug_toolbar.panels import DebugPanel\n\nclass SignalDebugPanel(DebugPanel):\n    name = \"Signals\"\n    has_content = True\n\n    SIGNALS = {\n        'request_started': request_started,\n        'request_finished': request_finished,\n        'got_request_exception': got_request_exception,\n        'connection_created': connection_created,\n        'class_prepared': class_prepared,\n        'pre_init': pre_init,\n        'post_init': post_init,\n        'pre_save': pre_save,\n        'post_save': post_save,\n        'pre_delete': pre_delete,\n        'post_delete': post_delete,\n        'post_syncdb': post_syncdb,\n    }\n\n    def nav_title(self):\n        return _(\"Signals\")\n\n    def title(self):\n        return _(\"Signals\")\n\n    def url(self):\n        return ''\n\n    def signals(self):\n        signals = self.SIGNALS.copy()\n        if hasattr(settings, 'DEBUG_TOOLBAR_CONFIG'):\n            extra_signals = settings.DEBUG_TOOLBAR_CONFIG.get('EXTRA_SIGNALS', [])\n        else:\n            extra_signals = []\n        for signal in extra_signals:\n            parts = signal.split('.')\n            path = '.'.join(parts[:-1])\n            __import__(path)\n            signals[parts[-1]] = getattr(sys.modules[path], parts[-1])\n        return signals\n    signals = property(signals)\n\n    def content(self):\n        signals = []\n        keys = self.signals.keys()\n        keys.sort()\n        for name in keys:\n            signal = self.signals[name]\n            if signal is None:\n                continue\n            receivers = []\n            for (receiverkey, r_senderkey), receiver in signal.receivers:\n                if isinstance(receiver, WEAKREF_TYPES):\n                    receiver = receiver()\n                if receiver is None:\n                    continue\n                if getattr(receiver, 'im_self', None) is not None:\n                    text = \"method %s on %s object\" % (receiver.__name__, receiver.im_self.__class__.__name__)\n                elif getattr(receiver, 'im_class', None) is not None:\n                    text = \"method %s on %s\" % (receiver.__name__, receiver.im_class.__name__)\n                else:\n                    text = \"function %s\" % receiver.__name__\n                receivers.append(text)\n            signals.append((name, signal, receivers))\n\n        context = self.context.copy()\n        context.update({'signals': signals})\n\n        return render_to_string('debug_toolbar/panels/signals.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/sql.py",
    "content": "import re\nimport uuid\n\nfrom django.db.backends import BaseDatabaseWrapper\nfrom django.template.loader import render_to_string\nfrom django.utils.html import escape\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext_lazy as _, ungettext_lazy as __\n\nfrom debug_toolbar.utils.compat.db import connections\nfrom debug_toolbar.middleware import DebugToolbarMiddleware\nfrom debug_toolbar.panels import DebugPanel\nfrom debug_toolbar.utils import sqlparse\nfrom debug_toolbar.utils.tracking.db import CursorWrapper\nfrom debug_toolbar.utils.tracking import replace_call\n\n# Inject our tracking cursor\n@replace_call(BaseDatabaseWrapper.cursor)\ndef cursor(func, self):\n    result = func(self)\n\n    djdt = DebugToolbarMiddleware.get_current()\n    if not djdt:\n        return result\n    logger = djdt.get_panel(SQLDebugPanel)\n    \n    return CursorWrapper(result, self, logger=logger)\n\ndef get_isolation_level_display(engine, level):\n    if engine == 'psycopg2':\n        import psycopg2.extensions\n        choices = {\n            psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT: 'Autocommit',\n            psycopg2.extensions.ISOLATION_LEVEL_READ_UNCOMMITTED: 'Read uncommitted',\n            psycopg2.extensions.ISOLATION_LEVEL_READ_COMMITTED: 'Read committed',\n            psycopg2.extensions.ISOLATION_LEVEL_REPEATABLE_READ: 'Repeatable read',\n            psycopg2.extensions.ISOLATION_LEVEL_SERIALIZABLE: 'Serializable',\n        }\n    else:\n        raise ValueError(engine)\n    \n    return choices.get(level)\n\ndef get_transaction_status_display(engine, level):\n    if engine == 'psycopg2':\n        import psycopg2.extensions\n        choices = {\n            psycopg2.extensions.TRANSACTION_STATUS_IDLE: 'Idle',\n            psycopg2.extensions.TRANSACTION_STATUS_ACTIVE: 'Active',\n            psycopg2.extensions.TRANSACTION_STATUS_INTRANS: 'In transaction',\n            psycopg2.extensions.TRANSACTION_STATUS_INERROR: 'In error',\n            psycopg2.extensions.TRANSACTION_STATUS_UNKNOWN: 'Unknown',\n        }\n    else:\n        raise ValueError(engine)\n    \n    return choices.get(level)\n\nclass SQLDebugPanel(DebugPanel):\n    \"\"\"\n    Panel that displays information about the SQL queries run while processing\n    the request.\n    \"\"\"\n    name = 'SQL'\n    has_content = True\n\n    def __init__(self, *args, **kwargs):\n        super(self.__class__, self).__init__(*args, **kwargs)\n        self._offset = dict((k, len(connections[k].queries)) for k in connections)\n        self._sql_time = 0\n        self._num_queries = 0\n        self._queries = []\n        self._databases = {}\n        self._transaction_status = {}\n        self._transaction_ids = {}\n    \n    def get_transaction_id(self, alias):\n        conn = connections[alias].connection\n        if not conn:\n            return None\n\n        engine = conn.__class__.__module__.split('.', 1)[0]\n        if engine == 'psycopg2':\n            cur_status = conn.get_transaction_status()\n        else:\n            raise ValueError(engine)\n\n        last_status = self._transaction_status.get(alias)\n        self._transaction_status[alias] = cur_status\n\n        if not cur_status:\n            # No available state\n            return None\n\n        if cur_status != last_status:\n            if cur_status:\n                self._transaction_ids[alias] = uuid.uuid4().hex\n            else:\n                self._transaction_ids[alias] = None\n        \n        return self._transaction_ids[alias]\n    \n    def record(self, alias, **kwargs):\n        self._queries.append((alias, kwargs))\n        if alias not in self._databases:\n            self._databases[alias] = {\n                'time_spent': kwargs['duration'],\n                'num_queries': 1,\n            }\n        else:\n            self._databases[alias]['time_spent'] += kwargs['duration']\n            self._databases[alias]['num_queries'] += 1\n        self._sql_time += kwargs['duration']\n        self._num_queries += 1\n\n    def nav_title(self):\n        return _('SQL')\n\n    def nav_subtitle(self):\n        # TODO l10n: use ngettext\n        return \"%d %s in %.2fms\" % (\n            self._num_queries,\n            (self._num_queries == 1) and 'query' or 'queries',\n            self._sql_time\n        )\n\n    def title(self):\n        count = len(self._databases)\n        \n        return __('SQL Queries from %(count)d connection', 'SQL Queries from %(count)d connections', count) % dict(\n            count=count,\n        )\n\n    def url(self):\n        return ''\n\n    def content(self):\n        if self._queries:\n            width_ratio_tally = 0\n            colors = [\n                (256, 0, 0), # red\n                (0, 256, 0), # blue\n                (0, 0, 256), # green\n            ]\n            factor = int(256.0/(len(self._databases)*2.5))\n            for n, db in enumerate(self._databases.itervalues()):\n                rgb = [0, 0, 0]\n                color = n % 3\n                rgb[color] = 256 - n/3*factor\n                nn = color\n                # XXX: pretty sure this is horrible after so many aliases\n                while rgb[color] < factor:\n                    nc = min(256 - rgb[color], 256)\n                    rgb[color] += nc\n                    nn += 1\n                    if nn > 2:\n                        nn = 0\n                    rgb[nn] = nc\n                db['rgb_color'] = rgb\n        \n            trans_ids = {}\n            trans_id = None\n            i = 0\n            for alias, query in self._queries:\n                trans_id = query.get('trans_id')\n                last_trans_id = trans_ids.get(alias)\n                \n                if trans_id != last_trans_id:\n                    if last_trans_id:\n                        self._queries[i-1][1]['ends_trans'] = True\n                    trans_ids[alias] = trans_id\n                    if trans_id:\n                        query['starts_trans'] = True\n                if trans_id:\n                    query['in_trans'] = True\n                \n                query['alias'] = alias\n                if 'iso_level' in query:\n                    query['iso_level'] = get_isolation_level_display(query['engine'], query['iso_level'])\n                if 'trans_status' in query:\n                    query['trans_status'] = get_transaction_status_display(query['engine'], query['trans_status'])\n                query['sql'] = reformat_sql(query['sql'])\n                query['rgb_color'] = self._databases[alias]['rgb_color']\n                try:\n                    query['width_ratio'] = (query['duration'] / self._sql_time) * 100\n                except ZeroDivisionError:\n                    query['width_ratio'] = 0\n                query['start_offset'] = width_ratio_tally\n                query['end_offset'] = query['width_ratio'] + query['start_offset']\n                width_ratio_tally += query['width_ratio']\n            \n                stacktrace = []\n                for frame in query['stacktrace']:\n                    params = map(escape, frame[0].rsplit('/', 1) + list(frame[1:]))\n                    stacktrace.append('<span class=\"path\">{0}/</span><span class=\"file\">{1}</span> in <span class=\"func\">{3}</span>(<span class=\"lineno\">{2}</span>)\\n  <span class=\"code\">{4}</span>\"'.format(*params))\n                query['stacktrace'] = mark_safe('\\n'.join(stacktrace))\n                i += 1\n\n            if trans_id:\n                self._queries[i-1][1]['ends_trans'] = True\n        \n        context = self.context.copy()\n        context.update({\n            'databases': sorted(self._databases.items(), key=lambda x: -x[1]['time_spent']),\n            'queries': [q for a, q in self._queries],\n            'sql_time': self._sql_time,\n        })\n\n        return render_to_string('debug_toolbar/panels/sql.html', context)\n\nclass BoldKeywordFilter(sqlparse.filters.Filter):\n    \"\"\"sqlparse filter to bold SQL keywords\"\"\"\n    def process(self, stack, stream):\n        \"\"\"Process the token stream\"\"\"\n        for token_type, value in stream:\n            is_keyword = token_type in sqlparse.tokens.Keyword\n            if is_keyword:\n                yield sqlparse.tokens.Text, '<strong>'\n            yield token_type, escape(value)\n            if is_keyword:\n                yield sqlparse.tokens.Text, '</strong>'\n\ndef swap_fields(sql):\n    return re.sub('SELECT</strong> (.*) <strong>FROM', 'SELECT</strong> <span class=\"djDebugCollapse\">\\g<1></span> <strong>FROM', sql)\n\ndef reformat_sql(sql):\n    stack = sqlparse.engine.FilterStack()\n    stack.preprocess.append(BoldKeywordFilter()) # add our custom filter\n    stack.postprocess.append(sqlparse.filters.SerializerUnicode()) # tokens -> strings\n    return swap_fields(''.join(stack.run(sql)))\n"
  },
  {
    "path": "debug_toolbar/panels/template.py",
    "content": "from os.path import normpath\nfrom pprint import pformat\n\nfrom django import http\nfrom django.conf import settings\nfrom django.template.context import get_standard_processors\nfrom django.template.loader import render_to_string\nfrom django.test.signals import template_rendered\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\n# Code taken and adapted from Simon Willison and Django Snippets:\n# http://www.djangosnippets.org/snippets/766/\n\n# Monkeypatch instrumented test renderer from django.test.utils - we could use\n# django.test.utils.setup_test_environment for this but that would also set up\n# e-mail interception, which we don't want\nfrom django.test.utils import instrumented_test_render\nfrom django.template import Template\n\nif not hasattr(Template, '_render'): # Django < 1.2\n    if Template.render != instrumented_test_render:\n        Template.original_render = Template.render\n        Template.render = instrumented_test_render\nelse:\n    if Template._render != instrumented_test_render:\n        Template.original_render = Template._render\n        Template._render = instrumented_test_render\n\n# MONSTER monkey-patch\nold_template_init = Template.__init__\ndef new_template_init(self, template_string, origin=None, name='<Unknown Template>'):\n    old_template_init(self, template_string, origin, name)\n    self.origin = origin\nTemplate.__init__ = new_template_init\n\nclass TemplateDebugPanel(DebugPanel):\n    \"\"\"\n    A panel that lists all templates used during processing of a response.\n    \"\"\"\n    name = 'Template'\n    has_content = True\n\n    def __init__(self, *args, **kwargs):\n        super(self.__class__, self).__init__(*args, **kwargs)\n        self.templates = []\n        template_rendered.connect(self._store_template_info)\n\n    def _store_template_info(self, sender, **kwargs):\n        self.templates.append(kwargs)\n\n    def nav_title(self):\n        return _('Templates')\n\n    def title(self):\n        num_templates = len([t for t in self.templates\n            if not (t['template'].name and t['template'].name.startswith('debug_toolbar/'))])\n        return _('Templates (%(num_templates)s rendered)') % {'num_templates': num_templates}\n\n    def url(self):\n        return ''\n\n    def process_request(self, request):\n        self.request = request\n\n    def content(self):\n        context_processors = dict(\n            [\n                (\"%s.%s\" % (k.__module__, k.__name__),\n                    pformat(k(self.request))) for k in get_standard_processors()\n            ]\n        )\n        template_context = []\n        for template_data in self.templates:\n            info = {}\n            # Clean up some info about templates\n            template = template_data.get('template', None)\n            # Skip templates that we are generating through the debug toolbar.\n            if template.name and template.name.startswith('debug_toolbar/'):\n                continue\n            if template.origin and template.origin.name:\n                template.origin_name = template.origin.name\n            else:\n                template.origin_name = 'No origin'\n            info['template'] = template\n            # Clean up context for better readability\n            if getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}).get('SHOW_TEMPLATE_CONTEXT', True):\n                context_data = template_data.get('context', None)\n\n                context_list = []\n                for context_layer in context_data.dicts:\n                    if hasattr(context_layer, 'items'):\n                        for key, value in context_layer.items():\n                            # Replace any request elements - they have a large\n                            # unicode representation and the request data is\n                            # already made available from the Request Vars panel.\n                            if isinstance(value, http.HttpRequest):\n                                context_layer[key] = '<<request>>'\n                            # Replace the debugging sql_queries element. The SQL\n                            # data is already made available from the SQL panel.\n                            elif key == 'sql_queries' and isinstance(value, list):\n                                context_layer[key] = '<<sql_queries>>'\n                            # Replace LANGUAGES, which is available in i18n context processor\n                            elif key == 'LANGUAGES' and isinstance(value, tuple):\n                                context_layer[key] = '<<languages>>'\n                    try:\n                        context_list.append(pformat(context_layer))\n                    except UnicodeEncodeError:\n                        pass\n                info['context'] = '\\n'.join(context_list)\n            template_context.append(info)\n\n        context = self.context.copy()\n        context.update({\n            'templates': template_context,\n            'template_dirs': [normpath(x) for x in settings.TEMPLATE_DIRS],\n            'context_processors': context_processors,\n        })\n\n        return render_to_string('debug_toolbar/panels/templates.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/timer.py",
    "content": "try:\n    import resource\nexcept ImportError:\n    pass # Will fail on Win32 systems\nimport time\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\nfrom debug_toolbar.panels import DebugPanel\n\nclass TimerDebugPanel(DebugPanel):\n    \"\"\"\n    Panel that displays the time a response took in milliseconds.\n    \"\"\"\n    name = 'Timer'\n    try: # if resource module not available, don't show content panel\n        resource\n    except NameError:\n        has_content = False\n        has_resource = False\n    else:\n        has_content = True\n        has_resource = True\n\n    def process_request(self, request):\n        self._start_time = time.time()\n        if self.has_resource:\n            self._start_rusage = resource.getrusage(resource.RUSAGE_SELF)\n\n    def process_response(self, request, response):\n        self.total_time = (time.time() - self._start_time) * 1000\n        if self.has_resource:\n            self._end_rusage = resource.getrusage(resource.RUSAGE_SELF)\n\n    def nav_title(self):\n        return _('Time')\n\n    def nav_subtitle(self):\n        # TODO l10n\n        if self.has_resource:\n            utime = self._end_rusage.ru_utime - self._start_rusage.ru_utime\n            stime = self._end_rusage.ru_stime - self._start_rusage.ru_stime\n            return 'CPU: %0.2fms (%0.2fms)' % ((utime + stime) * 1000.0, self.total_time)\n        else:\n            return 'TOTAL: %0.2fms' % (self.total_time)\n\n    def title(self):\n        return _('Resource Usage')\n\n    def url(self):\n        return ''\n\n    def _elapsed_ru(self, name):\n        return getattr(self._end_rusage, name) - getattr(self._start_rusage, name)\n\n    def content(self):\n\n        utime = 1000 * self._elapsed_ru('ru_utime')\n        stime = 1000 * self._elapsed_ru('ru_stime')\n        vcsw = self._elapsed_ru('ru_nvcsw')\n        ivcsw = self._elapsed_ru('ru_nivcsw')\n        minflt = self._elapsed_ru('ru_minflt')\n        majflt = self._elapsed_ru('ru_majflt')\n\n# these are documented as not meaningful under Linux.  If you're running BSD\n# feel free to enable them, and add any others that I hadn't gotten to before\n# I noticed that I was getting nothing but zeroes and that the docs agreed. :-(\n#\n#        blkin = self._elapsed_ru('ru_inblock')\n#        blkout = self._elapsed_ru('ru_oublock')\n#        swap = self._elapsed_ru('ru_nswap')\n#        rss = self._end_rusage.ru_maxrss\n#        srss = self._end_rusage.ru_ixrss\n#        urss = self._end_rusage.ru_idrss\n#        usrss = self._end_rusage.ru_isrss\n\n        # TODO l10n on values\n        rows = (\n            (_('User CPU time'), '%0.3f msec' % utime),\n            (_('System CPU time'), '%0.3f msec' % stime),\n            (_('Total CPU time'), '%0.3f msec' % (utime + stime)),\n            (_('Elapsed time'), '%0.3f msec' % self.total_time),\n            (_('Context switches'), '%d voluntary, %d involuntary' % (vcsw, ivcsw)),\n#            ('Memory use', '%d max RSS, %d shared, %d unshared' % (rss, srss, urss + usrss)),\n#            ('Page faults', '%d no i/o, %d requiring i/o' % (minflt, majflt)),\n#            ('Disk operations', '%d in, %d out, %d swapout' % (blkin, blkout, swap)),\n        )\n\n        context = self.context.copy()\n        context.update({\n            'rows': rows,\n        })\n\n        return render_to_string('debug_toolbar/panels/timer.html', context)\n"
  },
  {
    "path": "debug_toolbar/panels/version.py",
    "content": "import sys\n\nimport django\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\n\nimport debug_toolbar\nfrom debug_toolbar.panels import DebugPanel\n\n\nclass VersionDebugPanel(DebugPanel):\n    \"\"\"\n    Panel that displays the Django version.\n    \"\"\"\n    name = 'Version'\n    has_content = True\n\n    def nav_title(self):\n        return _('Versions')\n\n    def nav_subtitle(self):\n        return 'Django %s' % django.get_version()\n\n    def url(self):\n        return ''\n    \n    def title(self):\n        return _('Versions')\n\n    def content(self):\n        versions = {}\n        for app in settings.INSTALLED_APPS + ['django']:\n            name = app.split('.')[-1].replace('_', ' ').capitalize()\n            __import__(app)\n            app = sys.modules[app]\n            if hasattr(app, 'get_version'):\n                get_version = app.get_version\n                if callable(get_version):\n                    version = get_version()\n                else:\n                    version = get_version\n            elif hasattr(app, 'VERSION'):\n                version = app.VERSION\n            elif hasattr(app, '__version__'):\n                version = app.__version__\n            else:\n                continue\n            if isinstance(version, (list, tuple)):\n                version = '.'.join(str(o) for o in version)\n            versions[name] = version\n\n        context = self.context.copy()\n        context.update({\n            'versions': versions,\n            'paths': sys.path,\n        })\n\n        return render_to_string('debug_toolbar/panels/versions.html', context)\n"
  },
  {
    "path": "debug_toolbar/runtests.py",
    "content": "#!/usr/bin/env python\nimport sys\nfrom os.path import dirname, abspath\n\nfrom django.conf import settings\n\nif not settings.configured:\n    settings.configure(\n        DATABASE_ENGINE='sqlite3',\n        # HACK: this fixes our threaded runserver remote tests\n        # DATABASE_NAME='test_sentry',\n        # TEST_DATABASE_NAME='test_sentry',\n        INSTALLED_APPS=[\n            'django.contrib.auth',\n            'django.contrib.admin',\n            'django.contrib.contenttypes',\n            'django.contrib.sessions',\n            'django.contrib.sites',\n\n            'debug_toolbar',\n            \n            'debug_toolbar.tests',\n        ],\n        ROOT_URLCONF='',\n        DEBUG=False,\n        SITE_ID=1,\n    )\n    import djcelery\n    djcelery.setup_loader()\n\nfrom django.test.simple import run_tests\n\ndef runtests(*test_args):\n    if 'south' in settings.INSTALLED_APPS:\n        from south.management.commands import patch_for_test_db_setup\n        patch_for_test_db_setup()\n\n    if not test_args:\n        test_args = ['debug_toolbar']\n    parent = dirname(abspath(__file__))\n    sys.path.insert(0, parent)\n    failures = run_tests(test_args, verbosity=1, interactive=True)\n    sys.exit(failures)\n\n\nif __name__ == '__main__':\n    runtests(*sys.argv[1:])"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/base.html",
    "content": "{% load i18n %}\n<style type=\"text/css\">\n@media print { #djDebug {display:none;}}\n{{ css }}\n</style>\n<script type=\"text/javascript\">{{ js }}</script>\n<div id=\"djDebug\" style=\"display:none;\">\n\t<div style=\"display:none;\" id=\"djDebugToolbar\">\n\t\t<ul id=\"djDebugPanelList\">\n\t\t\t{% if panels %}\n\t\t\t<li><a id=\"djHideToolBarButton\" href=\"#\" title=\"{% trans \"Hide Toolbar\" %}\">{% trans \"Hide\" %} &raquo;</a></li>\n\t\t\t{% else %}\n\t\t\t<li id=\"djDebugButton\">DEBUG</li>\n\t\t\t{% endif %}\n\t\t\t{% for panel in panels %}\n\t\t\t\t<li class=\"djDebugPanelButton\">\n\t\t\t\t\t{% if panel.has_content %}\n\t\t\t\t\t\t<a href=\"{{ panel.url|default:\"#\" }}\" title=\"{{ panel.title }}\" class=\"{{ panel.dom_id }}\">\n\t\t\t\t\t{% else %}\n\t\t\t\t\t    <div class=\"contentless\">\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t{{ panel.nav_title }}\n\t\t\t\t\t{% with panel.nav_subtitle as subtitle %}\n\t\t\t\t\t\t{% if subtitle %}<br /><small>{{ subtitle }}</small>{% endif %}\n\t\t\t\t\t{% endwith %}\n\t\t\t\t\t{% if panel.has_content %}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t{% else %}\n\t\t\t\t\t    </div>\n\t\t\t\t\t{% endif %}\n\t\t\t\t</li>\n\t\t\t{% endfor %}\n\t\t</ul>\n\t</div>\n\t<div style=\"display:none;\" id=\"djDebugToolbarHandle\">\n\t\t<a title=\"{% trans \"Show Toolbar\" %}\" id=\"djShowToolBarButton\" href=\"#\">&laquo;</a>\n\t</div>\n\t{% for panel in panels %}\n\t\t{% if panel.has_content %}\n\t\t\t<div id=\"{{ panel.dom_id }}\" class=\"panelContent\">\n\t\t\t\t<div class=\"djDebugPanelTitle\">\n\t\t\t\t\t<a href=\"\" class=\"djDebugClose\">{% trans \"Close\" %}</a>\n\t\t\t\t\t<h3>{{ panel.title|safe }}</h3>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"djDebugPanelContent\">\n\t\t\t\t    <div class=\"scroll\">\n\t\t\t\t        {{ panel.content|safe }}\n\t\t\t\t    </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t{% endif %}\n\t{% endfor %}\n\t<div id=\"djDebugWindow\" class=\"panelContent\"></div>\n</div>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/cache.html",
    "content": "{% load i18n %}\n<table>\n\t<colgroup>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t\t<col width=\"12%\"/>\n\t</colgroup>\n\t<tr>\n\t\t<th>{% trans \"Total Calls\" %}</th>\n\t\t<td>{{ cache_calls }}</td>\n\t\t<th>{% trans \"Total Time\" %}</th>\n\t\t<td>{{ cache_time }}ms</td>\n\t\t<th>{% trans \"Hits\" %}</th>\n\t\t<td>{{ cache.hits }}</td>\n\t\t<th>{% trans \"Misses\" %}</th>\n\t\t<td>{{ cache.misses }}</td>\n\t</tr>\n\t<tr>\n\t\t<th>gets</th>\n\t\t<td>{{ cache.gets }}</td>\n\t\t<th>sets</th>\n\t\t<td>{{ cache.sets }}</td>\n\t\t<th>deletes</th>\n\t\t<td>{{ cache.deletes }}</td>\n\t\t<th>get_many</th>\n\t\t<td>{{ cache.get_many }}</td>\n\t</tr>\n</table>\n{% if cache.calls %}\n<h3>{% trans \"Breakdown\" %}</h3>\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Time\" %}&nbsp;(ms)</th>\n\t\t\t<th>{% trans \"Type\" %}</th>\n\t\t\t<th>{% trans \"Parameters\" %}</th>\n\t\t\t<th>{% trans \"Function\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for query in cache.calls %}\n\t\t\t<tr class=\"{% cycle 'row1' 'row2' %}\">\n\t\t\t\t<td>{{ query.0|floatformat:\"4\" }}</td>\n\t\t\t\t<td>{{ query.1|escape }}</td>\n\t\t\t\t<td>{{ query.2|escape }}</td>\n\t\t\t\t<td><acronym title=\"{{ query.3.0 }}:{{ query.3.1 }}\">{{ query.3.2|escape }}</acronym>: {{ query.3.3.0|escape }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n{% endif %}\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/headers.html",
    "content": "{% load i18n %}\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Key\" %}</th>\n\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for key, value in headers.iteritems %}\n\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t<td>{{ value|escape }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/logger.html",
    "content": "{% load i18n %}\n{% if records %}\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>{% trans \"Level\" %}</th>\n\t\t\t\t<th>{% trans \"Time\" %}</th>\n\t\t\t\t<th>{% trans \"Channel\" %}</th>\n\t\t\t\t<th>{% trans \"Message\" %}</th>\n\t\t\t\t<th>{% trans \"Location\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for record in records %}\n\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t<td>{{ record.level }}</td>\n\t\t\t\t\t<td>{{ record.time|date:\"h:i:s m/d/Y\" }}</td>\n\t\t\t\t\t<td>{{ record.channel|default:\"-\" }}</td>\n\t\t\t\t\t<td>{{ record.message }}</td>\n\t\t\t\t\t<td>{{ record.file }}:{{ record.line }}</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>{% trans \"No messages logged\" %}.</p>\n{% endif %}\n\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/profiling.html",
    "content": "{% load i18n %}\n\n<table width=\"100%\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Call\" %}</th>\n\t\t\t<th>{% trans \"TotTime\" %}</th>\n\t\t\t<th>{% trans \"Per\" %}</th>\n\t\t\t<th>{% trans \"CumTime\" %}</th>\n\t\t\t<th>{% trans \"Per\" %}</th>\n\t\t\t<th>{% trans \"Count\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for call in func_list %}\n\t\t\t<!--  style=\"background:{{ call.background }}\" -->\n\t\t\t<tr id=\"{{ call.id }}\" class=\"djDebugProfileRow{% for parent_id in call.parent_ids %} djToggleDetails_{{ parent_id }}{% endfor %}\" depth=\"{{ call.depth }}\">\n\t\t\t\t<td>\n\t\t\t\t\t<div style=\"padding-left: {{ call.indent }}px;\">\n\t\t\t\t\t\t{% if call.has_subfuncs %}\n\t\t\t\t\t\t\t<a class=\"djProfileToggleDetails djToggleSwitch\" data-toggle-id=\"{{ call.id }}\" data-toggle-open=\"+\" data-toggle-close=\"-\" href=\"javascript:void(0)\">-</a>\n\t\t\t\t\t\t{% else %}\n\t\t\t\t\t\t\t<span class=\"djNoToggleSwitch\"></span>\n\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t<span class=\"stack\">{{ call.func_std_string }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t\t<td>{{ call.tottime|floatformat:3 }}</td>\n\t\t\t\t<td>{{ call.tottime_per_call|floatformat:3 }}</td>\n\t\t\t\t<td>{{ call.cumtime|floatformat:3 }}</td>\n\t\t\t\t<td>{{ call.cumtime_per_call|floatformat:3 }}</td>\n\t\t\t\t<td>{{ call.count }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/request_vars.html",
    "content": "{% load i18n %}\n\n<h4>{% trans 'View information' %}</h4>\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans 'View Function' %}</th>\n\t\t\t<th>{% trans 'args' %}</th>\n\t\t\t<th>{% trans 'kwargs' %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td>{{ view_func }}</td>\n\t\t\t<td>{{ view_args|default:\"None\" }}</td>\n\t\t\t<td>\n\t\t\t{% if view_kwargs.items %}\n\t\t\t\t{% for k, v in view_kwargs.items %}\n\t\t\t\t\t{{ k }}={{ v }}{% if not forloop.last %}, {% endif %}\n\t\t\t\t{% endfor %}\n\t\t\t{% else %}\n\t\t\t\tNone\n\t\t\t{% endif %}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n<h4>{% trans 'COOKIES Variables' %}</h4>\n{% if cookies %}\n\t<table>\n\t\t<colgroup>\n\t\t\t<col style=\"width:20%\"/>\n\t\t\t<col/>\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>{% trans \"Variable\" %}</th>\n\t\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for key, value in cookies %}\n\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t\t<td>{{ value|escape }}</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>{% trans \"No COOKIE data\" %}</p>\n{% endif %}\n\n<h4>{% trans 'SESSION Variables' %}</h4>\n{% if session %}\n\t<table>\n\t\t<colgroup>\n\t\t\t<col style=\"width:20%\"/>\n\t\t\t<col/>\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>{% trans \"Variable\" %}</th>\n\t\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for key, value in session %}\n\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t\t<td>{{ value|escape }}</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>{% trans \"No SESSION data\" %}</p>\n{% endif %}\n\n<h4>{% trans 'GET Variables' %}</h4>\n{% if get %}\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>{% trans \"Variable\" %}</th>\n\t\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for key, value in get %}\n\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t\t<td>{{ value|join:\", \"|escape }}</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>{% trans \"No GET data\" %}</p>\n{% endif %}\n\n<h4>{% trans 'POST Variables' %}</h4>\n{% if post %}\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>{% trans \"Variable\" %}</th>\n\t\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for key, value in post %}\n\t\t\t\t<tr class=\"{% cycle 'row1' 'row2' %}\">\n\t\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t\t<td>{{ value|join:\", \"|escape }}</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>{% trans \"No POST data\" %}</p>\n{% endif %}\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/settings_vars.html",
    "content": "{% load i18n %}\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Setting\" %}</th>\n\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for var in settings.items|dictsort:\"0\" %}\n\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t<td>{{ var.0 }}</td>\n\t\t\t\t<td><code>{{ var.1|pprint }}</code></td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/signals.html",
    "content": "{% load i18n %}\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Signal\" %}</th>\n\t\t\t<th>{% trans 'Providing Args' %}</th>\n\t\t\t<th>{% trans 'Receivers' %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for name, signal, receivers in signals %}\n\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t<td>{{ name|escape }}</td>\n\t\t\t\t<td>{{ signal.providing_args|join:\", \" }}</td>\n\t\t\t\t<td>{{ receivers|join:\", \" }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/sql.html",
    "content": "{% load i18n %}\n<div class=\"clearfix\">\n\t<ul class=\"stats\">\n\t\t{% for alias, info in databases %}\n\t\t\t<li>\n\t\t\t\t<strong class=\"label\"><span style=\"background-color: rgb({{ info.rgb_color|join:\", \" }})\" class=\"color\">&nbsp;</span> {{ alias }}</strong>\n\t\t\t\t<span class=\"info\">{{ info.time_spent|floatformat:\"2\" }} ms ({% blocktrans count info.num_queries as num %}{{ num }} query{% plural %}{{ num }} queries{% endblocktrans %})</span>\n\t\t\t</li>\n\t\t{% endfor %}\n\t</ul>\n</div>\n\n{% if queries %}\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th class=\"color\">&nbsp;</th>\n\t\t\t\t<th class=\"query\" colspan=\"2\">{% trans 'Query' %}</th>\n\t\t\t\t<th class=\"timeline\">{% trans 'Timeline' %}</th>\n\t\t\t\t<th class=\"time\">{% trans 'Time (ms)' %}</th>\n\t\t\t\t<th class=\"actions\">{% trans \"Action\" %}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t{% for query in queries %}\n\t\t\t\t<tr class=\"djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %}{% if query.starts_trans %} djDebugStartTransaction{% endif %}{% if query.ends_trans %} djDebugEndTransaction{% endif %}{% if query.in_trans %} djDebugInTransaction{% endif %}\" id=\"sqlMain_{{ forloop.counter }}\">\n\t\t\t\t\t<td class=\"color\"><span style=\"background-color: rgb({{ query.rgb_color|join:\", \" }});\">&nbsp;</span></td>\n\t\t\t\t\t<td class=\"toggle\">\n\t\t\t\t\t\t<a class=\"djToggleSwitch\" data-toggle-id=\"{{ forloop.counter }}\" data-toggle-open=\"+\" data-toggle-close=\"-\" href=\"javascript:void(0)\">+</a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"query\">\n\t\t\t\t\t\t<div class=\"djDebugSqlWrap\">\n\t\t\t\t\t\t\t<div class=\"djDebugSql\">{{ query.sql|safe }}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"timeline\">\n\t\t\t\t\t\t<div class=\"djDebugTimeline\"><div class=\"djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %}\" style=\"left:{{ query.start_offset }}%;\"><strong style=\"width:{{ query.width_ratio }}%;\">{{ query.width_ratio }}%</strong></div></div>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"time\">\n\t\t\t\t\t\t{{ query.duration|floatformat:\"2\" }}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"actions\">\n\t\t\t\t\t{% if query.params %}\n\t\t\t\t\t\t{% if query.is_select %}\n\t\t\t\t\t\t\t<a class=\"remoteCall\" href=\"/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:\"2\"|urlencode }}&amp;hash={{ query.hash }}\">Sel</a>\n\t\t\t\t\t\t\t<a class=\"remoteCall\" href=\"/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:\"2\"|urlencode }}&amp;hash={{ query.hash }}\">Expl</a>\n\t\t\t\t\t\t\t{% ifequal query.engine 'mysql' %}\n\t\t\t\t\t\t\t\t<a class=\"remoteCall\" href=\"/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:\"2\"|urlencode }}&amp;hash={{ query.hash }}\">Prof</a>\n\t\t\t\t\t\t\t{% endifequal %}\n\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class=\"djUnselected djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %} djToggleDetails_{{ forloop.counter }}\" id=\"sqlDetails_{{ forloop.counter }}\">\n\t\t\t\t\t<td colspan=\"2\"></td>\n\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t<div class=\"djSQLDetailsDiv\">\n\t\t\t\t\t\t\t<p><strong>Connection:</strong> {{ query.alias }}</p>\n\t\t\t\t\t\t\t{% if query.iso_level %}\n\t\t\t\t\t\t\t\t<p><strong>Isolation Level:</strong> {{ query.iso_level }}</p>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t\t{% if query.trans_status %}\n\t\t\t\t\t\t\t\t<p><strong>Transaction Status:</strong> {{ query.trans_status }}</p>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t\t{% if query.stacktrace %}\n\t\t\t\t\t\t\t\t<pre class=\"stack\">{{ query.stacktrace }}</pre>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t\t{% if query.template_info %}\n\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t{% for line in query.template_info.context %}\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>{{ line.num }}</td>\n\t\t\t\t\t\t\t\t\t\t<td><code style=\"font-family: monospace;{% if line.highlight %}background-color: lightgrey{% endif %}\">{{ line.content }}</code></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t<p><strong>{{ query.template_info.name|default:\"(unknown)\" }}</strong></p>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t</table>\n{% else %}\n\t<p>No SQL queries were recorded during this request.</p>\n{% endif %}\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/sql_explain.html",
    "content": "{% load i18n %}\n<div class=\"djDebugPanelTitle\">\n\t<a class=\"djDebugClose djDebugBack\" href=\"\">{% trans \"Back\" %}</a>\n\t<h3>{% trans \"SQL Explained\" %}</h3>\n</div>\n<div class=\"djDebugPanelContent\">\n\t<div class=\"scroll\">\n\t\t<dl>\n\t\t\t<dt>{% trans \"Executed SQL\" %}</dt>\n\t\t\t<dd>{{ sql|safe }}</dd>\n\t\t\t<dt>{% trans \"Time\" %}</dt>\n\t\t\t<dd>{{ duration }} ms</dd>\n\t\t</dl>\n\t\t<table class=\"djSqlExplain\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t{% for h in headers %}\n\t\t\t\t\t\t<th>{{ h|upper }}</th>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t{% for row in result %}\n\t\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t\t{% for column in row %}\n\t\t\t\t\t\t\t<td>{{ column|escape }}</td>\n\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t</tr>\n\t\t\t\t{% endfor %}\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</div>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/sql_profile.html",
    "content": "{% load i18n %}\n<div class=\"djDebugPanelTitle\">\n\t<a class=\"djDebugClose djDebugBack\" href=\"\">{% trans \"Back\" %}</a>\n\t<h3>{% trans \"SQL Profiled\" %}</h3>\n</div>\n<div class=\"djDebugPanelContent\">\n\t<div class=\"scroll\">\n\t\t{% if result %}\n\t\t\t<dl>\n\t\t\t\t<dt>{% trans \"Executed SQL\" %}</dt>\n\t\t\t\t<dd>{{ sql|safe }}</dd>\n\t\t\t\t<dt>{% trans \"Time\" %}</dt>\n\t\t\t\t<dd>{{ duration }} ms</dd>\n\t\t\t</dl>\n\t\t\t<table class=\"djSqlProfile\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{% for h in headers %}\n\t\t\t\t\t\t\t<th>{{ h|upper }}</th>\n\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t{% for row in result %}\n\t\t\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t\t\t{% for column in row %}\n\t\t\t\t\t\t\t\t<td>{{ column|escape }}</td>\n\t\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t{% else %}\n\t\t\t<dl>\n\t\t\t\t<dt>{% trans 'Error' %}</dt>\n\t\t\t\t<dd>{{ result_error }}</dd>\n\t\t\t</dl>\n\t\t{% endif %}\n\t</div>\n</div>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/sql_select.html",
    "content": "{% load i18n %}\n<div class=\"djDebugPanelTitle\">\n\t<a class=\"djDebugClose djDebugBack\" href=\"\">{% trans \"Back\" %}</a>\n\t<h3>{% trans \"SQL Selected\" %}</h3>\n</div>\n<div class=\"djDebugPanelContent\">\n\t<div class=\"scroll\">\n\t\t<dl>\n\t\t\t<dt>{% trans \"Executed SQL\" %}</dt>\n\t\t\t<dd>{{ sql|safe }}</dd>\n\t\t\t<dt>{% trans \"Time\" %}</dt>\n\t\t\t<dd>{{ duration }} ms</dd>\n\t\t</dl>\n\t\t{% if result %}\n\t\t<table class=\"djSqlSelect\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t{% for h in headers %}\n\t\t\t\t\t\t<th>{{ h|upper }}</th>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t{% for row in result %}\n\t\t\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t\t\t{% for column in row %}\n\t\t\t\t\t\t\t<td>{{ column|escape }}</td>\n\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t</tr>\n\t\t\t\t{% endfor %}\n\t\t\t</tbody>\n\t\t</table>\n\t\t{% else %}\n\t\t\t<p>{% trans \"Empty set\" %}</p>\n\t\t{% endif %}\n\t</div>\n</div>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/template_source.html",
    "content": "{% load i18n %}\n<div class=\"djDebugPanelTitle\">\n\t<a class=\"djDebugClose djDebugBack\" href=\"\">{% trans \"Back\" %}</a>\n\t<h3>{% trans 'Template Source' %}: <code>{{ template_name }}</code></h3>\n</div>\n<div class=\"djDebugPanelContent\">\n\t<div class=\"scroll\">\n\t\t{% if not source.pygmentized %}\n\t\t\t<code>{{ source }}</code>\n\t\t{% else %}\n\t\t\t{{ source }}\n\t\t{% endif %}\n\t</div>\n</div>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/templates.html",
    "content": "{% load i18n %}\n<h4>{% trans 'Template path' %}{{ template_dirs|length|pluralize }}</h4>\n{% if template_dirs %}\n\t<ol>\n\t{% for template in template_dirs %}\n\t\t<li>{{ template }}</li>\n\t{% endfor %}\n\t</ol>\n{% else %}\n\t<p>None</p>\n{% endif %}\n\n<h4>{% trans \"Template\" %}{{ templates|length|pluralize }}</h4>\n{% if templates %}\n<dl>\n{% for template in templates %}\n\t<dt><strong><a class=\"remoteCall toggleTemplate\" href=\"/__debug__/template_source/?template={{ template.template.name }}\">{{ template.template.name|addslashes }}</a></strong></dt>\n\t<dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd>\n\t{% if template.context %}\n\t<dd>\n\t\t<div class=\"djTemplateShowContextDiv\"><a class=\"djTemplateShowContext\"><span class=\"toggleArrow\">&#x25B6;</span> {% trans 'Toggle Context' %}</a></div>\n\t\t<div class=\"djTemplateHideContextDiv\" style=\"display:none;\"><code>{{ template.context }}</code></div>\n\t</dd>\n\t{% endif %}\n{% endfor %}\n</dl>\n{% else %}\n\t<p>{% trans 'None' %}</p>\n{% endif %}\n\n<h4>{% trans 'Context processor' %}{{ context_processors|length|pluralize }}</h4>\n{% if context_processors %}\n<dl>\n{% for key, value in context_processors.iteritems %}\n\t<dt><strong>{{ key|escape }}</strong></dt>\n\t<dd>\n\t\t<div class=\"djTemplateShowContextDiv\"><a class=\"djTemplateShowContext\"><span class=\"toggleArrow\">&#x25B6;</span> {% trans 'Toggle Context' %}</a></div>\n\t\t<div class=\"djTemplateHideContextDiv\" style=\"display:none;\"><code>{{ value|escape }}</code></div>\n\t</dd>\n{% endfor %}\n</dl>\n{% else %}\n\t<p>{% trans 'None' %}</p>\n{% endif %}\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/timer.html",
    "content": "{% load i18n %}\n<table>\n\t<colgroup>\n\t\t<col style=\"width:20%\"/>\n\t\t<col/>\n\t</colgroup>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Resource\" %}</th>\n\t\t\t<th>{% trans \"Value\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for key, value in rows %}\n\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t<td>{{ key|escape }}</td>\n\t\t\t\t<td>{{ value|escape }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/panels/versions.html",
    "content": "{% load i18n %}\n\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>{% trans \"Package\" %}</th>\n\t\t\t<th>{% trans \"Version\" %}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for package, version in versions.iteritems %}\n\t\t\t<tr class=\"{% cycle 'djDebugOdd' 'djDebugEven' %}\">\n\t\t\t\t<td>{{ package }}</td>\n\t\t\t\t<td>{{ version }}</td>\n\t\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n"
  },
  {
    "path": "debug_toolbar/templates/debug_toolbar/redirect.html",
    "content": "{% load i18n %}\n<html>\n<head>\n</head>\n<body>\n<h1>HttpResponseRedirect</h1>\n<p>{% trans 'Location' %}: <a href=\"{{ redirect_to }}\">{{ redirect_to }}</a></p>\n<p class=\"notice\">\n\t{% trans \"The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes.  You can click the above link to continue with the redirect as normal.  If you'd like to disable this feature, set the <code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key <code>INTERCEPT_REDIRECTS</code> to <code>False</code>.\" %}\n</p>\n</body>\n</html>\n"
  },
  {
    "path": "debug_toolbar/tests/__init__.py",
    "content": "from tests import *"
  },
  {
    "path": "debug_toolbar/tests/templates/404.html",
    "content": ""
  },
  {
    "path": "debug_toolbar/tests/tests.py",
    "content": "from debug_toolbar.middleware import DebugToolbarMiddleware\nfrom debug_toolbar.panels.sql import SQLDebugPanel\nfrom debug_toolbar.toolbar.loader import DebugToolbar\nfrom debug_toolbar.utils.tracking import pre_dispatch, post_dispatch, callbacks\n\nfrom django.contrib.auth.models import User\nfrom django.test import TestCase\n\nfrom dingus import Dingus\nimport thread\n\nclass BaseTestCase(TestCase):\n    def setUp(self):\n        request = Dingus('request')\n        toolbar = DebugToolbar(request)\n        DebugToolbarMiddleware.debug_toolbars[thread.get_ident()] = toolbar\n        self.toolbar = toolbar\n\nclass DebugToolbarTestCase(BaseTestCase):\n    urls = 'debug_toolbar.tests.urls'\n    \n    def test_middleware(self):\n        resp = self.client.get('/execute_sql/')\n        self.assertEquals(resp.status_code, 200)\n\nclass SQLPanelTestCase(BaseTestCase):\n    def test_recording(self):\n        panel = self.toolbar.get_panel(SQLDebugPanel)\n        self.assertEquals(len(panel._queries), 0)\n        \n        list(User.objects.all())\n        \n        # ensure query was logged\n        self.assertEquals(len(panel._queries), 1)\n        query = panel._queries[0]\n        self.assertEquals(query[0], 'default')\n        self.assertTrue('sql' in query[1])\n        self.assertTrue('duration' in query[1])\n        self.assertTrue('stacktrace' in query[1])\n\ndef module_func(*args, **kwargs):\n    \"\"\"Used by dispatch tests\"\"\"\n    return 'blah'\n\nclass TrackingTestCase(BaseTestCase):\n    @classmethod\n    def class_method(cls, *args, **kwargs):\n        return 'blah'\n\n    def class_func(self, *args, **kwargs):\n        \"\"\"Used by dispatch tests\"\"\"\n        return 'blah'\n    \n    def test_pre_hook(self):\n        foo = {}\n        \n        @pre_dispatch(module_func)\n        def test(**kwargs):\n            foo.update(kwargs)\n            \n        self.assertTrue(hasattr(module_func, '__wrapped__'))\n        self.assertEquals(len(callbacks['before']), 1)\n        \n        module_func('hi', foo='bar')\n        \n        self.assertTrue('sender' in foo, foo)\n        # best we can do\n        self.assertEquals(foo['sender'].__name__, 'module_func')\n        self.assertTrue('start' in foo, foo)\n        self.assertTrue(foo['start'] > 0)\n        self.assertTrue('stop' not in foo, foo)\n        self.assertTrue('args' in foo, foo)\n        self.assertTrue(len(foo['args']), 1)\n        self.assertEquals(foo['args'][0], 'hi')\n        self.assertTrue('kwargs' in foo, foo)\n        self.assertTrue(len(foo['kwargs']), 1)\n        self.assertTrue('foo' in foo['kwargs'])\n        self.assertEquals(foo['kwargs']['foo'], 'bar')\n    \n        callbacks['before'] = {}\n    \n        @pre_dispatch(TrackingTestCase.class_func)\n        def test(**kwargs):\n            foo.update(kwargs)\n    \n        self.assertTrue(hasattr(TrackingTestCase.class_func, '__wrapped__'))\n        self.assertEquals(len(callbacks['before']), 1)\n\n        self.class_func('hello', foo='bar')\n\n        self.assertTrue('sender' in foo, foo)\n        # best we can do\n        self.assertEquals(foo['sender'].__name__, 'class_func')\n        self.assertTrue('start' in foo, foo)\n        self.assertTrue(foo['start'] > 0)\n        self.assertTrue('stop' not in foo, foo)\n        self.assertTrue('args' in foo, foo)\n        self.assertTrue(len(foo['args']), 2)\n        self.assertEquals(foo['args'][1], 'hello')\n        self.assertTrue('kwargs' in foo, foo)\n        self.assertTrue(len(foo['kwargs']), 1)\n        self.assertTrue('foo' in foo['kwargs'])\n        self.assertEquals(foo['kwargs']['foo'], 'bar')\n\n        # callbacks['before'] = {}\n        #     \n        #         @pre_dispatch(TrackingTestCase.class_method)\n        #         def test(**kwargs):\n        #             foo.update(kwargs)\n        #     \n        #         self.assertTrue(hasattr(TrackingTestCase.class_method, '__wrapped__'))\n        #         self.assertEquals(len(callbacks['before']), 1)\n        # \n        #         TrackingTestCase.class_method()\n        # \n        #         self.assertTrue('sender' in foo, foo)\n        #         # best we can do\n        #         self.assertEquals(foo['sender'].__name__, 'class_method')\n        #         self.assertTrue('start' in foo, foo)\n        #         self.assertTrue('stop' not in foo, foo)\n        #         self.assertTrue('args' in foo, foo)\n\n    def test_post_hook(self):\n        foo = {}\n        \n        @post_dispatch(module_func)\n        def test(**kwargs):\n            foo.update(kwargs)\n            \n        self.assertTrue(hasattr(module_func, '__wrapped__'))\n        self.assertEquals(len(callbacks['after']), 1)\n        \n        module_func('hi', foo='bar')\n        \n        self.assertTrue('sender' in foo, foo)\n        # best we can do\n        self.assertEquals(foo['sender'].__name__, 'module_func')\n        self.assertTrue('start' in foo, foo)\n        self.assertTrue(foo['start'] > 0)\n        self.assertTrue('stop' in foo, foo)\n        self.assertTrue(foo['stop'] > foo['start'])\n        self.assertTrue('args' in foo, foo)\n        self.assertTrue(len(foo['args']), 1)\n        self.assertEquals(foo['args'][0], 'hi')\n        self.assertTrue('kwargs' in foo, foo)\n        self.assertTrue(len(foo['kwargs']), 1)\n        self.assertTrue('foo' in foo['kwargs'])\n        self.assertEquals(foo['kwargs']['foo'], 'bar')\n    \n        callbacks['after'] = {}\n    \n        @post_dispatch(TrackingTestCase.class_func)\n        def test(**kwargs):\n            foo.update(kwargs)\n    \n        self.assertTrue(hasattr(TrackingTestCase.class_func, '__wrapped__'))\n        self.assertEquals(len(callbacks['after']), 1)\n\n        self.class_func('hello', foo='bar')\n\n        self.assertTrue('sender' in foo, foo)\n        # best we can do\n        self.assertEquals(foo['sender'].__name__, 'class_func')\n        self.assertTrue('start' in foo, foo)\n        self.assertTrue(foo['start'] > 0)\n        self.assertTrue('stop' in foo, foo)\n        self.assertTrue(foo['stop'] > foo['start'])\n        self.assertTrue('args' in foo, foo)\n        self.assertTrue(len(foo['args']), 2)\n        self.assertEquals(foo['args'][1], 'hello')\n        self.assertTrue('kwargs' in foo, foo)\n        self.assertTrue(len(foo['kwargs']), 1)\n        self.assertTrue('foo' in foo['kwargs'])\n        self.assertEquals(foo['kwargs']['foo'], 'bar')"
  },
  {
    "path": "debug_toolbar/tests/urls.py",
    "content": "\"\"\"\nURLpatterns for the debug toolbar. \n\nThese should not be loaded explicitly; the debug toolbar middleware will patch\nthis into the urlconf for the request.\n\"\"\"\nfrom django.conf.urls.defaults import *\nfrom django.contrib import admin\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n    url(r'^execute_sql/$', 'debug_toolbar.tests.views.execute_sql'),\n)\n"
  },
  {
    "path": "debug_toolbar/tests/views.py",
    "content": "from django.contrib.auth.models import User\nfrom django.http import HttpResponse\n\ndef execute_sql(request):\n    list(User.objects.all())\n    \n    return HttpResponse()"
  },
  {
    "path": "debug_toolbar/toolbar/__init__.py",
    "content": ""
  },
  {
    "path": "debug_toolbar/toolbar/loader.py",
    "content": "\"\"\"\nThe main DebugToolbar class that loads and renders the Toolbar.\n\"\"\"\nimport os.path, os\n\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.utils.datastructures import SortedDict\nfrom django.utils.safestring import mark_safe\n\nclass DebugToolbar(object):\n\n    def __init__(self, request):\n        self.request = request\n        self._panels = SortedDict()\n        base_url = self.request.META.get('SCRIPT_NAME', '')\n        self.config = {\n            'INTERCEPT_REDIRECTS': True,\n            'MEDIA_URL': u'%s/__debug__/m/' % base_url\n        }\n        # Check if settings has a DEBUG_TOOLBAR_CONFIG and updated config\n        self.config.update(getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}))\n        self.template_context = {\n            'BASE_URL': base_url, # for backwards compatibility\n            'DEBUG_TOOLBAR_MEDIA_URL': self.config.get('MEDIA_URL'),\n        }\n        # Override this tuple by copying to settings.py as `DEBUG_TOOLBAR_PANELS`\n        self.default_panels = (\n            'debug_toolbar.panels.version.VersionDebugPanel',\n            'debug_toolbar.panels.timer.TimerDebugPanel',\n            'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',\n            'debug_toolbar.panels.headers.HeaderDebugPanel',\n            'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',\n            'debug_toolbar.panels.sql.SQLDebugPanel',\n            'debug_toolbar.panels.template.TemplateDebugPanel',\n            #'debug_toolbar.panels.cache.CacheDebugPanel',\n            'debug_toolbar.panels.signals.SignalDebugPanel',\n            'debug_toolbar.panels.logger.LoggingPanel',\n        )\n        self.load_panels()\n    \n    def _get_panels(self):\n        return self._panels.values()\n    panels = property(_get_panels)\n\n    def get_panel(self, cls):\n        return self._panels[cls]\n\n    def load_panels(self):\n        \"\"\"\n        Populate debug panels\n        \"\"\"\n        from django.conf import settings\n        from django.core import exceptions\n\n        # Check if settings has a DEBUG_TOOLBAR_PANELS, otherwise use default\n        if hasattr(settings, 'DEBUG_TOOLBAR_PANELS'):\n            self.default_panels = settings.DEBUG_TOOLBAR_PANELS\n\n        for panel_path in self.default_panels:\n            try:\n                dot = panel_path.rindex('.')\n            except ValueError:\n                raise exceptions.ImproperlyConfigured, '%s isn\\'t a debug panel module' % panel_path\n            panel_module, panel_classname = panel_path[:dot], panel_path[dot+1:]\n            try:\n                mod = __import__(panel_module, {}, {}, [''])\n            except ImportError, e:\n                raise exceptions.ImproperlyConfigured, 'Error importing debug panel %s: \"%s\"' % (panel_module, e)\n            try:\n                panel_class = getattr(mod, panel_classname)\n            except AttributeError:\n                raise exceptions.ImproperlyConfigured, 'Toolbar Panel module \"%s\" does not define a \"%s\" class' % (panel_module, panel_classname)\n\n            try:\n                panel_instance = panel_class(context=self.template_context)\n            except:\n                raise # Bubble up problem loading panel\n\n            self._panels[panel_class] = panel_instance\n\n    def render_toolbar(self):\n        \"\"\"\n        Renders the overall Toolbar with panels inside.\n        \"\"\"\n        media_path = os.path.join(os.path.dirname(__file__), os.pardir, 'media', 'debug_toolbar')\n        \n        context = self.template_context.copy()\n        context.update({\n            'panels': self.panels,\n            'js': mark_safe(open(os.path.join(media_path, 'js', 'toolbar.min.js'), 'r').read()),\n            'css': mark_safe(open(os.path.join(media_path, 'css', 'toolbar.min.css'), 'r').read()),\n        })\n\n        return render_to_string('debug_toolbar/base.html', context)\n"
  },
  {
    "path": "debug_toolbar/urls.py",
    "content": "\"\"\"\nURLpatterns for the debug toolbar. \n\nThese should not be loaded explicitly; the debug toolbar middleware will patch\nthis into the urlconf for the request.\n\"\"\"\nfrom django.conf.urls.defaults import *\nfrom django.conf import settings\n\n_PREFIX = '__debug__'\n\nurlpatterns = patterns('',\n    url(r'^%s/m/(.*)$' % _PREFIX, 'debug_toolbar.views.debug_media'),\n    url(r'^%s/sql_select/$' % _PREFIX, 'debug_toolbar.views.sql_select', name='sql_select'),\n    url(r'^%s/sql_explain/$' % _PREFIX, 'debug_toolbar.views.sql_explain', name='sql_explain'),\n    url(r'^%s/sql_profile/$' % _PREFIX, 'debug_toolbar.views.sql_profile', name='sql_profile'),\n    url(r'^%s/template_source/$' % _PREFIX, 'debug_toolbar.views.template_source', name='template_source'),\n)\n"
  },
  {
    "path": "debug_toolbar/utils/__init__.py",
    "content": "import os.path\nimport django\nimport SocketServer\n\nfrom django.conf import settings\nfrom django.views.debug import linebreak_iter\n\n# Figure out some paths\ndjango_path = os.path.realpath(os.path.dirname(django.__file__))\nsocketserver_path = os.path.realpath(os.path.dirname(SocketServer.__file__))\n\ndef ms_from_timedelta(td):\n    \"\"\"\n    Given a timedelta object, returns a float representing milliseconds\n    \"\"\"\n    return (td.seconds * 1000) + (td.microseconds / 1000.0)\n\ndef tidy_stacktrace(strace):\n    \"\"\"\n    Clean up stacktrace and remove all entries that:\n    1. Are part of Django (except contrib apps)\n    2. Are part of SocketServer (used by Django's dev server)\n    3. Are the last entry (which is part of our stacktracing code)\n    \"\"\"\n    trace = []\n    for s in strace[:-1]:\n        s_path = os.path.realpath(s[0])\n        if getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}).get('HIDE_DJANGO_SQL', True) \\\n            and django_path in s_path and not 'django/contrib' in s_path:\n            continue\n        if socketserver_path in s_path:\n            continue\n        trace.append((s[0], s[1], s[2], s[3]))\n    return trace\n\ndef get_template_info(source, context_lines=3):\n    line = 0\n    upto = 0\n    source_lines = []\n    before = during = after = \"\"\n\n    origin, (start, end) = source\n    template_source = origin.reload()\n\n    for num, next in enumerate(linebreak_iter(template_source)):\n        if start >= upto and end <= next:\n            line = num\n            before = template_source[upto:start]\n            during = template_source[start:end]\n            after = template_source[end:next]\n        source_lines.append((num, template_source[upto:next]))\n        upto = next\n\n    top = max(1, line - context_lines)\n    bottom = min(len(source_lines), line + 1 + context_lines)\n\n    context = []\n    for num, content in source_lines[top:bottom]:\n        context.append({\n            'num': num,\n            'content': content,\n            'highlight': (num == line),\n        })\n\n    return {\n        'name': origin.name,\n        'context': context,\n    }"
  },
  {
    "path": "debug_toolbar/utils/compat/__init__.py",
    "content": ""
  },
  {
    "path": "debug_toolbar/utils/compat/db.py",
    "content": "from django.conf import settings\ntry:\n    from django.db import connections\n    dbconf = settings.DATABASES\nexcept ImportError:\n    # Compat with < Django 1.2\n    from django.db import connection\n    connections = {'default': connection}\n    dbconf = {\n        'default': {\n            'ENGINE': settings.DATABASE_ENGINE,\n        }\n    }"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/__init__.py",
    "content": "# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com\n#\n# This module is part of python-sqlparse and is released under\n# the BSD License: http://www.opensource.org/licenses/bsd-license.php.\n\n\"\"\"Parse SQL statements.\"\"\"\n\n\n__version__ = '0.1.1'\n\n\nimport os\n\n\nclass SQLParseError(Exception):\n    \"\"\"Base class for exceptions in this module.\"\"\"\n\n\n# Setup namespace\nfrom debug_toolbar.utils.sqlparse import engine\nfrom debug_toolbar.utils.sqlparse import filters\nfrom debug_toolbar.utils.sqlparse import formatter\n\n\ndef parse(sql):\n    \"\"\"Parse sql and return a list of statements.\n\n    *sql* is a single string containting one or more SQL statements.\n\n    Returns a tuple of :class:`~sqlparse.sql.Statement` instances.\n    \"\"\"\n    stack = engine.FilterStack()\n    stack.full_analyze()\n    return tuple(stack.run(sql))\n\n\ndef format(sql, **options):\n    \"\"\"Format *sql* according to *options*.\n\n    Available options are documented in :ref:`formatting`.\n\n    Returns the formatted SQL statement as string.\n    \"\"\"\n    stack = engine.FilterStack()\n    options = formatter.validate_options(options)\n    stack = formatter.build_filter_stack(stack, options)\n    stack.postprocess.append(filters.SerializerUnicode())\n    return ''.join(stack.run(sql))\n\n\ndef split(sql):\n    \"\"\"Split *sql* into single statements.\n\n    Returns a list of strings.\n    \"\"\"\n    stack = engine.FilterStack()\n    stack.split_statements = True\n    return [unicode(stmt) for stmt in stack.run(sql)]\n\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/engine/__init__.py",
    "content": "# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com\n#\n# This module is part of python-sqlparse and is released under\n# the BSD License: http://www.opensource.org/licenses/bsd-license.php.\n\n\"\"\"filter\"\"\"\n\nimport re\n\nfrom debug_toolbar.utils.sqlparse import lexer, SQLParseError\nfrom debug_toolbar.utils.sqlparse.engine import grouping\nfrom debug_toolbar.utils.sqlparse.engine.filter import StatementFilter\n\n# XXX remove this when cleanup is complete\nFilter = object\n\n\nclass FilterStack(object):\n\n    def __init__(self):\n        self.preprocess = []\n        self.stmtprocess = []\n        self.postprocess = []\n        self.split_statements = False\n        self._grouping = False\n\n    def _flatten(self, stream):\n        for token in stream:\n            if token.is_group():\n                for t in self._flatten(token.tokens):\n                    yield t\n            else:\n                yield token\n\n    def enable_grouping(self):\n        self._grouping = True\n\n    def full_analyze(self):\n        self.enable_grouping()\n\n    def run(self, sql):\n        stream = lexer.tokenize(sql)\n        # Process token stream\n        if self.preprocess:\n           for filter_ in self.preprocess:\n               stream = filter_.process(self, stream)\n\n        if (self.stmtprocess or self.postprocess or self.split_statements\n            or self._grouping):\n            splitter = StatementFilter()\n            stream = splitter.process(self, stream)\n\n        if self._grouping:\n            def _group(stream):\n                for stmt in stream:\n                    grouping.group(stmt)\n                    yield stmt\n            stream = _group(stream)\n\n        if self.stmtprocess:\n            def _run(stream):\n                ret = []\n                for stmt in stream:\n                    for filter_ in self.stmtprocess:\n                        filter_.process(self, stmt)\n                    ret.append(stmt)\n                return ret\n            stream = _run(stream)\n\n        if self.postprocess:\n            def _run(stream):\n                for stmt in stream:\n                    stmt.tokens = list(self._flatten(stmt.tokens))\n                    for filter_ in self.postprocess:\n                        stmt = filter_.process(self, stmt)\n                    yield stmt\n            stream = _run(stream)\n\n        return stream\n\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/engine/filter.py",
    "content": "# -*- coding: utf-8 -*-\n\nfrom debug_toolbar.utils.sqlparse import tokens as T\nfrom debug_toolbar.utils.sqlparse.engine.grouping import Statement, Token\n\n\nclass TokenFilter(object):\n\n    def __init__(self, **options):\n        self.options = options\n\n    def process(self, stack, stream):\n        \"\"\"Process token stream.\"\"\"\n        raise NotImplementedError\n\n\nclass StatementFilter(TokenFilter):\n\n    def __init__(self):\n        TokenFilter.__init__(self)\n        self._in_declare = False\n        self._in_dbldollar = False\n        self._is_create = False\n\n    def _reset(self):\n        self._in_declare = False\n        self._in_dbldollar = False\n        self._is_create = False\n\n    def _change_splitlevel(self, ttype, value):\n        # PostgreSQL\n        if (ttype == T.Name.Builtin\n            and value.startswith('$') and value.endswith('$')):\n            if self._in_dbldollar:\n                self._in_dbldollar = False\n                return -1\n            else:\n                self._in_dbldollar = True\n                return 1\n        elif self._in_dbldollar:\n            return 0\n\n        # ANSI\n        if ttype is not T.Keyword:\n            return 0\n\n        unified = value.upper()\n\n        if unified == 'DECLARE':\n            self._in_declare = True\n            return 1\n\n        if unified == 'BEGIN':\n            if self._in_declare:\n                return 0\n            return 0\n\n        if unified == 'END':\n            # Should this respect a preceeding BEGIN?\n            # In CASE ... WHEN ... END this results in a split level -1.\n            return -1\n\n        if ttype is T.Keyword.DDL and unified.startswith('CREATE'):\n            self._is_create = True\n\n        if unified in ('IF', 'FOR') and self._is_create:\n            return 1\n\n        # Default\n        return 0\n\n    def process(self, stack, stream):\n        splitlevel = 0\n        stmt = None\n        consume_ws = False\n        stmt_tokens = []\n        for ttype, value in stream:\n            # Before appending the token\n            if (consume_ws and ttype is not T.Whitespace\n                and ttype is not T.Comment.Single):\n                consume_ws = False\n                stmt.tokens = stmt_tokens\n                yield stmt\n                self._reset()\n                stmt = None\n                splitlevel = 0\n            if stmt is None:\n                stmt = Statement()\n                stmt_tokens = []\n            splitlevel += self._change_splitlevel(ttype, value)\n            # Append the token\n            stmt_tokens.append(Token(ttype, value))\n            # After appending the token\n            if (splitlevel <= 0 and ttype is T.Punctuation\n                and value == ';'):\n                consume_ws = True\n        if stmt is not None:\n            stmt.tokens = stmt_tokens\n            yield stmt\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/engine/grouping.py",
    "content": "# -*- coding: utf-8 -*-\n\nimport itertools\nimport re\nimport types\n\nfrom debug_toolbar.utils.sqlparse import tokens as T\nfrom debug_toolbar.utils.sqlparse.sql import *\n\n\n\ndef _group_left_right(tlist, ttype, value, cls,\n                      check_right=lambda t: True,\n                      include_semicolon=False):\n    [_group_left_right(sgroup, ttype, value, cls, check_right,\n                       include_semicolon) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, cls)]\n    idx = 0\n    token = tlist.token_next_match(idx, ttype, value)\n    while token:\n        right = tlist.token_next(tlist.token_index(token))\n        left = tlist.token_prev(tlist.token_index(token))\n        if (right is None or not check_right(right)\n            or left is None):\n            token = tlist.token_next_match(tlist.token_index(token)+1,\n                                           ttype, value)\n        else:\n            if include_semicolon:\n                right = tlist.token_next_match(tlist.token_index(right),\n                                               T.Punctuation, ';')\n            tokens = tlist.tokens_between(left, right)[1:]\n            if not isinstance(left, cls):\n                new = cls([left])\n                new_idx = tlist.token_index(left)\n                tlist.tokens.remove(left)\n                tlist.tokens.insert(new_idx, new)\n                left = new\n            left.tokens.extend(tokens)\n            for t in tokens:\n                tlist.tokens.remove(t)\n            token = tlist.token_next_match(tlist.token_index(left)+1,\n                                           ttype, value)\n\ndef _group_matching(tlist, start_ttype, start_value, end_ttype, end_value,\n                    cls, include_semicolon=False, recurse=False):\n    def _find_matching(i, tl, stt, sva, ett, eva):\n        depth = 1\n        for t in tl.tokens[i:]:\n            if t.match(stt, sva):\n                depth += 1\n            elif t.match(ett, eva):\n                depth -= 1\n                if depth == 1:\n                    return t\n        return None\n    [_group_matching(sgroup, start_ttype, start_value, end_ttype, end_value,\n                     cls, include_semicolon) for sgroup in tlist.get_sublists()\n     if recurse]\n    if isinstance(tlist, cls):\n        idx = 1\n    else:\n        idx = 0\n    token = tlist.token_next_match(idx, start_ttype, start_value)\n    while token:\n        tidx = tlist.token_index(token)\n        end = _find_matching(tidx, tlist, start_ttype, start_value,\n                             end_ttype, end_value)\n        if end is None:\n            idx = tidx+1\n        else:\n            if include_semicolon:\n                next_ = tlist.token_next(tlist.token_index(end))\n                if next_ and next_.match(T.Punctuation, ';'):\n                    end = next_\n            group = tlist.group_tokens(cls, tlist.tokens_between(token, end))\n            _group_matching(group, start_ttype, start_value,\n                            end_ttype, end_value, cls, include_semicolon)\n            idx = tlist.token_index(group)+1\n        token = tlist.token_next_match(idx, start_ttype, start_value)\n\ndef group_if(tlist):\n    _group_matching(tlist, T.Keyword, 'IF', T.Keyword, 'END IF', If, True)\n\ndef group_for(tlist):\n    _group_matching(tlist, T.Keyword, 'FOR', T.Keyword, 'END LOOP', For, True)\n\ndef group_as(tlist):\n    _group_left_right(tlist, T.Keyword, 'AS', Identifier)\n\ndef group_assignment(tlist):\n    _group_left_right(tlist, T.Assignment, ':=', Assignment,\n                      include_semicolon=True)\n\ndef group_comparsion(tlist):\n    _group_left_right(tlist, T.Operator, None, Comparsion)\n\n\ndef group_case(tlist):\n    _group_matching(tlist, T.Keyword, 'CASE', T.Keyword, 'END', Case,\n                    include_semicolon=True, recurse=True)\n\n\ndef group_identifier(tlist):\n    def _consume_cycle(tl, i):\n        x = itertools.cycle((lambda y: y.match(T.Punctuation, '.'),\n                             lambda y: y.ttype in (T.String.Symbol,\n                                                   T.Name,\n                                                   T.Wildcard)))\n        for t in tl.tokens[i:]:\n            if x.next()(t):\n                yield t\n            else:\n                raise StopIteration\n\n    # bottom up approach: group subgroups first\n    [group_identifier(sgroup) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, Identifier)]\n\n    # real processing\n    idx = 0\n    token = tlist.token_next_by_type(idx, (T.String.Symbol, T.Name))\n    while token:\n        identifier_tokens = [token]+list(\n            _consume_cycle(tlist,\n                           tlist.token_index(token)+1))\n        group = tlist.group_tokens(Identifier, identifier_tokens)\n        idx = tlist.token_index(group)+1\n        token = tlist.token_next_by_type(idx, (T.String.Symbol, T.Name))\n\n\ndef group_identifier_list(tlist):\n    [group_identifier_list(sgroup) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, (Identifier, IdentifierList))]\n    idx = 0\n    # Allowed list items\n    fend1_funcs = [lambda t: isinstance(t, Identifier),\n                   lambda t: t.is_whitespace(),\n                   lambda t: t.ttype == T.Wildcard,\n                   lambda t: t.match(T.Keyword, 'null'),\n                   lambda t: t.ttype == T.Number.Integer,\n                   lambda t: t.ttype == T.String.Single,\n                   lambda t: isinstance(t, Comparsion),\n                   ]\n    tcomma = tlist.token_next_match(idx, T.Punctuation, ',')\n    start = None\n    while tcomma is not None:\n        before = tlist.token_prev(tcomma)\n        after = tlist.token_next(tcomma)\n        # Check if the tokens around tcomma belong to a list\n        bpassed = apassed = False\n        for func in fend1_funcs:\n            if before is not None and func(before):\n                bpassed = True\n            if after is not None and func(after):\n                apassed = True\n        if not bpassed or not apassed:\n            # Something's wrong here, skip ahead to next \",\"\n            start = None\n            tcomma = tlist.token_next_match(tlist.token_index(tcomma)+1,\n                                            T.Punctuation, ',')\n        else:\n            if start is None:\n                start = before\n            next_ = tlist.token_next(after)\n            if next_ is None or not next_.match(T.Punctuation, ','):\n                # Reached the end of the list\n                tokens = tlist.tokens_between(start, after)\n                group = tlist.group_tokens(IdentifierList, tokens)\n                start = None\n                tcomma = tlist.token_next_match(tlist.token_index(group)+1,\n                                                T.Punctuation, ',')\n            else:\n                tcomma = next_\n\n\ndef group_parenthesis(tlist):\n    _group_matching(tlist, T.Punctuation, '(', T.Punctuation, ')', Parenthesis)\n\ndef group_comments(tlist):\n    [group_comments(sgroup) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, Comment)]\n    idx = 0\n    token = tlist.token_next_by_type(idx, T.Comment)\n    while token:\n        tidx = tlist.token_index(token)\n        end = tlist.token_not_matching(tidx+1,\n                                       [lambda t: t.ttype in T.Comment,\n                                        lambda t: t.is_whitespace()])\n        if end is None:\n            idx = tidx + 1\n        else:\n            eidx = tlist.token_index(end)\n            grp_tokens = tlist.tokens_between(token,\n                                              tlist.token_prev(eidx, False))\n            group = tlist.group_tokens(Comment, grp_tokens)\n            idx = tlist.token_index(group)\n        token = tlist.token_next_by_type(idx, T.Comment)\n\ndef group_where(tlist):\n    [group_where(sgroup) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, Where)]\n    idx = 0\n    token = tlist.token_next_match(idx, T.Keyword, 'WHERE')\n    stopwords = ('ORDER', 'GROUP', 'LIMIT', 'UNION')\n    while token:\n        tidx = tlist.token_index(token)\n        end = tlist.token_next_match(tidx+1, T.Keyword, stopwords)\n        if end is None:\n            end = tlist.tokens[-1]\n        else:\n            end = tlist.tokens[tlist.token_index(end)-1]\n        group = tlist.group_tokens(Where, tlist.tokens_between(token, end))\n        idx = tlist.token_index(group)\n        token = tlist.token_next_match(idx, T.Keyword, 'WHERE')\n\ndef group_aliased(tlist):\n    [group_aliased(sgroup) for sgroup in tlist.get_sublists()\n     if not isinstance(sgroup, Identifier)]\n    idx = 0\n    token = tlist.token_next_by_instance(idx, Identifier)\n    while token:\n        next_ = tlist.token_next(tlist.token_index(token))\n        if next_ is not None and isinstance(next_, Identifier):\n            grp = tlist.tokens_between(token, next_)[1:]\n            token.tokens.extend(grp)\n            for t in grp:\n                tlist.tokens.remove(t)\n        idx = tlist.token_index(token)+1\n        token = tlist.token_next_by_instance(idx, Identifier)\n\n\ndef group_typecasts(tlist):\n    _group_left_right(tlist, T.Punctuation, '::', Identifier)\n\n\ndef group(tlist):\n    for func in [group_parenthesis,\n                 group_comments,\n                 group_where,\n                 group_case,\n                 group_identifier,\n                 group_typecasts,\n                 group_as,\n                 group_aliased,\n                 group_assignment,\n                 group_comparsion,\n                 group_identifier_list,\n                 group_if,\n                 group_for,]:\n        func(tlist)\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/filters.py",
    "content": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom debug_toolbar.utils.sqlparse.engine import grouping\nfrom debug_toolbar.utils.sqlparse import tokens as T\nfrom debug_toolbar.utils.sqlparse import sql\n\n\nclass Filter(object):\n\n    def process(self, *args):\n        raise NotImplementedError\n\n\nclass TokenFilter(Filter):\n\n    def process(self, stack, stream):\n        raise NotImplementedError\n\n\n# FIXME: Should be removed\ndef rstrip(stream):\n    buff = []\n    for token in stream:\n        if token.is_whitespace() and '\\n' in token.value:\n            # assuming there's only one \\n in value\n            before, rest = token.value.split('\\n', 1)\n            token.value = '\\n%s' % rest\n            buff = []\n            yield token\n        elif token.is_whitespace():\n            buff.append(token)\n        elif token.is_group():\n            token.tokens = list(rstrip(token.tokens))\n            # process group and look if it starts with a nl\n            if token.tokens and token.tokens[0].is_whitespace():\n                before, rest = token.tokens[0].value.split('\\n', 1)\n                token.tokens[0].value = '\\n%s' % rest\n                buff = []\n            while buff:\n                yield buff.pop(0)\n            yield token\n        else:\n            while buff:\n                yield buff.pop(0)\n            yield token\n\n\n# --------------------------\n# token process\n\nclass _CaseFilter(TokenFilter):\n\n    ttype = None\n\n    def __init__(self, case=None):\n        if case is None:\n            case = 'upper'\n        assert case in ['lower', 'upper', 'capitalize']\n        self.convert = getattr(unicode, case)\n\n    def process(self, stack, stream):\n        for ttype, value in stream:\n            if ttype in self.ttype:\n                value = self.convert(value)\n            yield ttype, value\n\n\nclass KeywordCaseFilter(_CaseFilter):\n    ttype = T.Keyword\n\n\nclass IdentifierCaseFilter(_CaseFilter):\n    ttype = (T.Name, T.String.Symbol)\n\n\n# ----------------------\n# statement process\n\nclass StripCommentsFilter(Filter):\n\n    def _process(self, tlist):\n        idx = 0\n        clss = set([x.__class__ for x in tlist.tokens])\n        while grouping.Comment in clss:\n            token = tlist.token_next_by_instance(0, grouping.Comment)\n            tidx = tlist.token_index(token)\n            prev = tlist.token_prev(tidx, False)\n            next_ = tlist.token_next(tidx, False)\n            # Replace by whitespace if prev and next exist and if they're not\n            # whitespaces. This doesn't apply if prev or next is a paranthesis.\n            if (prev is not None and next_ is not None\n                and not prev.is_whitespace() and not next_.is_whitespace()\n                and not (prev.match(T.Punctuation, '(')\n                         or next_.match(T.Punctuation, ')'))):\n                tlist.tokens[tidx] = grouping.Token(T.Whitespace, ' ')\n            else:\n                tlist.tokens.pop(tidx)\n            clss = set([x.__class__ for x in tlist.tokens])\n\n    def process(self, stack, stmt):\n        [self.process(stack, sgroup) for sgroup in stmt.get_sublists()]\n        self._process(stmt)\n\n\nclass StripWhitespaceFilter(Filter):\n\n    def _stripws(self, tlist):\n        func_name = '_stripws_%s' % tlist.__class__.__name__.lower()\n        func = getattr(self, func_name, self._stripws_default)\n        func(tlist)\n\n    def _stripws_default(self, tlist):\n        last_was_ws = False\n        for token in tlist.tokens:\n            if token.is_whitespace():\n                if last_was_ws:\n                    token.value = ''\n                else:\n                    token.value = ' '\n            last_was_ws = token.is_whitespace()\n\n    def _stripws_parenthesis(self, tlist):\n        if tlist.tokens[1].is_whitespace():\n            tlist.tokens.pop(1)\n        if tlist.tokens[-2].is_whitespace():\n            tlist.tokens.pop(-2)\n        self._stripws_default(tlist)\n\n    def process(self, stack, stmt):\n        [self.process(stack, sgroup) for sgroup in stmt.get_sublists()]\n        self._stripws(stmt)\n        if stmt.tokens[-1].is_whitespace():\n            stmt.tokens.pop(-1)\n\n\nclass ReindentFilter(Filter):\n\n    def __init__(self, width=2, char=' ', line_width=None):\n        self.width = width\n        self.char = char\n        self.indent = 0\n        self.offset = 0\n        self.line_width = line_width\n        self._curr_stmt = None\n        self._last_stmt = None\n\n    def _get_offset(self, token):\n        all_ = list(self._curr_stmt.flatten())\n        idx = all_.index(token)\n        raw = ''.join(unicode(x) for x in all_[:idx+1])\n        line = raw.splitlines()[-1]\n        # Now take current offset into account and return relative offset.\n        full_offset = len(line)-(len(self.char*(self.width*self.indent)))\n        return full_offset - self.offset\n\n    def nl(self):\n        # TODO: newline character should be configurable\n        ws = '\\n'+(self.char*((self.indent*self.width)+self.offset))\n        return grouping.Token(T.Whitespace, ws)\n\n    def _split_kwds(self, tlist):\n        split_words = ('FROM', 'JOIN$', 'AND', 'OR',\n                       'GROUP', 'ORDER', 'UNION', 'VALUES',\n                       'SET')\n        idx = 0\n        token = tlist.token_next_match(idx, T.Keyword, split_words,\n                                       regex=True)\n        while token:\n            prev = tlist.token_prev(tlist.token_index(token), False)\n            offset = 1\n            if prev and prev.is_whitespace():\n                tlist.tokens.pop(tlist.token_index(prev))\n                offset += 1\n            if (prev\n                and isinstance(prev, sql.Comment)\n                and (str(prev).endswith('\\n')\n                     or str(prev).endswith('\\r'))):\n                nl = tlist.token_next(token)\n            else:\n                nl = self.nl()\n                tlist.insert_before(token, nl)\n            token = tlist.token_next_match(tlist.token_index(nl)+offset,\n                                           T.Keyword, split_words, regex=True)\n\n    def _split_statements(self, tlist):\n        idx = 0\n        token = tlist.token_next_by_type(idx, (T.Keyword.DDL, T.Keyword.DML))\n        while token:\n            prev = tlist.token_prev(tlist.token_index(token), False)\n            if prev and prev.is_whitespace():\n                tlist.tokens.pop(tlist.token_index(prev))\n            # only break if it's not the first token\n            if prev:\n                nl = self.nl()\n                tlist.insert_before(token, nl)\n            token = tlist.token_next_by_type(tlist.token_index(token)+1,\n                                             (T.Keyword.DDL, T.Keyword.DML))\n\n    def _process(self, tlist):\n        func_name = '_process_%s' % tlist.__class__.__name__.lower()\n        func = getattr(self, func_name, self._process_default)\n        func(tlist)\n\n    def _process_where(self, tlist):\n        token = tlist.token_next_match(0, T.Keyword, 'WHERE')\n        tlist.insert_before(token, self.nl())\n        self.indent += 1\n        self._process_default(tlist)\n        self.indent -= 1\n\n    def _process_parenthesis(self, tlist):\n        first = tlist.token_next(0)\n        indented = False\n        if first and first.ttype in (T.Keyword.DML, T.Keyword.DDL):\n            self.indent += 1\n            tlist.tokens.insert(0, self.nl())\n            indented = True\n        num_offset = self._get_offset(tlist.token_next_match(0,\n                                                        T.Punctuation, '('))\n        self.offset += num_offset\n        self._process_default(tlist, stmts=not indented)\n        if indented:\n            self.indent -= 1\n        self.offset -= num_offset\n\n    def _process_identifierlist(self, tlist):\n        identifiers = tlist.get_identifiers()\n        if len(identifiers) > 1:\n            first = list(identifiers[0].flatten())[0]\n            num_offset = self._get_offset(first)-len(first.value)\n            self.offset += num_offset\n            for token in identifiers[1:]:\n                tlist.insert_before(token, self.nl())\n            self.offset -= num_offset\n        self._process_default(tlist)\n\n    def _process_case(self, tlist):\n        cases = tlist.get_cases()\n        is_first = True\n        num_offset = None\n        case = tlist.tokens[0]\n        outer_offset = self._get_offset(case)-len(case.value)\n        self.offset += outer_offset\n        for cond, value in tlist.get_cases():\n            if is_first:\n                is_first = False\n                num_offset = self._get_offset(cond[0])-len(cond[0].value)\n                self.offset += num_offset\n                continue\n            if cond is None:\n                token = value[0]\n            else:\n                token = cond[0]\n            tlist.insert_before(token, self.nl())\n        # Line breaks on group level are done. Now let's add an offset of\n        # 5 (=length of \"when\", \"then\", \"else\") and process subgroups.\n        self.offset += 5\n        self._process_default(tlist)\n        self.offset -= 5\n        if num_offset is not None:\n            self.offset -= num_offset\n        end = tlist.token_next_match(0, T.Keyword, 'END')\n        tlist.insert_before(end, self.nl())\n        self.offset -= outer_offset\n\n    def _process_default(self, tlist, stmts=True, kwds=True):\n        if stmts:\n            self._split_statements(tlist)\n        if kwds:\n            self._split_kwds(tlist)\n        [self._process(sgroup) for sgroup in tlist.get_sublists()]\n\n    def process(self, stack, stmt):\n        if isinstance(stmt, grouping.Statement):\n            self._curr_stmt = stmt\n        self._process(stmt)\n        if isinstance(stmt, grouping.Statement):\n            if self._last_stmt is not None:\n                if self._last_stmt.to_unicode().endswith('\\n'):\n                    nl = '\\n'\n                else:\n                    nl = '\\n\\n'\n                stmt.tokens.insert(0,\n                    grouping.Token(T.Whitespace, nl))\n            if self._last_stmt != stmt:\n                self._last_stmt = stmt\n\n\n# FIXME: Doesn't work ;)\nclass RightMarginFilter(Filter):\n\n    keep_together = (\n#        grouping.TypeCast, grouping.Identifier, grouping.Alias,\n    )\n\n    def __init__(self, width=79):\n        self.width = width\n        self.line = ''\n\n    def _process(self, stack, group, stream):\n        for token in stream:\n            if token.is_whitespace() and '\\n' in token.value:\n                if token.value.endswith('\\n'):\n                    self.line = ''\n                else:\n                    self.line = token.value.splitlines()[-1]\n            elif (token.is_group()\n                  and not token.__class__ in self.keep_together):\n                token.tokens = self._process(stack, token, token.tokens)\n            else:\n                val = token.to_unicode()\n                if len(self.line) + len(val) > self.width:\n                    match = re.search('^ +', self.line)\n                    if match is not None:\n                        indent = match.group()\n                    else:\n                        indent = ''\n                    yield grouping.Token(T.Whitespace, '\\n%s' % indent)\n                    self.line = indent\n                self.line += val\n            yield token\n\n    def process(self, stack, group):\n        return\n        group.tokens = self._process(stack, group, group.tokens)\n\n\n# ---------------------------\n# postprocess\n\nclass SerializerUnicode(Filter):\n\n    def process(self, stack, stmt):\n        raw = stmt.to_unicode()\n        add_nl = raw.endswith('\\n')\n        res = '\\n'.join(line.rstrip() for line in raw.splitlines())\n        if add_nl:\n            res += '\\n'\n        return res\n\n\nclass OutputPythonFilter(Filter):\n\n    def __init__(self, varname='sql'):\n        self.varname = varname\n        self.cnt = 0\n\n    def _process(self, stream, varname, count, has_nl):\n        if count > 1:\n            yield grouping.Token(T.Whitespace, '\\n')\n        yield grouping.Token(T.Name, varname)\n        yield grouping.Token(T.Whitespace, ' ')\n        yield grouping.Token(T.Operator, '=')\n        yield grouping.Token(T.Whitespace, ' ')\n        if has_nl:\n            yield grouping.Token(T.Operator, '(')\n        yield grouping.Token(T.Text, \"'\")\n        cnt = 0\n        for token in stream:\n            cnt += 1\n            if token.is_whitespace() and '\\n' in token.value:\n                if cnt == 1:\n                    continue\n                after_lb = token.value.split('\\n', 1)[1]\n                yield grouping.Token(T.Text, \" '\")\n                yield grouping.Token(T.Whitespace, '\\n')\n                for i in range(len(varname)+4):\n                    yield grouping.Token(T.Whitespace, ' ')\n                yield grouping.Token(T.Text, \"'\")\n                if after_lb:  # it's the indendation\n                    yield grouping.Token(T.Whitespace, after_lb)\n                continue\n            elif token.value and \"'\" in token.value:\n                token.value = token.value.replace(\"'\", \"\\\\'\")\n            yield grouping.Token(T.Text, token.value or '')\n        yield grouping.Token(T.Text, \"'\")\n        if has_nl:\n            yield grouping.Token(T.Operator, ')')\n\n    def process(self, stack, stmt):\n        self.cnt += 1\n        if self.cnt > 1:\n            varname = '%s%d' % (self.varname, self.cnt)\n        else:\n            varname = self.varname\n        has_nl = len(stmt.to_unicode().strip().splitlines()) > 1\n        stmt.tokens = self._process(stmt.tokens, varname, self.cnt, has_nl)\n        return stmt\n\n\nclass OutputPHPFilter(Filter):\n\n    def __init__(self, varname='sql'):\n        self.varname = '$%s' % varname\n        self.count = 0\n\n    def _process(self, stream, varname):\n        if self.count > 1:\n            yield grouping.Token(T.Whitespace, '\\n')\n        yield grouping.Token(T.Name, varname)\n        yield grouping.Token(T.Whitespace, ' ')\n        yield grouping.Token(T.Operator, '=')\n        yield grouping.Token(T.Whitespace, ' ')\n        yield grouping.Token(T.Text, '\"')\n        cnt = 0\n        for token in stream:\n            if token.is_whitespace() and '\\n' in token.value:\n#                cnt += 1\n#                if cnt == 1:\n#                    continue\n                after_lb = token.value.split('\\n', 1)[1]\n                yield grouping.Token(T.Text, ' \"')\n                yield grouping.Token(T.Operator, ';')\n                yield grouping.Token(T.Whitespace, '\\n')\n                yield grouping.Token(T.Name, varname)\n                yield grouping.Token(T.Whitespace, ' ')\n                yield grouping.Token(T.Punctuation, '.')\n                yield grouping.Token(T.Operator, '=')\n                yield grouping.Token(T.Whitespace, ' ')\n                yield grouping.Token(T.Text, '\"')\n                if after_lb:\n                    yield grouping.Token(T.Text, after_lb)\n                continue\n            elif '\"' in token.value:\n                token.value = token.value.replace('\"', '\\\\\"')\n            yield grouping.Token(T.Text, token.value)\n        yield grouping.Token(T.Text, '\"')\n        yield grouping.Token(T.Punctuation, ';')\n\n    def process(self, stack, stmt):\n        self.count += 1\n        if self.count > 1:\n            varname = '%s%d' % (self.varname, self.count)\n        else:\n            varname = self.varname\n        stmt.tokens = tuple(self._process(stmt.tokens, varname))\n        return stmt\n\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/formatter.py",
    "content": "# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com\n#\n# This module is part of python-sqlparse and is released under\n# the BSD License: http://www.opensource.org/licenses/bsd-license.php.\n\n\"\"\"SQL formatter\"\"\"\n\nfrom debug_toolbar.utils.sqlparse import SQLParseError\nfrom debug_toolbar.utils.sqlparse import filters\n\n\ndef validate_options(options):\n    \"\"\"Validates options.\"\"\"\n    kwcase = options.get('keyword_case', None)\n    if kwcase not in [None, 'upper', 'lower', 'capitalize']:\n        raise SQLParseError('Invalid value for keyword_case: %r' % kwcase)\n\n    idcase = options.get('identifier_case', None)\n    if idcase not in [None, 'upper', 'lower', 'capitalize']:\n        raise SQLParseError('Invalid value for identifier_case: %r' % idcase)\n\n    ofrmt = options.get('output_format', None)\n    if ofrmt not in [None, 'sql', 'python', 'php']:\n        raise SQLParseError('Unknown output format: %r' % ofrmt)\n\n    strip_comments = options.get('strip_comments', False)\n    if strip_comments not in [True, False]:\n        raise SQLParseError('Invalid value for strip_comments: %r'\n                            % strip_comments)\n\n    strip_ws = options.get('strip_whitespace', False)\n    if strip_ws not in [True, False]:\n        raise SQLParseError('Invalid value for strip_whitespace: %r'\n                            % strip_ws)\n\n    reindent = options.get('reindent', False)\n    if reindent not in [True, False]:\n        raise SQLParseError('Invalid value for reindent: %r'\n                            % reindent)\n    elif reindent:\n        options['strip_whitespace'] = True\n    indent_tabs = options.get('indent_tabs', False)\n    if indent_tabs not in [True, False]:\n        raise SQLParseError('Invalid value for indent_tabs: %r' % indent_tabs)\n    elif indent_tabs:\n        options['indent_char'] = '\\t'\n    else:\n        options['indent_char'] = ' '\n    indent_width = options.get('indent_width', 2)\n    try:\n        indent_width = int(indent_width)\n    except (TypeError, ValueError):\n        raise SQLParseError('indent_width requires an integer')\n    if indent_width < 1:\n        raise SQLParseError('indent_width requires an positive integer')\n    options['indent_width'] = indent_width\n\n    right_margin = options.get('right_margin', None)\n    if right_margin is not None:\n        try:\n            right_margin = int(right_margin)\n        except (TypeError, ValueError):\n            raise SQLParseError('right_margin requires an integer')\n        if right_margin < 10:\n            raise SQLParseError('right_margin requires an integer > 10')\n    options['right_margin'] = right_margin\n\n    return options\n\n\ndef build_filter_stack(stack, options):\n    \"\"\"Setup and return a filter stack.\n\n    Args:\n      stack: :class:`~sqlparse.filters.FilterStack` instance\n      options: Dictionary with options validated by validate_options.\n    \"\"\"\n    # Token filter\n    if 'keyword_case' in options:\n        stack.preprocess.append(\n            filters.KeywordCaseFilter(options['keyword_case']))\n\n    if 'identifier_case' in options:\n        stack.preprocess.append(\n            filters.IdentifierCaseFilter(options['identifier_case']))\n\n    # After grouping\n    if options.get('strip_comments', False):\n        stack.enable_grouping()\n        stack.stmtprocess.append(filters.StripCommentsFilter())\n\n    if (options.get('strip_whitespace', False)\n        or options.get('reindent', False)):\n        stack.enable_grouping()\n        stack.stmtprocess.append(filters.StripWhitespaceFilter())\n\n    if options.get('reindent', False):\n        stack.enable_grouping()\n        stack.stmtprocess.append(\n            filters.ReindentFilter(char=options['indent_char'],\n                                   width=options['indent_width']))\n\n    if options.get('right_margin', False):\n        stack.enable_grouping()\n        stack.stmtprocess.append(\n            filters.RightMarginFilter(width=options['right_margin']))\n\n    # Serializer\n    if options.get('output_format'):\n        frmt = options['output_format']\n        if frmt.lower() == 'php':\n            fltr = filters.OutputPHPFilter()\n        elif frmt.lower() == 'python':\n            fltr = filters.OutputPythonFilter()\n        else:\n            fltr = None\n        if fltr is not None:\n            stack.postprocess.append(fltr)\n\n    return stack\n\n\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/keywords.py",
    "content": "from debug_toolbar.utils.sqlparse.tokens import *\n\nKEYWORDS = {\n    'ABORT': Keyword,\n    'ABS': Keyword,\n    'ABSOLUTE': Keyword,\n    'ACCESS': Keyword,\n    'ADA': Keyword,\n    'ADD': Keyword,\n    'ADMIN': Keyword,\n    'AFTER': Keyword,\n    'AGGREGATE': Keyword,\n    'ALIAS': Keyword,\n    'ALL': Keyword,\n    'ALLOCATE': Keyword,\n    'ANALYSE': Keyword,\n    'ANALYZE': Keyword,\n    'AND': Keyword,\n    'ANY': Keyword,\n    'ARE': Keyword,\n    'AS': Keyword,\n    'ASC': Keyword,\n    'ASENSITIVE': Keyword,\n    'ASSERTION': Keyword,\n    'ASSIGNMENT': Keyword,\n    'ASYMMETRIC': Keyword,\n    'AT': Keyword,\n    'ATOMIC': Keyword,\n    'AUTHORIZATION': Keyword,\n    'AVG': Keyword,\n\n    'BACKWARD': Keyword,\n    'BEFORE': Keyword,\n    'BEGIN': Keyword,\n    'BETWEEN': Keyword,\n    'BITVAR': Keyword,\n    'BIT_LENGTH': Keyword,\n    'BOTH': Keyword,\n    'BREADTH': Keyword,\n    'BY': Keyword,\n\n#    'C': Keyword,  # most likely this is an alias\n    'CACHE': Keyword,\n    'CALL': Keyword,\n    'CALLED': Keyword,\n    'CARDINALITY': Keyword,\n    'CASCADE': Keyword,\n    'CASCADED': Keyword,\n    'CASE': Keyword,\n    'CAST': Keyword,\n    'CATALOG': Keyword,\n    'CATALOG_NAME': Keyword,\n    'CHAIN': Keyword,\n    'CHARACTERISTICS': Keyword,\n    'CHARACTER_LENGTH': Keyword,\n    'CHARACTER_SET_CATALOG': Keyword,\n    'CHARACTER_SET_NAME': Keyword,\n    'CHARACTER_SET_SCHEMA': Keyword,\n    'CHAR_LENGTH': Keyword,\n    'CHECK': Keyword,\n    'CHECKED': Keyword,\n    'CHECKPOINT': Keyword,\n    'CLASS': Keyword,\n    'CLASS_ORIGIN': Keyword,\n    'CLOB': Keyword,\n    'CLOSE': Keyword,\n    'CLUSTER': Keyword,\n    'COALSECE': Keyword,\n    'COBOL': Keyword,\n    'COLLATE': Keyword,\n    'COLLATION': Keyword,\n    'COLLATION_CATALOG': Keyword,\n    'COLLATION_NAME': Keyword,\n    'COLLATION_SCHEMA': Keyword,\n    'COLUMN': Keyword,\n    'COLUMN_NAME': Keyword,\n    'COMMAND_FUNCTION': Keyword,\n    'COMMAND_FUNCTION_CODE': Keyword,\n    'COMMENT': Keyword,\n    'COMMIT': Keyword,\n    'COMMITTED': Keyword,\n    'COMPLETION': Keyword,\n    'CONDITION_NUMBER': Keyword,\n    'CONNECT': Keyword,\n    'CONNECTION': Keyword,\n    'CONNECTION_NAME': Keyword,\n    'CONSTRAINT': Keyword,\n    'CONSTRAINTS': Keyword,\n    'CONSTRAINT_CATALOG': Keyword,\n    'CONSTRAINT_NAME': Keyword,\n    'CONSTRAINT_SCHEMA': Keyword,\n    'CONSTRUCTOR': Keyword,\n    'CONTAINS': Keyword,\n    'CONTINUE': Keyword,\n    'CONVERSION': Keyword,\n    'CONVERT': Keyword,\n    'COPY': Keyword,\n    'CORRESPONTING': Keyword,\n    'COUNT': Keyword,\n    'CREATEDB': Keyword,\n    'CREATEUSER': Keyword,\n    'CROSS': Keyword,\n    'CUBE': Keyword,\n    'CURRENT': Keyword,\n    'CURRENT_DATE': Keyword,\n    'CURRENT_PATH': Keyword,\n    'CURRENT_ROLE': Keyword,\n    'CURRENT_TIME': Keyword,\n    'CURRENT_TIMESTAMP': Keyword,\n    'CURRENT_USER': Keyword,\n    'CURSOR': Keyword,\n    'CURSOR_NAME': Keyword,\n    'CYCLE': Keyword,\n\n    'DATA': Keyword,\n    'DATABASE': Keyword,\n    'DATETIME_INTERVAL_CODE': Keyword,\n    'DATETIME_INTERVAL_PRECISION': Keyword,\n    'DAY': Keyword,\n    'DEALLOCATE': Keyword,\n    'DECLARE': Keyword,\n    'DEFAULT': Keyword,\n    'DEFAULTS': Keyword,\n    'DEFERRABLE': Keyword,\n    'DEFERRED': Keyword,\n    'DEFINED': Keyword,\n    'DEFINER': Keyword,\n    'DELIMITER': Keyword,\n    'DELIMITERS': Keyword,\n    'DEREF': Keyword,\n    'DESC': Keyword,\n    'DESCRIBE': Keyword,\n    'DESCRIPTOR': Keyword,\n    'DESTROY': Keyword,\n    'DESTRUCTOR': Keyword,\n    'DETERMINISTIC': Keyword,\n    'DIAGNOSTICS': Keyword,\n    'DICTIONARY': Keyword,\n    'DISCONNECT': Keyword,\n    'DISPATCH': Keyword,\n    'DISTINCT': Keyword,\n    'DO': Keyword,\n    'DOMAIN': Keyword,\n    'DYNAMIC': Keyword,\n    'DYNAMIC_FUNCTION': Keyword,\n    'DYNAMIC_FUNCTION_CODE': Keyword,\n\n    'EACH': Keyword,\n    'ELSE': Keyword,\n    'ENCODING': Keyword,\n    'ENCRYPTED': Keyword,\n    'END': Keyword,\n    'END-EXEC': Keyword,\n    'EQUALS': Keyword,\n    'ESCAPE': Keyword,\n    'EVERY': Keyword,\n    'EXCEPT': Keyword,\n    'ESCEPTION': Keyword,\n    'EXCLUDING': Keyword,\n    'EXCLUSIVE': Keyword,\n    'EXEC': Keyword,\n    'EXECUTE': Keyword,\n    'EXISTING': Keyword,\n    'EXISTS': Keyword,\n    'EXTERNAL': Keyword,\n    'EXTRACT': Keyword,\n\n    'FALSE': Keyword,\n    'FETCH': Keyword,\n    'FINAL': Keyword,\n    'FIRST': Keyword,\n    'FOR': Keyword,\n    'FORCE': Keyword,\n    'FOREIGN': Keyword,\n    'FORTRAN': Keyword,\n    'FORWARD': Keyword,\n    'FOUND': Keyword,\n    'FREE': Keyword,\n    'FREEZE': Keyword,\n    'FROM': Keyword,\n    'FULL': Keyword,\n    'FUNCTION': Keyword,\n\n    'G': Keyword,\n    'GENERAL': Keyword,\n    'GENERATED': Keyword,\n    'GET': Keyword,\n    'GLOBAL': Keyword,\n    'GO': Keyword,\n    'GOTO': Keyword,\n    'GRANT': Keyword,\n    'GRANTED': Keyword,\n    'GROUP': Keyword,\n    'GROUPING': Keyword,\n\n    'HANDLER': Keyword,\n    'HAVING': Keyword,\n    'HIERARCHY': Keyword,\n    'HOLD': Keyword,\n    'HOST': Keyword,\n\n    'IDENTITY': Keyword,\n    'IF': Keyword,\n    'IGNORE': Keyword,\n    'ILIKE': Keyword,\n    'IMMEDIATE': Keyword,\n    'IMMUTABLE': Keyword,\n\n    'IMPLEMENTATION': Keyword,\n    'IMPLICIT': Keyword,\n    'IN': Keyword,\n    'INCLUDING': Keyword,\n    'INCREMENT': Keyword,\n    'INDEX': Keyword,\n\n    'INDITCATOR': Keyword,\n    'INFIX': Keyword,\n    'INHERITS': Keyword,\n    'INITIALIZE': Keyword,\n    'INITIALLY': Keyword,\n    'INNER': Keyword,\n    'INOUT': Keyword,\n    'INPUT': Keyword,\n    'INSENSITIVE': Keyword,\n    'INSTANTIABLE': Keyword,\n    'INSTEAD': Keyword,\n    'INTERSECT': Keyword,\n    'INTO': Keyword,\n    'INVOKER': Keyword,\n    'IS': Keyword,\n    'ISNULL': Keyword,\n    'ISOLATION': Keyword,\n    'ITERATE': Keyword,\n\n    'JOIN': Keyword,\n\n    'K': Keyword,\n    'KEY': Keyword,\n    'KEY_MEMBER': Keyword,\n    'KEY_TYPE': Keyword,\n\n    'LANCOMPILER': Keyword,\n    'LANGUAGE': Keyword,\n    'LARGE': Keyword,\n    'LAST': Keyword,\n    'LATERAL': Keyword,\n    'LEADING': Keyword,\n    'LEFT': Keyword,\n    'LENGTH': Keyword,\n    'LESS': Keyword,\n    'LEVEL': Keyword,\n    'LIKE': Keyword,\n    'LIMIT': Keyword,\n    'LISTEN': Keyword,\n    'LOAD': Keyword,\n    'LOCAL': Keyword,\n    'LOCALTIME': Keyword,\n    'LOCALTIMESTAMP': Keyword,\n    'LOCATION': Keyword,\n    'LOCATOR': Keyword,\n    'LOCK': Keyword,\n    'LOWER': Keyword,\n\n    'M': Keyword,\n    'MAP': Keyword,\n    'MATCH': Keyword,\n    'MAX': Keyword,\n    'MAXVALUE': Keyword,\n    'MESSAGE_LENGTH': Keyword,\n    'MESSAGE_OCTET_LENGTH': Keyword,\n    'MESSAGE_TEXT': Keyword,\n    'METHOD': Keyword,\n    'MIN': Keyword,\n    'MINUTE': Keyword,\n    'MINVALUE': Keyword,\n    'MOD': Keyword,\n    'MODE': Keyword,\n    'MODIFIES': Keyword,\n    'MODIFY': Keyword,\n    'MONTH': Keyword,\n    'MORE': Keyword,\n    'MOVE': Keyword,\n    'MUMPS': Keyword,\n\n    'NAMES': Keyword,\n    'NATIONAL': Keyword,\n    'NATURAL': Keyword,\n    'NCHAR': Keyword,\n    'NCLOB': Keyword,\n    'NEW': Keyword,\n    'NEXT': Keyword,\n    'NO': Keyword,\n    'NOCREATEDB': Keyword,\n    'NOCREATEUSER': Keyword,\n    'NONE': Keyword,\n    'NOT': Keyword,\n    'NOTHING': Keyword,\n    'NOTIFY': Keyword,\n    'NOTNULL': Keyword,\n    'NULL': Keyword,\n    'NULLABLE': Keyword,\n    'NULLIF': Keyword,\n\n    'OBJECT': Keyword,\n    'OCTET_LENGTH': Keyword,\n    'OF': Keyword,\n    'OFF': Keyword,\n    'OFFSET': Keyword,\n    'OIDS': Keyword,\n    'OLD': Keyword,\n    'ON': Keyword,\n    'ONLY': Keyword,\n    'OPEN': Keyword,\n    'OPERATION': Keyword,\n    'OPERATOR': Keyword,\n    'OPTION': Keyword,\n    'OPTIONS': Keyword,\n    'OR': Keyword,\n    'ORDER': Keyword,\n    'ORDINALITY': Keyword,\n    'OUT': Keyword,\n    'OUTER': Keyword,\n    'OUTPUT': Keyword,\n    'OVERLAPS': Keyword,\n    'OVERLAY': Keyword,\n    'OVERRIDING': Keyword,\n    'OWNER': Keyword,\n\n    'PAD': Keyword,\n    'PARAMETER': Keyword,\n    'PARAMETERS': Keyword,\n    'PARAMETER_MODE': Keyword,\n    'PARAMATER_NAME': Keyword,\n    'PARAMATER_ORDINAL_POSITION': Keyword,\n    'PARAMETER_SPECIFIC_CATALOG': Keyword,\n    'PARAMETER_SPECIFIC_NAME': Keyword,\n    'PARAMATER_SPECIFIC_SCHEMA': Keyword,\n    'PARTIAL': Keyword,\n    'PASCAL': Keyword,\n    'PENDANT': Keyword,\n    'PLACING': Keyword,\n    'PLI': Keyword,\n    'POSITION': Keyword,\n    'POSTFIX': Keyword,\n    'PRECISION': Keyword,\n    'PREFIX': Keyword,\n    'PREORDER': Keyword,\n    'PREPARE': Keyword,\n    'PRESERVE': Keyword,\n    'PRIMARY': Keyword,\n    'PRIOR': Keyword,\n    'PRIVILEGES': Keyword,\n    'PROCEDURAL': Keyword,\n    'PROCEDURE': Keyword,\n    'PUBLIC': Keyword,\n\n    'RAISE': Keyword,\n    'READ': Keyword,\n    'READS': Keyword,\n    'RECHECK': Keyword,\n    'RECURSIVE': Keyword,\n    'REF': Keyword,\n    'REFERENCES': Keyword,\n    'REFERENCING': Keyword,\n    'REINDEX': Keyword,\n    'RELATIVE': Keyword,\n    'RENAME': Keyword,\n    'REPEATABLE': Keyword,\n    'REPLACE': Keyword,\n    'RESET': Keyword,\n    'RESTART': Keyword,\n    'RESTRICT': Keyword,\n    'RESULT': Keyword,\n    'RETURN': Keyword,\n    'RETURNED_LENGTH': Keyword,\n    'RETURNED_OCTET_LENGTH': Keyword,\n    'RETURNED_SQLSTATE': Keyword,\n    'RETURNS': Keyword,\n    'REVOKE': Keyword,\n    'RIGHT': Keyword,\n    'ROLE': Keyword,\n    'ROLLBACK': Keyword,\n    'ROLLUP': Keyword,\n    'ROUTINE': Keyword,\n    'ROUTINE_CATALOG': Keyword,\n    'ROUTINE_NAME': Keyword,\n    'ROUTINE_SCHEMA': Keyword,\n    'ROW': Keyword,\n    'ROWS': Keyword,\n    'ROW_COUNT': Keyword,\n    'RULE': Keyword,\n\n    'SAVE_POINT': Keyword,\n    'SCALE': Keyword,\n    'SCHEMA': Keyword,\n    'SCHEMA_NAME': Keyword,\n    'SCOPE': Keyword,\n    'SCROLL': Keyword,\n    'SEARCH': Keyword,\n    'SECOND': Keyword,\n    'SECURITY': Keyword,\n    'SELF': Keyword,\n    'SENSITIVE': Keyword,\n    'SERIALIZABLE': Keyword,\n    'SERVER_NAME': Keyword,\n    'SESSION': Keyword,\n    'SESSION_USER': Keyword,\n    'SETOF': Keyword,\n    'SETS': Keyword,\n    'SHARE': Keyword,\n    'SHOW': Keyword,\n    'SIMILAR': Keyword,\n    'SIMPLE': Keyword,\n    'SIZE': Keyword,\n    'SOME': Keyword,\n    'SOURCE': Keyword,\n    'SPACE': Keyword,\n    'SPECIFIC': Keyword,\n    'SPECIFICTYPE': Keyword,\n    'SPECIFIC_NAME': Keyword,\n    'SQL': Keyword,\n    'SQLCODE': Keyword,\n    'SQLERROR': Keyword,\n    'SQLEXCEPTION': Keyword,\n    'SQLSTATE': Keyword,\n    'SQLWARNINIG': Keyword,\n    'STABLE': Keyword,\n    'START': Keyword,\n    'STATE': Keyword,\n    'STATEMENT': Keyword,\n    'STATIC': Keyword,\n    'STATISTICS': Keyword,\n    'STDIN': Keyword,\n    'STDOUT': Keyword,\n    'STORAGE': Keyword,\n    'STRICT': Keyword,\n    'STRUCTURE': Keyword,\n    'STYPE': Keyword,\n    'SUBCLASS_ORIGIN': Keyword,\n    'SUBLIST': Keyword,\n    'SUBSTRING': Keyword,\n    'SUM': Keyword,\n    'SYMMETRIC': Keyword,\n    'SYSID': Keyword,\n    'SYSTEM': Keyword,\n    'SYSTEM_USER': Keyword,\n\n    'TABLE': Keyword,\n    'TABLE_NAME': Keyword,\n    ' TEMP': Keyword,\n    'TEMPLATE': Keyword,\n    'TEMPORARY': Keyword,\n    'TERMINATE': Keyword,\n    'THAN': Keyword,\n    'THEN': Keyword,\n    'TIMESTAMP': Keyword,\n    'TIMEZONE_HOUR': Keyword,\n    'TIMEZONE_MINUTE': Keyword,\n    'TO': Keyword,\n    'TOAST': Keyword,\n    'TRAILING': Keyword,\n    'TRANSATION': Keyword,\n    'TRANSACTIONS_COMMITTED': Keyword,\n    'TRANSACTIONS_ROLLED_BACK': Keyword,\n    'TRANSATION_ACTIVE': Keyword,\n    'TRANSFORM': Keyword,\n    'TRANSFORMS': Keyword,\n    'TRANSLATE': Keyword,\n    'TRANSLATION': Keyword,\n    'TREAT': Keyword,\n    'TRIGGER': Keyword,\n    'TRIGGER_CATALOG': Keyword,\n    'TRIGGER_NAME': Keyword,\n    'TRIGGER_SCHEMA': Keyword,\n    'TRIM': Keyword,\n    'TRUE': Keyword,\n    'TRUNCATE': Keyword,\n    'TRUSTED': Keyword,\n    'TYPE': Keyword,\n\n    'UNCOMMITTED': Keyword,\n    'UNDER': Keyword,\n    'UNENCRYPTED': Keyword,\n    'UNION': Keyword,\n    'UNIQUE': Keyword,\n    'UNKNOWN': Keyword,\n    'UNLISTEN': Keyword,\n    'UNNAMED': Keyword,\n    'UNNEST': Keyword,\n    'UNTIL': Keyword,\n    'UPPER': Keyword,\n    'USAGE': Keyword,\n    'USER': Keyword,\n    'USER_DEFINED_TYPE_CATALOG': Keyword,\n    'USER_DEFINED_TYPE_NAME': Keyword,\n    'USER_DEFINED_TYPE_SCHEMA': Keyword,\n    'USING': Keyword,\n\n    'VACUUM': Keyword,\n    'VALID': Keyword,\n    'VALIDATOR': Keyword,\n    'VALUES': Keyword,\n    'VARIABLE': Keyword,\n    'VERBOSE': Keyword,\n    'VERSION': Keyword,\n    'VIEW': Keyword,\n    'VOLATILE': Keyword,\n\n    'WHEN': Keyword,\n    'WHENEVER': Keyword,\n    'WHERE': Keyword,\n    'WITH': Keyword,\n    'WITHOUT': Keyword,\n    'WORK': Keyword,\n    'WRITE': Keyword,\n\n    'YEAR': Keyword,\n\n    'ZONE': Keyword,\n\n\n    'ARRAY': Name.Builtin,\n    'BIGINT': Name.Builtin,\n    'BINARY': Name.Builtin,\n    'BIT': Name.Builtin,\n    'BLOB': Name.Builtin,\n    'BOOLEAN': Name.Builtin,\n    'CHAR': Name.Builtin,\n    'CHARACTER': Name.Builtin,\n    'DATE': Name.Builtin,\n    'DEC': Name.Builtin,\n    'DECIMAL': Name.Builtin,\n    'FLOAT': Name.Builtin,\n    'INT': Name.Builtin,\n    'INTEGER': Name.Builtin,\n    'INTERVAL': Name.Builtin,\n    'NUMBER': Name.Builtin,\n    'NUMERIC': Name.Builtin,\n    'REAL': Name.Builtin,\n    'SERIAL': Name.Builtin,\n    'SMALLINT': Name.Builtin,\n    'VARCHAR': Name.Builtin,\n    'VARYING': Name.Builtin,\n    'INT8': Name.Builtin,\n    'SERIAL8': Name.Builtin,\n    'TEXT': Name.Builtin,\n    }\n\n\nKEYWORDS_COMMON = {\n    'SELECT': Keyword.DML,\n    'INSERT': Keyword.DML,\n    'DELETE': Keyword.DML,\n    'UPDATE': Keyword.DML,\n    'DROP': Keyword.DDL,\n    'CREATE': Keyword.DDL,\n    'ALTER': Keyword.DDL,\n\n    'WHERE': Keyword,\n    'FROM': Keyword,\n    'INNER': Keyword,\n    'JOIN': Keyword,\n    'AND': Keyword,\n    'OR': Keyword,\n    'LIKE': Keyword,\n    'ON': Keyword,\n    'IN': Keyword,\n    'SET': Keyword,\n\n    'BY': Keyword,\n    'GROUP': Keyword,\n    'ORDER': Keyword,\n    'LEFT': Keyword,\n    'OUTER': Keyword,\n\n    'IF': Keyword,\n    'END': Keyword,\n    'THEN': Keyword,\n    'LOOP': Keyword,\n    'AS': Keyword,\n    'ELSE': Keyword,\n    'FOR': Keyword,\n\n    'CASE': Keyword,\n    'WHEN': Keyword,\n    'MIN': Keyword,\n    'MAX': Keyword,\n    'DISTINCT': Keyword,\n\n    }\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/lexer.py",
    "content": "# -*- coding: utf-8 -*-\n\n# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com\n#\n# This module is part of python-sqlparse and is released under\n# the BSD License: http://www.opensource.org/licenses/bsd-license.php.\n\n\"\"\"SQL Lexer\"\"\"\n\n# This code is based on the SqlLexer in pygments.\n# http://pygments.org/\n# It's separated from the rest of pygments to increase performance\n# and to allow some customizations.\n\nimport re\n\nfrom debug_toolbar.utils.sqlparse.keywords import KEYWORDS, KEYWORDS_COMMON\nfrom debug_toolbar.utils.sqlparse.tokens import *\nfrom debug_toolbar.utils.sqlparse.tokens import _TokenType\n\n\nclass include(str):\n    pass\n\nclass combined(tuple):\n    \"\"\"Indicates a state combined from multiple states.\"\"\"\n\n    def __new__(cls, *args):\n        return tuple.__new__(cls, args)\n\n    def __init__(self, *args):\n        # tuple.__init__ doesn't do anything\n        pass\n\ndef is_keyword(value):\n    test = value.upper()\n    return KEYWORDS_COMMON.get(test, KEYWORDS.get(test, Name)), value\n\n\ndef apply_filters(stream, filters, lexer=None):\n    \"\"\"\n    Use this method to apply an iterable of filters to\n    a stream. If lexer is given it's forwarded to the\n    filter, otherwise the filter receives `None`.\n    \"\"\"\n    def _apply(filter_, stream):\n        for token in filter_.filter(lexer, stream):\n            yield token\n    for filter_ in filters:\n        stream = _apply(filter_, stream)\n    return stream\n\n\nclass LexerMeta(type):\n    \"\"\"\n    Metaclass for Lexer, creates the self._tokens attribute from\n    self.tokens on the first instantiation.\n    \"\"\"\n\n    def _process_state(cls, unprocessed, processed, state):\n        assert type(state) is str, \"wrong state name %r\" % state\n        assert state[0] != '#', \"invalid state name %r\" % state\n        if state in processed:\n            return processed[state]\n        tokens = processed[state] = []\n        rflags = cls.flags\n        for tdef in unprocessed[state]:\n            if isinstance(tdef, include):\n                # it's a state reference\n                assert tdef != state, \"circular state reference %r\" % state\n                tokens.extend(cls._process_state(unprocessed, processed, str(tdef)))\n                continue\n\n            assert type(tdef) is tuple, \"wrong rule def %r\" % tdef\n\n            try:\n                rex = re.compile(tdef[0], rflags).match\n            except Exception, err:\n                raise ValueError(\"uncompilable regex %r in state %r of %r: %s\" %\n                                 (tdef[0], state, cls, err))\n\n            assert type(tdef[1]) is _TokenType or callable(tdef[1]), \\\n                   'token type must be simple type or callable, not %r' % (tdef[1],)\n\n            if len(tdef) == 2:\n                new_state = None\n            else:\n                tdef2 = tdef[2]\n                if isinstance(tdef2, str):\n                    # an existing state\n                    if tdef2 == '#pop':\n                        new_state = -1\n                    elif tdef2 in unprocessed:\n                        new_state = (tdef2,)\n                    elif tdef2 == '#push':\n                        new_state = tdef2\n                    elif tdef2[:5] == '#pop:':\n                        new_state = -int(tdef2[5:])\n                    else:\n                        assert False, 'unknown new state %r' % tdef2\n                elif isinstance(tdef2, combined):\n                    # combine a new state from existing ones\n                    new_state = '_tmp_%d' % cls._tmpname\n                    cls._tmpname += 1\n                    itokens = []\n                    for istate in tdef2:\n                        assert istate != state, 'circular state ref %r' % istate\n                        itokens.extend(cls._process_state(unprocessed,\n                                                          processed, istate))\n                    processed[new_state] = itokens\n                    new_state = (new_state,)\n                elif isinstance(tdef2, tuple):\n                    # push more than one state\n                    for state in tdef2:\n                        assert (state in unprocessed or\n                                state in ('#pop', '#push')), \\\n                               'unknown new state ' + state\n                    new_state = tdef2\n                else:\n                    assert False, 'unknown new state def %r' % tdef2\n            tokens.append((rex, tdef[1], new_state))\n        return tokens\n\n    def process_tokendef(cls):\n        cls._all_tokens = {}\n        cls._tmpname = 0\n        processed = cls._all_tokens[cls.__name__] = {}\n        #tokendefs = tokendefs or cls.tokens[name]\n        for state in cls.tokens.keys():\n            cls._process_state(cls.tokens, processed, state)\n        return processed\n\n    def __call__(cls, *args, **kwds):\n        if not hasattr(cls, '_tokens'):\n            cls._all_tokens = {}\n            cls._tmpname = 0\n            if hasattr(cls, 'token_variants') and cls.token_variants:\n                # don't process yet\n                pass\n            else:\n                cls._tokens = cls.process_tokendef()\n\n        return type.__call__(cls, *args, **kwds)\n\n\n\n\nclass Lexer:\n\n    __metaclass__ = LexerMeta\n\n    encoding = 'utf-8'\n    stripall = False\n    stripnl = False\n    tabsize = 0\n    flags = re.IGNORECASE\n\n    tokens = {\n        'root': [\n            (r'--.*?(\\r|\\n|\\r\\n)', Comment.Single),\n            (r'(\\r|\\n|\\r\\n)', Newline),\n            (r'\\s+', Whitespace),\n            (r'/\\*', Comment.Multiline, 'multiline-comments'),\n            (r':=', Assignment),\n            (r'::', Punctuation),\n            (r'[*]', Wildcard),\n            (r\"`(``|[^`])*`\", Name),\n            (r\"´(´´|[^´])*´\", Name),\n            (r'@[a-zA-Z_][a-zA-Z0-9_]+', Name),\n            (r'[+/<>=~!@#%^&|`?^-]', Operator),\n            (r'[0-9]+', Number.Integer),\n            # TODO: Backslash escapes?\n            (r\"'(''|[^'])*'\", String.Single),\n            (r'\"(\"\"|[^\"])*\"', String.Symbol), # not a real string literal in ANSI SQL\n            (r'(LEFT |RIGHT )?(INNER |OUTER )?JOIN', Keyword),\n            (r'END( IF| LOOP)?', Keyword),\n            (r'CREATE( OR REPLACE)?', Keyword.DDL),\n            (r'[a-zA-Z_][a-zA-Z0-9_]*', is_keyword),\n            (r'\\$([a-zA-Z_][a-zA-Z0-9_]*)?\\$', Name.Builtin),\n            (r'[;:()\\[\\],\\.]', Punctuation),\n        ],\n        'multiline-comments': [\n            (r'/\\*', Comment.Multiline, 'multiline-comments'),\n            (r'\\*/', Comment.Multiline, '#pop'),\n            (r'[^/\\*]+', Comment.Multiline),\n            (r'[/*]', Comment.Multiline)\n        ]\n    }\n\n    def __init__(self):\n        self.filters = []\n\n    def add_filter(self, filter_, **options):\n        from sqlparse.filters import Filter\n        if not isinstance(filter_, Filter):\n            filter_ = filter_(**options)\n        self.filters.append(filter_)\n\n    def get_tokens(self, text, unfiltered=False):\n        \"\"\"\n        Return an iterable of (tokentype, value) pairs generated from\n        `text`. If `unfiltered` is set to `True`, the filtering mechanism\n        is bypassed even if filters are defined.\n\n        Also preprocess the text, i.e. expand tabs and strip it if\n        wanted and applies registered filters.\n        \"\"\"\n        if not isinstance(text, unicode):\n            if self.encoding == 'guess':\n                try:\n                    text = text.decode('utf-8')\n                    if text.startswith(u'\\ufeff'):\n                        text = text[len(u'\\ufeff'):]\n                except UnicodeDecodeError:\n                    text = text.decode('latin1')\n            elif self.encoding == 'chardet':\n                try:\n                    import chardet\n                except ImportError:\n                    raise ImportError('To enable chardet encoding guessing, '\n                                      'please install the chardet library '\n                                      'from http://chardet.feedparser.org/')\n                enc = chardet.detect(text)\n                text = text.decode(enc['encoding'])\n            else:\n                text = text.decode(self.encoding)\n        if self.stripall:\n            text = text.strip()\n        elif self.stripnl:\n            text = text.strip('\\n')\n        if self.tabsize > 0:\n            text = text.expandtabs(self.tabsize)\n#        if not text.endswith('\\n'):\n#            text += '\\n'\n\n        def streamer():\n            for i, t, v in self.get_tokens_unprocessed(text):\n                yield t, v\n        stream = streamer()\n        if not unfiltered:\n            stream = apply_filters(stream, self.filters, self)\n        return stream\n\n\n    def get_tokens_unprocessed(self, text, stack=('root',)):\n        \"\"\"\n        Split ``text`` into (tokentype, text) pairs.\n\n        ``stack`` is the inital stack (default: ``['root']``)\n        \"\"\"\n        pos = 0\n        tokendefs = self._tokens\n        statestack = list(stack)\n        statetokens = tokendefs[statestack[-1]]\n        known_names = {}\n        while 1:\n            for rexmatch, action, new_state in statetokens:\n                m = rexmatch(text, pos)\n                if m:\n                    # print rex.pattern\n                    value = m.group()\n                    if value in known_names:\n                        yield pos, known_names[value], value\n                    elif type(action) is _TokenType:\n                        yield pos, action, value\n                    elif hasattr(action, '__call__'):\n                        ttype, value = action(value)\n                        known_names[value] = ttype\n                        yield pos, ttype, value\n                    else:\n                        for item in action(self, m):\n                            yield item\n                    pos = m.end()\n                    if new_state is not None:\n                        # state transition\n                        if isinstance(new_state, tuple):\n                            for state in new_state:\n                                if state == '#pop':\n                                    statestack.pop()\n                                elif state == '#push':\n                                    statestack.append(statestack[-1])\n                                else:\n                                    statestack.append(state)\n                        elif isinstance(new_state, int):\n                            # pop\n                            del statestack[new_state:]\n                        elif new_state == '#push':\n                            statestack.append(statestack[-1])\n                        else:\n                            assert False, \"wrong state def: %r\" % new_state\n                        statetokens = tokendefs[statestack[-1]]\n                    break\n            else:\n                try:\n                    if text[pos] == '\\n':\n                        # at EOL, reset state to \"root\"\n                        pos += 1\n                        statestack = ['root']\n                        statetokens = tokendefs['root']\n                        yield pos, Text, u'\\n'\n                        continue\n                    yield pos, Error, text[pos]\n                    pos += 1\n                except IndexError:\n                    break\n\n\ndef tokenize(sql):\n    \"\"\"Tokenize sql.\n\n    Tokenize *sql* using the :class:`Lexer` and return a 2-tuple stream\n    of ``(token type, value)`` items.\n    \"\"\"\n    lexer = Lexer()\n    return lexer.get_tokens(sql)\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/sql.py",
    "content": "# -*- coding: utf-8 -*-\n\n\"\"\"This module contains classes representing syntactical elements of SQL.\"\"\"\n\nimport re\nimport types\n\nfrom debug_toolbar.utils.sqlparse import tokens as T\n\n\nclass Token(object):\n    \"\"\"Base class for all other classes in this module.\n\n    It represents a single token and has two instance attributes:\n    ``value`` is the unchange value of the token and ``ttype`` is\n    the type of the token.\n    \"\"\"\n\n    __slots__ = ('value', 'ttype',)\n\n    def __init__(self, ttype, value):\n        self.value = value\n        self.ttype = ttype\n\n    def __str__(self):\n        return unicode(self).encode('latin-1')\n\n    def __repr__(self):\n        short = self._get_repr_value()\n        return '<%s \\'%s\\' at 0x%07x>' % (self._get_repr_name(),\n                                          short, id(self))\n\n    def __unicode__(self):\n        return self.value or ''\n\n    def to_unicode(self):\n        \"\"\"Returns a unicode representation of this object.\"\"\"\n        return unicode(self)\n\n    def _get_repr_name(self):\n        return str(self.ttype).split('.')[-1]\n\n    def _get_repr_value(self):\n        raw = unicode(self)\n        if len(raw) > 7:\n            short = raw[:6]+u'...'\n        else:\n            short = raw\n        return re.sub('\\s+', ' ', short)\n\n    def flatten(self):\n        \"\"\"Resolve subgroups.\"\"\"\n        yield self\n\n    def match(self, ttype, values, regex=False):\n        \"\"\"Checks whether the token matches the given arguments.\n\n        *ttype* is a token type. If this token doesn't match the given token\n        type.\n        *values* is a list of possible values for this token. The values\n        are OR'ed together so if only one of the values matches ``True``\n        is returned. Except for keyword tokens the comparsion is\n        case-sensitive. For convenience it's ok to pass in a single string.\n        If *regex* is ``True`` (default is ``False``) the given values are\n        treated as regular expressions.\n        \"\"\"\n        type_matched = self.ttype in ttype\n        if not type_matched or values is None:\n            return type_matched\n        if isinstance(values, basestring):\n            values = set([values])\n        if regex:\n            if self.ttype is T.Keyword:\n                values = set([re.compile(v, re.IGNORECASE) for v in values])\n            else:\n                values = set([re.compile(v) for v in values])\n            for pattern in values:\n                if pattern.search(self.value):\n                    return True\n            return False\n        else:\n            if self.ttype is T.Keyword:\n                values = set([v.upper() for v in values])\n                return self.value.upper() in values\n            else:\n                return self.value in values\n\n    def is_group(self):\n        \"\"\"Returns ``True`` if this object has children.\"\"\"\n        return False\n\n    def is_whitespace(self):\n        \"\"\"Return ``True`` if this token is a whitespace token.\"\"\"\n        return self.ttype and self.ttype in T.Whitespace\n\n\nclass TokenList(Token):\n    \"\"\"A group of tokens.\n\n    It has an additional instance attribute ``tokens`` which holds a\n    list of child-tokens.\n    \"\"\"\n\n    __slots__ = ('value', 'ttype', 'tokens')\n\n    def __init__(self, tokens=None):\n        if tokens is None:\n            tokens = []\n        self.tokens = tokens\n        Token.__init__(self, None, None)\n\n    def __unicode__(self):\n        return ''.join(unicode(x) for x in self.flatten())\n\n    def __str__(self):\n        return unicode(self).encode('latin-1')\n\n    def _get_repr_name(self):\n        return self.__class__.__name__\n\n    ## def _pprint_tree(self, max_depth=None, depth=0):\n    ##     \"\"\"Pretty-print the object tree.\"\"\"\n    ##     indent = ' '*(depth*2)\n    ##     for token in self.tokens:\n    ##         if token.is_group():\n    ##             pre = ' | '\n    ##         else:\n    ##             pre = ' | '\n    ##         print '%s%s%s \\'%s\\'' % (indent, pre, token._get_repr_name(),\n    ##                                  token._get_repr_value())\n    ##         if (token.is_group() and max_depth is not None\n    ##             and depth < max_depth):\n    ##             token._pprint_tree(max_depth, depth+1)\n\n    def flatten(self):\n        \"\"\"Generator yielding ungrouped tokens.\n\n        This method is recursively called for all child tokens.\n        \"\"\"\n        for token in self.tokens:\n            if isinstance(token, TokenList):\n                for item in token.flatten():\n                    yield item\n            else:\n                yield token\n\n    def is_group(self):\n        return True\n\n    def get_sublists(self):\n        return [x for x in self.tokens if isinstance(x, TokenList)]\n\n    def token_first(self, ignore_whitespace=True):\n        \"\"\"Returns the first child token.\n\n        If *ignore_whitespace* is ``True`` (the default), whitespace\n        tokens are ignored.\n        \"\"\"\n        for token in self.tokens:\n            if ignore_whitespace and token.is_whitespace():\n                continue\n            return token\n        return None\n\n    def token_next_by_instance(self, idx, clss):\n        \"\"\"Returns the next token matching a class.\n\n        *idx* is where to start searching in the list of child tokens.\n        *clss* is a list of classes the token should be an instance of.\n\n        If no matching token can be found ``None`` is returned.\n        \"\"\"\n        if isinstance(clss, (list, tuple)):\n            clss = (clss,)\n        if isinstance(clss, tuple):\n            clss = tuple(clss)\n        for token in self.tokens[idx:]:\n            if isinstance(token, clss):\n                return token\n        return None\n\n    def token_next_by_type(self, idx, ttypes):\n        \"\"\"Returns next matching token by it's token type.\"\"\"\n        if not isinstance(ttypes, (list, tuple)):\n            ttypes = [ttypes]\n        for token in self.tokens[idx:]:\n            if token.ttype in ttypes:\n                return token\n        return None\n\n    def token_next_match(self, idx, ttype, value, regex=False):\n        \"\"\"Returns next token where it's ``match`` method returns ``True``.\"\"\"\n        if type(idx) != types.IntType:\n            idx = self.token_index(idx)\n        for token in self.tokens[idx:]:\n            if token.match(ttype, value, regex):\n                return token\n        return None\n\n    def token_not_matching(self, idx, funcs):\n        for token in self.tokens[idx:]:\n            passed = False\n            for func in funcs:\n                if func(token):\n                   passed = True\n                   break\n            if not passed:\n                return token\n        return None\n\n    def token_matching(self, idx, funcs):\n        for token in self.tokens[idx:]:\n            for i, func in enumerate(funcs):\n                if func(token):\n                    return token\n        return None\n\n    def token_prev(self, idx, skip_ws=True):\n        \"\"\"Returns the previous token relative to *idx*.\n\n        If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.\n        ``None`` is returned if there's no previous token.\n        \"\"\"\n        if idx is None:\n            return None\n        if not isinstance(idx, int):\n            idx = self.token_index(idx)\n        while idx != 0:\n            idx -= 1\n            if self.tokens[idx].is_whitespace() and skip_ws:\n                continue\n            return self.tokens[idx]\n\n    def token_next(self, idx, skip_ws=True):\n        \"\"\"Returns the next token relative to *idx*.\n\n        If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.\n        ``None`` is returned if there's no next token.\n        \"\"\"\n        if idx is None:\n            return None\n        if not isinstance(idx, int):\n            idx = self.token_index(idx)\n        while idx < len(self.tokens)-1:\n            idx += 1\n            if self.tokens[idx].is_whitespace() and skip_ws:\n                continue\n            return self.tokens[idx]\n\n    def token_index(self, token):\n        \"\"\"Return list index of token.\"\"\"\n        return self.tokens.index(token)\n\n    def tokens_between(self, start, end, exclude_end=False):\n        \"\"\"Return all tokens between (and including) start and end.\n\n        If *exclude_end* is ``True`` (default is ``False``) the end token\n        is included too.\n        \"\"\"\n        if exclude_end:\n            offset = 0\n        else:\n            offset = 1\n        return self.tokens[self.token_index(start):self.token_index(end)+offset]\n\n    def group_tokens(self, grp_cls, tokens):\n        \"\"\"Replace tokens by an instance of *grp_cls*.\"\"\"\n        idx = self.token_index(tokens[0])\n        for t in tokens:\n            self.tokens.remove(t)\n        grp = grp_cls(tokens)\n        self.tokens.insert(idx, grp)\n        return grp\n\n    def insert_before(self, where, token):\n        \"\"\"Inserts *token* before *where*.\"\"\"\n        self.tokens.insert(self.token_index(where), token)\n\n\nclass Statement(TokenList):\n    \"\"\"Represents a SQL statement.\"\"\"\n\n    __slots__ = ('value', 'ttype', 'tokens')\n\n    def get_type(self):\n        \"\"\"Returns the type of a statement.\n\n        The returned value is a string holding an upper-cased reprint of\n        the first DML or DDL keyword. If the first token in this group\n        isn't a DML or DDL keyword \"UNKNOWN\" is returned.\n        \"\"\"\n        first_token = self.token_first()\n        if first_token.ttype in (T.Keyword.DML, T.Keyword.DDL):\n            return first_token.value.upper()\n        else:\n            return 'UNKNOWN'\n\n\nclass Identifier(TokenList):\n    \"\"\"Represents an identifier.\n\n    Identifiers may have aliases or typecasts.\n    \"\"\"\n\n    __slots__ = ('value', 'ttype', 'tokens')\n\n    def has_alias(self):\n        \"\"\"Returns ``True`` if an alias is present.\"\"\"\n        return self.get_alias() is not None\n\n    def get_alias(self):\n        \"\"\"Returns the alias for this identifier or ``None``.\"\"\"\n        kw = self.token_next_match(0, T.Keyword, 'AS')\n        if kw is not None:\n            alias = self.token_next(self.token_index(kw))\n            if alias is None:\n                return None\n        else:\n            next_ = self.token_next(0)\n            if next_ is None or not isinstance(next_, Identifier):\n                return None\n            alias = next_\n        if isinstance(alias, Identifier):\n            return alias.get_name()\n        else:\n            return alias.to_unicode()\n\n    def get_name(self):\n        \"\"\"Returns the name of this identifier.\n\n        This is either it's alias or it's real name. The returned valued can\n        be considered as the name under which the object corresponding to\n        this identifier is known within the current statement.\n        \"\"\"\n        alias = self.get_alias()\n        if alias is not None:\n            return alias\n        return self.get_real_name()\n\n    def get_real_name(self):\n        \"\"\"Returns the real name (object name) of this identifier.\"\"\"\n        # a.b\n        dot = self.token_next_match(0, T.Punctuation, '.')\n        if dot is None:\n            return self.token_next_by_type(0, T.Name).value\n        else:\n            next_ = self.token_next_by_type(self.token_index(dot),\n                                            (T.Name, T.Wildcard))\n            if next_ is None:  # invalid identifier, e.g. \"a.\"\n                return None\n            return next_.value\n\n    def get_parent_name(self):\n        \"\"\"Return name of the parent object if any.\n\n        A parent object is identified by the first occuring dot.\n        \"\"\"\n        dot = self.token_next_match(0, T.Punctuation, '.')\n        if dot is None:\n            return None\n        prev_ = self.token_prev(self.token_index(dot))\n        if prev_ is None:  # something must be verry wrong here..\n            return None\n        return prev_.value\n\n    def is_wildcard(self):\n        \"\"\"Return ``True`` if this identifier contains a wildcard.\"\"\"\n        token = self.token_next_by_type(0, T.Wildcard)\n        return token is not None\n\n    def get_typecast(self):\n        \"\"\"Returns the typecast or ``None`` of this object as a string.\"\"\"\n        marker = self.token_next_match(0, T.Punctuation, '::')\n        if marker is None:\n            return None\n        next_ = self.token_next(self.token_index(marker), False)\n        if next_ is None:\n            return None\n        return next_.to_unicode()\n\n\nclass IdentifierList(TokenList):\n    \"\"\"A list of :class:`~sqlparse.sql.Identifier`\\'s.\"\"\"\n\n    __slots__ = ('value', 'ttype', 'tokens')\n\n    def get_identifiers(self):\n        \"\"\"Returns the identifiers.\n\n        Whitespaces and punctuations are not included in this list.\n        \"\"\"\n        return [x for x in self.tokens\n                if not x.is_whitespace() and not x.match(T.Punctuation, ',')]\n\n\nclass Parenthesis(TokenList):\n    \"\"\"Tokens between parenthesis.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\n\nclass Assignment(TokenList):\n    \"\"\"An assignment like 'var := val;'\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\nclass If(TokenList):\n    \"\"\"An 'if' clause with possible 'else if' or 'else' parts.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\nclass For(TokenList):\n    \"\"\"A 'FOR' loop.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\nclass Comparsion(TokenList):\n    \"\"\"A comparsion used for example in WHERE clauses.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\nclass Comment(TokenList):\n    \"\"\"A comment.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\nclass Where(TokenList):\n    \"\"\"A WHERE clause.\"\"\"\n    __slots__ = ('value', 'ttype', 'tokens')\n\n\nclass Case(TokenList):\n    \"\"\"A CASE statement with one or more WHEN and possibly an ELSE part.\"\"\"\n\n    __slots__ = ('value', 'ttype', 'tokens')\n\n    def get_cases(self):\n        \"\"\"Returns a list of 2-tuples (condition, value).\n\n        If an ELSE exists condition is None.\n        \"\"\"\n        ret = []\n        in_condition = in_value = False\n        for token in self.tokens:\n            if token.match(T.Keyword, 'WHEN'):\n                ret.append(([], []))\n                in_condition = True\n                in_value = False\n            elif token.match(T.Keyword, 'ELSE'):\n                ret.append((None, []))\n                in_condition = False\n                in_value = True\n            elif token.match(T.Keyword, 'THEN'):\n                in_condition = False\n                in_value = True\n            elif token.match(T.Keyword, 'END'):\n                in_condition = False\n                in_value = False\n            if in_condition:\n                ret[-1][0].append(token)\n            elif in_value:\n                ret[-1][1].append(token)\n        return ret\n"
  },
  {
    "path": "debug_toolbar/utils/sqlparse/tokens.py",
    "content": "# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com\n#\n# This module is part of python-sqlparse and is released under\n# the BSD License: http://www.opensource.org/licenses/bsd-license.php.\n\n# The Token implementation is based on pygment's token system written\n# by Georg Brandl.\n# http://pygments.org/\n\n\"\"\"Tokens\"\"\"\n\ntry:\n    set\nexcept NameError:\n    from sets import Set as set\n\n\nclass _TokenType(tuple):\n    parent = None\n\n    def split(self):\n        buf = []\n        node = self\n        while node is not None:\n            buf.append(node)\n            node = node.parent\n        buf.reverse()\n        return buf\n\n    def __init__(self, *args):\n        # no need to call super.__init__\n        self.subtypes = set()\n\n    def __contains__(self, val):\n        return self is val or (\n            type(val) is self.__class__ and\n            val[:len(self)] == self\n        )\n\n    def __getattr__(self, val):\n        if not val or not val[0].isupper():\n            return tuple.__getattribute__(self, val)\n        new = _TokenType(self + (val,))\n        setattr(self, val, new)\n        self.subtypes.add(new)\n        new.parent = self\n        return new\n\n    def __hash__(self):\n        return hash(tuple(self))\n\n    def __repr__(self):\n        return 'Token' + (self and '.' or '') + '.'.join(self)\n\n\nToken       = _TokenType()\n\n# Special token types\nText        = Token.Text\nWhitespace  = Text.Whitespace\nNewline     = Whitespace.Newline\nError       = Token.Error\n# Text that doesn't belong to this lexer (e.g. HTML in PHP)\nOther       = Token.Other\n\n# Common token types for source code\nKeyword     = Token.Keyword\nName        = Token.Name\nLiteral     = Token.Literal\nString      = Literal.String\nNumber      = Literal.Number\nPunctuation = Token.Punctuation\nOperator    = Token.Operator\nWildcard    = Token.Wildcard\nComment     = Token.Comment\nAssignment  = Token.Assignement\n\n# Generic types for non-source code\nGeneric     = Token.Generic\n\n# String and some others are not direct childs of Token.\n# alias them:\nToken.Token = Token\nToken.String = String\nToken.Number = Number\n\n# SQL specific tokens\nDML = Keyword.DML\nDDL = Keyword.DDL\nCommand = Keyword.Command\n\nGroup = Token.Group\nGroup.Parenthesis = Token.Group.Parenthesis\nGroup.Comment = Token.Group.Comment\nGroup.Where = Token.Group.Where\n\n\ndef is_token_subtype(ttype, other):\n    \"\"\"\n    Return True if ``ttype`` is a subtype of ``other``.\n\n    exists for backwards compatibility. use ``ttype in other`` now.\n    \"\"\"\n    return ttype in other\n\n\ndef string_to_tokentype(s):\n    \"\"\"\n    Convert a string into a token type::\n\n        >>> string_to_token('String.Double')\n        Token.Literal.String.Double\n        >>> string_to_token('Token.Literal.Number')\n        Token.Literal.Number\n        >>> string_to_token('')\n        Token\n\n    Tokens that are already tokens are returned unchanged:\n\n        >>> string_to_token(String)\n        Token.Literal.String\n    \"\"\"\n    if isinstance(s, _TokenType):\n        return s\n    if not s:\n        return Token\n    node = Token\n    for item in s.split('.'):\n        node = getattr(node, item)\n    return node\n\n"
  },
  {
    "path": "debug_toolbar/utils/tracking/__init__.py",
    "content": "import logging\nimport time\nimport types\n\ndef post_dispatch(func):\n    def wrapped(callback):\n        register_hook(func, 'after', callback)\n        return callback\n    return wrapped\n\ndef pre_dispatch(func):\n    def wrapped(callback):\n        register_hook(func, 'before', callback)\n        return callback\n    return wrapped\n\ndef replace_call(func):\n    def inner(callback):\n        def wrapped(*args, **kwargs):\n            return callback(func, *args, **kwargs)\n\n        actual = getattr(func, '__wrapped__', func)\n        wrapped.__wrapped__ = actual\n        wrapped.__doc__ = getattr(actual, '__doc__', None)\n        wrapped.__name__ = actual.__name__\n\n        _replace_function(func, wrapped)\n        return wrapped\n    return inner\n\ndef fire_hook(hook, sender, **kwargs):\n    try:\n        for callback in callbacks[hook].get(id(sender), []):\n            callback(sender=sender, **kwargs)\n    except Exception, e:\n        # Log the exception, dont mess w/ the underlying function\n        logging.exception(e)\n\ndef _replace_function(func, wrapped):\n    if isinstance(func, types.FunctionType):\n        if func.__module__ == '__builtin__':\n            # oh shit\n            __builtins__[func] = wrapped\n        else:\n            module = __import__(func.__module__, {}, {}, [func.__module__], 0)\n            setattr(module, func.__name__, wrapped)\n    elif getattr(func, 'im_self', None):\n        # TODO: classmethods\n        raise NotImplementedError\n    elif hasattr(func, 'im_class'):\n        # for unbound methods\n        setattr(func.im_class, func.__name__, wrapped)\n    else:\n        raise NotImplementedError\n\ncallbacks = {\n    'before': {},\n    'after': {},\n}\n\ndef register_hook(func, hook, callback):\n    \"\"\"\n    def myhook(sender, args, kwargs):\n        print func, \"executed\n        print \"args:\", args\n        print \"kwargs:\", kwargs\n    register_hook(BaseDatabaseWrapper.cursor, 'before', myhook)\n    \"\"\"\n\n    assert hook in ('before', 'after')\n\n    def wrapped(*args, **kwargs):\n        start = time.time()\n        fire_hook('before', sender=wrapped.__wrapped__, args=args, kwargs=kwargs,\n                  start=start)\n        result = wrapped.__wrapped__(*args, **kwargs)\n        stop = time.time()\n        fire_hook('after', sender=wrapped.__wrapped__, args=args, kwargs=kwargs,\n                  result=result, start=start, stop=stop)\n    actual = getattr(func, '__wrapped__', func)\n    wrapped.__wrapped__ = actual\n    wrapped.__doc__ = getattr(actual, '__doc__', None)\n    wrapped.__name__ = actual.__name__\n    \n    id_ = id(actual)\n    if id_ not in callbacks[hook]:\n        callbacks[hook][id_] = []\n    callbacks[hook][id_].append(callback)\n\n    _replace_function(func, wrapped)"
  },
  {
    "path": "debug_toolbar/utils/tracking/db.py",
    "content": "import sys\nimport traceback\n\nfrom datetime import datetime\n\nfrom django.conf import settings\nfrom django.template import Node\nfrom django.utils import simplejson\nfrom django.utils.encoding import force_unicode\nfrom django.utils.hashcompat import sha_constructor\n\nfrom debug_toolbar.utils import ms_from_timedelta, tidy_stacktrace, get_template_info\nfrom debug_toolbar.utils.compat.db import connections\n# TODO:This should be set in the toolbar loader as a default and panels should\n# get a copy of the toolbar object with access to its config dictionary\nSQL_WARNING_THRESHOLD = getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}) \\\n                            .get('SQL_WARNING_THRESHOLD', 500)\n\nclass CursorWrapper(object):\n    \"\"\"\n    Wraps a cursor and logs queries.\n    \"\"\"\n    \n    def __init__(self, cursor, db, logger):\n        self.cursor = cursor\n        # Instance of a BaseDatabaseWrapper subclass\n        self.db = db\n        # logger must implement a ``record`` method\n        self.logger = logger\n\n    def execute(self, sql, params=()):\n        start = datetime.now()\n        try:\n            return self.cursor.execute(sql, params)\n        finally:\n            stop = datetime.now()\n            duration = ms_from_timedelta(stop - start)\n            stacktrace = tidy_stacktrace(traceback.extract_stack())\n            _params = ''\n            try:\n                _params = simplejson.dumps([force_unicode(x, strings_only=True) for x in params])\n            except TypeError:\n                pass # object not JSON serializable\n\n            template_info = None\n            cur_frame = sys._getframe().f_back\n            try:\n                while cur_frame is not None:\n                    if cur_frame.f_code.co_name == 'render':\n                        node = cur_frame.f_locals['self']\n                        if isinstance(node, Node):\n                            template_info = get_template_info(node.source)\n                            break\n                    cur_frame = cur_frame.f_back\n            except:\n                pass\n            del cur_frame\n\n            alias = getattr(self, 'alias', 'default')\n            conn = connections[alias].connection\n            # HACK: avoid imports\n            if conn:\n                engine = conn.__class__.__module__.split('.', 1)[0]\n            else:\n                engine = 'unknown'\n\n            params = {\n                'engine': engine,\n                'alias': alias,\n                'sql': self.db.ops.last_executed_query(self.cursor, sql, params),\n                'duration': duration,\n                'raw_sql': sql,\n                'params': _params,\n                'hash': sha_constructor(settings.SECRET_KEY + sql + _params).hexdigest(),\n                'stacktrace': stacktrace,\n                'start_time': start,\n                'stop_time': stop,\n                'is_slow': (duration > SQL_WARNING_THRESHOLD),\n                'is_select': sql.lower().strip().startswith('select'),\n                'template_info': template_info,\n            }\n\n            if engine == 'psycopg2':\n                params.update({\n                    'trans_id': self.logger.get_transaction_id(alias),\n                    'trans_status': conn.get_transaction_status(),\n                    'iso_level': conn.isolation_level,\n                    'encoding': conn.encoding,\n                })\n                \n            \n            # We keep `sql` to maintain backwards compatibility\n            self.logger.record(**params)\n\n    def executemany(self, sql, param_list):\n        return self.cursor.executemany(sql, param_list)\n\n    def __getattr__(self, attr):\n        if attr in self.__dict__:\n            return self.__dict__[attr]\n        else:\n            return getattr(self.cursor, attr)\n\n    def __iter__(self):\n        return iter(self.cursor)"
  },
  {
    "path": "debug_toolbar/views.py",
    "content": "\"\"\"\nHelper views for the debug toolbar. These are dynamically installed when the\ndebug toolbar is displayed, and typically can do Bad Things, so hooking up these\nviews in any other way is generally not advised.\n\"\"\"\n\nimport os\nimport django.views.static\nfrom django.conf import settings\nfrom django.db import connection\nfrom django.http import HttpResponseBadRequest\nfrom django.shortcuts import render_to_response\nfrom django.utils import simplejson\nfrom django.utils.hashcompat import sha_constructor\n\nclass InvalidSQLError(Exception):\n    def __init__(self, value):\n        self.value = value\n    def __str__(self):\n        return repr(self.value)\n\ndef debug_media(request, path):\n    root = getattr(settings, 'DEBUG_TOOLBAR_MEDIA_ROOT', None)\n    if root is None:\n        parent = os.path.abspath(os.path.dirname(__file__))\n        root = os.path.join(parent, 'media', 'debug_toolbar')\n    return django.views.static.serve(request, path, root)\n\ndef sql_select(request):\n    \"\"\"\n    Returns the output of the SQL SELECT statement.\n\n    Expected GET variables:\n        sql: urlencoded sql with positional arguments\n        params: JSON encoded parameter values\n        duration: time for SQL to execute passed in from toolbar just for redisplay\n        hash: the hash of (secret + sql + params) for tamper checking\n    \"\"\"\n    from debug_toolbar.panels.sql import reformat_sql\n    sql = request.GET.get('sql', '')\n    params = request.GET.get('params', '')\n    hash = sha_constructor(settings.SECRET_KEY + sql + params).hexdigest()\n    if hash != request.GET.get('hash', ''):\n        return HttpResponseBadRequest('Tamper alert') # SQL Tampering alert\n    if sql.lower().strip().startswith('select'):\n        params = simplejson.loads(params)\n        cursor = connection.cursor()\n        cursor.execute(sql, params)\n        headers = [d[0] for d in cursor.description]\n        result = cursor.fetchall()\n        cursor.close()\n        context = {\n            'result': result,\n            'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)),\n            'duration': request.GET.get('duration', 0.0),\n            'headers': headers,\n        }\n        return render_to_response('debug_toolbar/panels/sql_select.html', context)\n    raise InvalidSQLError(\"Only 'select' queries are allowed.\")\n\ndef sql_explain(request):\n    \"\"\"\n    Returns the output of the SQL EXPLAIN on the given query.\n\n    Expected GET variables:\n        sql: urlencoded sql with positional arguments\n        params: JSON encoded parameter values\n        duration: time for SQL to execute passed in from toolbar just for redisplay\n        hash: the hash of (secret + sql + params) for tamper checking\n    \"\"\"\n    from debug_toolbar.panels.sql import reformat_sql\n    sql = request.GET.get('sql', '')\n    params = request.GET.get('params', '')\n    hash = sha_constructor(settings.SECRET_KEY + sql + params).hexdigest()\n    if hash != request.GET.get('hash', ''):\n        return HttpResponseBadRequest('Tamper alert') # SQL Tampering alert\n    if sql.lower().strip().startswith('select'):\n        params = simplejson.loads(params)\n        cursor = connection.cursor()\n\n        if settings.DATABASE_ENGINE == \"sqlite3\":\n            # SQLite's EXPLAIN dumps the low-level opcodes generated for a query;\n            # EXPLAIN QUERY PLAN dumps a more human-readable summary\n            # See http://www.sqlite.org/lang_explain.html for details\n            cursor.execute(\"EXPLAIN QUERY PLAN %s\" % (sql,), params)\n        else:\n            cursor.execute(\"EXPLAIN %s\" % (sql,), params)\n\n        headers = [d[0] for d in cursor.description]\n        result = cursor.fetchall()\n        cursor.close()\n        context = {\n            'result': result,\n            'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)),\n            'duration': request.GET.get('duration', 0.0),\n            'headers': headers,\n        }\n        return render_to_response('debug_toolbar/panels/sql_explain.html', context)\n    raise InvalidSQLError(\"Only 'select' queries are allowed.\")\n\ndef sql_profile(request):\n    \"\"\"\n    Returns the output of running the SQL and getting the profiling statistics.\n\n    Expected GET variables:\n        sql: urlencoded sql with positional arguments\n        params: JSON encoded parameter values\n        duration: time for SQL to execute passed in from toolbar just for redisplay\n        hash: the hash of (secret + sql + params) for tamper checking\n    \"\"\"\n    from debug_toolbar.panels.sql import reformat_sql\n    sql = request.GET.get('sql', '')\n    params = request.GET.get('params', '')\n    hash = sha_constructor(settings.SECRET_KEY + sql + params).hexdigest()\n    if hash != request.GET.get('hash', ''):\n        return HttpResponseBadRequest('Tamper alert') # SQL Tampering alert\n    if sql.lower().strip().startswith('select'):\n        params = simplejson.loads(params)\n        cursor = connection.cursor()\n        result = None\n        headers = None\n        result_error = None\n        try:\n            cursor.execute(\"SET PROFILING=1\") # Enable profiling\n            cursor.execute(sql, params) # Execute SELECT\n            cursor.execute(\"SET PROFILING=0\") # Disable profiling\n            # The Query ID should always be 1 here but I'll subselect to get the last one just in case...\n            cursor.execute(\"SELECT * FROM information_schema.profiling WHERE query_id=(SELECT query_id FROM information_schema.profiling ORDER BY query_id DESC LIMIT 1)\")\n            headers = [d[0] for d in cursor.description]\n            result = cursor.fetchall()\n        except:\n            result_error = \"Profiling is either not available or not supported by your database.\"\n        cursor.close()\n        context = {\n            'result': result,\n            'result_error': result_error,\n            'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)),\n            'duration': request.GET.get('duration', 0.0),\n            'headers': headers,\n        }\n        return render_to_response('debug_toolbar/panels/sql_profile.html', context)\n    raise InvalidSQLError(\"Only 'select' queries are allowed.\")\n\ndef template_source(request):\n    \"\"\"\n    Return the source of a template, syntax-highlighted by Pygments if\n    it's available.\n    \"\"\"\n    from django.template import TemplateDoesNotExist\n    from django.utils.safestring import mark_safe\n    from django.conf import settings\n\n    template_name = request.GET.get('template', None)\n    if template_name is None:\n        return HttpResponseBadRequest('\"template\" key is required')\n\n    try: # Django 1.2 ...\n        from django.template.loader import find_template_loader, make_origin\n        loaders = []\n        for loader_name in settings.TEMPLATE_LOADERS:\n            loader = find_template_loader(loader_name)\n            if loader is not None:\n                loaders.append(loader)\n        for loader in loaders:\n            try:\n                source, display_name = loader.load_template_source(template_name)\n                origin = make_origin(display_name, loader, template_name, settings.TEMPLATE_DIRS)\n                break\n            except TemplateDoesNotExist:\n                source = \"Template Does Not Exist: %s\" % (template_name,)\n    except (ImportError, AttributeError): # Django 1.1 ...\n        from django.template.loader import find_template_source\n        source, origin = find_template_source(template_name)\n\n    try:\n        from pygments import highlight\n        from pygments.lexers import HtmlDjangoLexer\n        from pygments.formatters import HtmlFormatter\n\n        source = highlight(source, HtmlDjangoLexer(), HtmlFormatter())\n        source = mark_safe(source)\n        source.pygmentized = True\n    except ImportError:\n        pass\n\n    return render_to_response('debug_toolbar/panels/template_source.html', {\n        'source': source,\n        'template_name': template_name\n    })\n"
  },
  {
    "path": "example/__init__.py",
    "content": ""
  },
  {
    "path": "example/manage.py",
    "content": "#!/usr/bin/env python\nfrom django.core.management import execute_manager\ntry:\n    import settings # Assumed to be in the same directory.\nexcept ImportError:\n    import sys\n    sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run django-admin.py, passing it your settings module.\\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\\n\" % __file__)\n    sys.exit(1)\n\nif __name__ == \"__main__\":\n    execute_manager(settings)\n"
  },
  {
    "path": "example/media/js/jquery.js",
    "content": "(function(){\n/*\n * jQuery 1.2.6 - New Wave Javascript\n *\n * Copyright (c) 2008 John Resig (jquery.com)\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * and GPL (GPL-LICENSE.txt) licenses.\n *\n * $Date: 2008/05/26 $\n * $Rev: 5685 $\n */\n\n// Map over jQuery in case of overwrite\nvar _jQuery = window.jQuery,\n// Map over the $ in case of overwrite\n\t_$ = window.$;\n\nvar jQuery = window.jQuery = window.$ = function( selector, context ) {\n\t// The jQuery object is actually just the init constructor 'enhanced'\n\treturn new jQuery.fn.init( selector, context );\n};\n\n// A simple way to check for HTML strings or ID strings\n// (both of which we optimize for)\nvar quickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,\n\n// Is it a simple selector\n\tisSimple = /^.[^:#\\[\\.]*$/,\n\n// Will speed up references to undefined, and allows munging its name.\n\tundefined;\n\njQuery.fn = jQuery.prototype = {\n\tinit: function( selector, context ) {\n\t\t// Make sure that a selection was provided\n\t\tselector = selector || document;\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\t\t// Handle HTML strings\n\t\tif ( typeof selector == \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tvar match = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] )\n\t\t\t\t\tselector = jQuery.clean( [ match[1] ], context );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\telse {\n\t\t\t\t\tvar elem = document.getElementById( match[3] );\n\n\t\t\t\t\t// Make sure an element was located\n\t\t\t\t\tif ( elem ){\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id != match[3] )\n\t\t\t\t\t\t\treturn jQuery().find( selector );\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\treturn jQuery( elem );\n\t\t\t\t\t}\n\t\t\t\t\tselector = [];\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, [context])\n\t\t\t// (which is just equivalent to: $(content).find(expr)\n\t\t\t} else\n\t\t\t\treturn jQuery( context ).find( selector );\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) )\n\t\t\treturn jQuery( document )[ jQuery.fn.ready ? \"ready\" : \"load\" ]( selector );\n\n\t\treturn this.setArray(jQuery.makeArray(selector));\n\t},\n\n\t// The current version of jQuery being used\n\tjquery: \"1.2.6\",\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\t// The number of elements contained in the matched element set\n\tlength: 0,\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == undefined ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tjQuery.makeArray( this ) :\n\n\t\t\t// Return just the object\n\t\t\tthis[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery( elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Force the current matched set of elements to become\n\t// the specified array of elements (destroying the stack in the process)\n\t// You should use pushStack() in order to do this, but maintain the stack\n\tsetArray: function( elems ) {\n\t\t// Resetting the length to 0, then using the native Array push\n\t\t// is a super-fast way to populate an object with array-like properties\n\t\tthis.length = 0;\n\t\tArray.prototype.push.apply( this, elems );\n\n\t\treturn this;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\tvar ret = -1;\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem && elem.jquery ? elem[0] : elem\n\t\t, this );\n\t},\n\n\tattr: function( name, value, type ) {\n\t\tvar options = name;\n\n\t\t// Look for the case where we're accessing a style value\n\t\tif ( name.constructor == String )\n\t\t\tif ( value === undefined )\n\t\t\t\treturn this[0] && jQuery[ type || \"attr\" ]( this[0], name );\n\n\t\t\telse {\n\t\t\t\toptions = {};\n\t\t\t\toptions[ name ] = value;\n\t\t\t}\n\n\t\t// Check to see if we're setting style values\n\t\treturn this.each(function(i){\n\t\t\t// Set all the styles\n\t\t\tfor ( name in options )\n\t\t\t\tjQuery.attr(\n\t\t\t\t\ttype ?\n\t\t\t\t\t\tthis.style :\n\t\t\t\t\t\tthis,\n\t\t\t\t\tname, jQuery.prop( this, options[ name ], type, i, name )\n\t\t\t\t);\n\t\t});\n\t},\n\n\tcss: function( key, value ) {\n\t\t// ignore negative width and height values\n\t\tif ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )\n\t\t\tvalue = undefined;\n\t\treturn this.attr( key, value, \"curCSS\" );\n\t},\n\n\ttext: function( text ) {\n\t\tif ( typeof text != \"object\" && text != null )\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\n\t\tvar ret = \"\";\n\n\t\tjQuery.each( text || this, function(){\n\t\t\tjQuery.each( this.childNodes, function(){\n\t\t\t\tif ( this.nodeType != 8 )\n\t\t\t\t\tret += this.nodeType != 1 ?\n\t\t\t\t\t\tthis.nodeValue :\n\t\t\t\t\t\tjQuery.fn.text( [ this ] );\n\t\t\t});\n\t\t});\n\n\t\treturn ret;\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( this[0] )\n\t\t\t// The elements to wrap the target around\n\t\t\tjQuery( html, this[0].ownerDocument )\n\t\t\t\t.clone()\n\t\t\t\t.insertBefore( this[0] )\n\t\t\t\t.map(function(){\n\t\t\t\t\tvar elem = this;\n\n\t\t\t\t\twhile ( elem.firstChild )\n\t\t\t\t\t\telem = elem.firstChild;\n\n\t\t\t\t\treturn elem;\n\t\t\t\t})\n\t\t\t\t.append(this);\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).contents().wrapAll( html );\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, false, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.appendChild( elem );\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip(arguments, false, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip(arguments, false, true, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t});\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || jQuery( [] );\n\t},\n\n\tfind: function( selector ) {\n\t\tvar elems = jQuery.map(this, function(elem){\n\t\t\treturn jQuery.find( selector, elem );\n\t\t});\n\n\t\treturn this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf(\"..\") > -1 ?\n\t\t\tjQuery.unique( elems ) :\n\t\t\telems );\n\t},\n\n\tclone: function( events ) {\n\t\t// Do the clone\n\t\tvar ret = this.map(function(){\n\t\t\tif ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {\n\t\t\t\t// IE copies events bound via attachEvent when\n\t\t\t\t// using cloneNode. Calling detachEvent on the\n\t\t\t\t// clone will also remove the events from the orignal\n\t\t\t\t// In order to get around this, we use innerHTML.\n\t\t\t\t// Unfortunately, this means some modifications to\n\t\t\t\t// attributes in IE that are actually only stored\n\t\t\t\t// as properties will not be copied (such as the\n\t\t\t\t// the name attribute on an input).\n\t\t\t\tvar clone = this.cloneNode(true),\n\t\t\t\t\tcontainer = document.createElement(\"div\");\n\t\t\t\tcontainer.appendChild(clone);\n\t\t\t\treturn jQuery.clean([container.innerHTML])[0];\n\t\t\t} else\n\t\t\t\treturn this.cloneNode(true);\n\t\t});\n\n\t\t// Need to set the expando to null on the cloned set if it exists\n\t\t// removeData doesn't work here, IE removes it from the original as well\n\t\t// this is primarily for IE but the data expando shouldn't be copied over in any browser\n\t\tvar clone = ret.find(\"*\").andSelf().each(function(){\n\t\t\tif ( this[ expando ] != undefined )\n\t\t\t\tthis[ expando ] = null;\n\t\t});\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( events === true )\n\t\t\tthis.find(\"*\").andSelf().each(function(i){\n\t\t\t\tif (this.nodeType == 3)\n\t\t\t\t\treturn;\n\t\t\t\tvar events = jQuery.data( this, \"events\" );\n\n\t\t\t\tfor ( var type in events )\n\t\t\t\t\tfor ( var handler in events[ type ] )\n\t\t\t\t\t\tjQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );\n\t\t\t});\n\n\t\t// Return the cloned set\n\t\treturn ret;\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.isFunction( selector ) &&\n\t\t\tjQuery.grep(this, function(elem, i){\n\t\t\t\treturn selector.call( elem, i );\n\t\t\t}) ||\n\n\t\t\tjQuery.multiFilter( selector, this ) );\n\t},\n\n\tnot: function( selector ) {\n\t\tif ( selector.constructor == String )\n\t\t\t// test special case where just one selector is passed in\n\t\t\tif ( isSimple.test( selector ) )\n\t\t\t\treturn this.pushStack( jQuery.multiFilter( selector, this, true ) );\n\t\t\telse\n\t\t\t\tselector = jQuery.multiFilter( selector, this );\n\n\t\tvar isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;\n\t\treturn this.filter(function() {\n\t\t\treturn isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;\n\t\t});\n\t},\n\n\tadd: function( selector ) {\n\t\treturn this.pushStack( jQuery.unique( jQuery.merge(\n\t\t\tthis.get(),\n\t\t\ttypeof selector == 'string' ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tjQuery.makeArray( selector )\n\t\t)));\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.multiFilter( selector, this ).length > 0;\n\t},\n\n\thasClass: function( selector ) {\n\t\treturn this.is( \".\" + selector );\n\t},\n\n\tval: function( value ) {\n\t\tif ( value == undefined ) {\n\n\t\t\tif ( this.length ) {\n\t\t\t\tvar elem = this[0];\n\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type == \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 )\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\tif ( option.selected ) {\n\t\t\t\t\t\t\t// Get the specifc value for the option\n\t\t\t\t\t\t\tvalue = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one )\n\t\t\t\t\t\t\t\treturn value;\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\t} else\n\t\t\t\t\treturn (this[0].value || \"\").replace(/\\r/g, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif( value.constructor == Number )\n\t\t\tvalue += '';\n\n\t\treturn this.each(function(){\n\t\t\tif ( this.nodeType != 1 )\n\t\t\t\treturn;\n\n\t\t\tif ( value.constructor == Array && /radio|checkbox/.test( this.type ) )\n\t\t\t\tthis.checked = (jQuery.inArray(this.value, value) >= 0 ||\n\t\t\t\t\tjQuery.inArray(this.name, value) >= 0);\n\n\t\t\telse if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(value);\n\n\t\t\t\tjQuery( \"option\", this ).each(function(){\n\t\t\t\t\tthis.selected = (jQuery.inArray( this.value, values ) >= 0 ||\n\t\t\t\t\t\tjQuery.inArray( this.text, values ) >= 0);\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length )\n\t\t\t\t\tthis.selectedIndex = -1;\n\n\t\t\t} else\n\t\t\t\tthis.value = value;\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn value == undefined ?\n\t\t\t(this[0] ?\n\t\t\t\tthis[0].innerHTML :\n\t\t\t\tnull) :\n\t\t\tthis.empty().append( value );\n\t},\n\n\treplaceWith: function( value ) {\n\t\treturn this.after( value ).remove();\n\t},\n\n\teq: function( i ) {\n\t\treturn this.slice( i, i + 1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( Array.prototype.slice.apply( this, arguments ) );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function(elem, i){\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t},\n\n\tdata: function( key, value ){\n\t\tvar parts = key.split(\".\");\n\t\tparts[1] = parts[1] ? \".\" + parts[1] : \"\";\n\n\t\tif ( value === undefined ) {\n\t\t\tvar data = this.triggerHandler(\"getData\" + parts[1] + \"!\", [parts[0]]);\n\n\t\t\tif ( data === undefined && this.length )\n\t\t\t\tdata = jQuery.data( this[0], key );\n\n\t\t\treturn data === undefined && parts[1] ?\n\t\t\t\tthis.data( parts[0] ) :\n\t\t\t\tdata;\n\t\t} else\n\t\t\treturn this.trigger(\"setData\" + parts[1] + \"!\", [parts[0], value]).each(function(){\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t});\n\t},\n\n\tremoveData: function( key ){\n\t\treturn this.each(function(){\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t},\n\n\tdomManip: function( args, table, reverse, callback ) {\n\t\tvar clone = this.length > 1, elems;\n\n\t\treturn this.each(function(){\n\t\t\tif ( !elems ) {\n\t\t\t\telems = jQuery.clean( args, this.ownerDocument );\n\n\t\t\t\tif ( reverse )\n\t\t\t\t\telems.reverse();\n\t\t\t}\n\n\t\t\tvar obj = this;\n\n\t\t\tif ( table && jQuery.nodeName( this, \"table\" ) && jQuery.nodeName( elems[0], \"tr\" ) )\n\t\t\t\tobj = this.getElementsByTagName(\"tbody\")[0] || this.appendChild( this.ownerDocument.createElement(\"tbody\") );\n\n\t\t\tvar scripts = jQuery( [] );\n\n\t\t\tjQuery.each(elems, function(){\n\t\t\t\tvar elem = clone ?\n\t\t\t\t\tjQuery( this ).clone( true )[0] :\n\t\t\t\t\tthis;\n\n\t\t\t\t// execute all scripts after the elements have been injected\n\t\t\t\tif ( jQuery.nodeName( elem, \"script\" ) )\n\t\t\t\t\tscripts = scripts.add( elem );\n\t\t\t\telse {\n\t\t\t\t\t// Remove any inner scripts for later evaluation\n\t\t\t\t\tif ( elem.nodeType == 1 )\n\t\t\t\t\t\tscripts = scripts.add( jQuery( \"script\", elem ).remove() );\n\n\t\t\t\t\t// Inject the elements into the document\n\t\t\t\t\tcallback.call( obj, elem );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscripts.each( evalScript );\n\t\t});\n\t}\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src )\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\n\telse\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\n\tif ( elem.parentNode )\n\t\telem.parentNode.removeChild( elem );\n}\n\nfunction now(){\n\treturn +new Date;\n}\n\njQuery.extend = jQuery.fn.extend = function() {\n\t// copy reference to target object\n\tvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;\n\n\t// Handle a deep copy situation\n\tif ( target.constructor == Boolean ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target != \"object\" && typeof target != \"function\" )\n\t\ttarget = {};\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length == i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ )\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null )\n\t\t\t// Extend the base object\n\t\t\tfor ( var name in options ) {\n\t\t\t\tvar src = target[ name ], copy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Recurse if we're merging object values\n\t\t\t\tif ( deep && copy && typeof copy == \"object\" && !copy.nodeType )\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, \n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsrc || ( copy.length != null ? [ ] : { } )\n\t\t\t\t\t, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\telse if ( copy !== undefined )\n\t\t\t\t\ttarget[ name ] = copy;\n\n\t\t\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\nvar expando = \"jQuery\" + now(), uuid = 0, windowData = {},\n\t// exclude the following css properties to add px\n\texclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,\n\t// cache defaultView\n\tdefaultView = document.defaultView || {};\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep )\n\t\t\twindow.jQuery = _jQuery;\n\n\t\treturn jQuery;\n\t},\n\n\t// See test/unit/core.js for details concerning this function.\n\tisFunction: function( fn ) {\n\t\treturn !!fn && typeof fn != \"string\" && !fn.nodeName &&\n\t\t\tfn.constructor != Array && /^[\\s[]?function/.test( fn + \"\" );\n\t},\n\n\t// check if an element is in a (or is an) XML document\n\tisXMLDoc: function( elem ) {\n\t\treturn elem.documentElement && !elem.body ||\n\t\t\telem.tagName && elem.ownerDocument && !elem.ownerDocument.body;\n\t},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tdata = jQuery.trim( data );\n\n\t\tif ( data ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\tscript.type = \"text/javascript\";\n\t\t\tif ( jQuery.browser.msie )\n\t\t\t\tscript.text = data;\n\t\t\telse\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\n\t\t\t// Use insertBefore instead of appendChild  to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();\n\t},\n\n\tcache: {},\n\n\tdata: function( elem, name, data ) {\n\t\telem = elem == window ?\n\t\t\twindowData :\n\t\t\telem;\n\n\t\tvar id = elem[ expando ];\n\n\t\t// Compute a unique ID for the element\n\t\tif ( !id )\n\t\t\tid = elem[ expando ] = ++uuid;\n\n\t\t// Only generate the data cache if we're\n\t\t// trying to access or manipulate it\n\t\tif ( name && !jQuery.cache[ id ] )\n\t\t\tjQuery.cache[ id ] = {};\n\n\t\t// Prevent overriding the named cache with undefined values\n\t\tif ( data !== undefined )\n\t\t\tjQuery.cache[ id ][ name ] = data;\n\n\t\t// Return the named cache data, or the ID for the element\n\t\treturn name ?\n\t\t\tjQuery.cache[ id ][ name ] :\n\t\t\tid;\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\telem = elem == window ?\n\t\t\twindowData :\n\t\t\telem;\n\n\t\tvar id = elem[ expando ];\n\n\t\t// If we want to remove a specific section of the element's data\n\t\tif ( name ) {\n\t\t\tif ( jQuery.cache[ id ] ) {\n\t\t\t\t// Remove the section of cache data\n\t\t\t\tdelete jQuery.cache[ id ][ name ];\n\n\t\t\t\t// If we've removed all the data, remove the element's cache\n\t\t\t\tname = \"\";\n\n\t\t\t\tfor ( name in jQuery.cache[ id ] )\n\t\t\t\t\tbreak;\n\n\t\t\t\tif ( !name )\n\t\t\t\t\tjQuery.removeData( elem );\n\t\t\t}\n\n\t\t// Otherwise, we want to remove all of the element's data\n\t\t} else {\n\t\t\t// Clean up the element expando\n\t\t\ttry {\n\t\t\t\tdelete elem[ expando ];\n\t\t\t} catch(e){\n\t\t\t\t// IE has trouble directly removing the expando\n\t\t\t\t// but it's ok with using removeAttribute\n\t\t\t\tif ( elem.removeAttribute )\n\t\t\t\t\telem.removeAttribute( expando );\n\t\t\t}\n\n\t\t\t// Completely remove the data cache\n\t\t\tdelete jQuery.cache[ id ];\n\t\t}\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0, length = object.length;\n\n\t\tif ( args ) {\n\t\t\tif ( length == undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( ; i < length; )\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false )\n\t\t\t\t\t\tbreak;\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( length == undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ){}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\tprop: function( elem, value, type, i, name ) {\n\t\t// Handle executable functions\n\t\tif ( jQuery.isFunction( value ) )\n\t\t\tvalue = value.call( elem, i );\n\n\t\t// Handle passing in a number to a CSS property\n\t\treturn value && value.constructor == Number && type == \"curCSS\" && !exclude.test( name ) ?\n\t\t\tvalue + \"px\" :\n\t\t\tvalue;\n\t},\n\n\tclassName: {\n\t\t// internal only, use addClass(\"class\")\n\t\tadd: function( elem, classNames ) {\n\t\t\tjQuery.each((classNames || \"\").split(/\\s+/), function(i, className){\n\t\t\t\tif ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )\n\t\t\t\t\telem.className += (elem.className ? \" \" : \"\") + className;\n\t\t\t});\n\t\t},\n\n\t\t// internal only, use removeClass(\"class\")\n\t\tremove: function( elem, classNames ) {\n\t\t\tif (elem.nodeType == 1)\n\t\t\t\telem.className = classNames != undefined ?\n\t\t\t\t\tjQuery.grep(elem.className.split(/\\s+/), function(className){\n\t\t\t\t\t\treturn !jQuery.className.has( classNames, className );\n\t\t\t\t\t}).join(\" \") :\n\t\t\t\t\t\"\";\n\t\t},\n\n\t\t// internal only, use hasClass(\"class\")\n\t\thas: function( elem, className ) {\n\t\t\treturn jQuery.inArray( className, (elem.className || elem).toString().split(/\\s+/) ) > -1;\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( var name in options )\n\t\t\telem.style[ name ] = old[ name ];\n\t},\n\n\tcss: function( elem, name, force ) {\n\t\tif ( name == \"width\" || name == \"height\" ) {\n\t\t\tvar val, props = { position: \"absolute\", visibility: \"hidden\", display:\"block\" }, which = name == \"width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ];\n\n\t\t\tfunction getWH() {\n\t\t\t\tval = name == \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\t\t\t\tvar padding = 0, border = 0;\n\t\t\t\tjQuery.each( which, function() {\n\t\t\t\t\tpadding += parseFloat(jQuery.curCSS( elem, \"padding\" + this, true)) || 0;\n\t\t\t\t\tborder += parseFloat(jQuery.curCSS( elem, \"border\" + this + \"Width\", true)) || 0;\n\t\t\t\t});\n\t\t\t\tval -= Math.round(padding + border);\n\t\t\t}\n\n\t\t\tif ( jQuery(elem).is(\":visible\") )\n\t\t\t\tgetWH();\n\t\t\telse\n\t\t\t\tjQuery.swap( elem, props, getWH );\n\n\t\t\treturn Math.max(0, val);\n\t\t}\n\n\t\treturn jQuery.curCSS( elem, name, force );\n\t},\n\n\tcurCSS: function( elem, name, force ) {\n\t\tvar ret, style = elem.style;\n\n\t\t// A helper method for determining if an element's values are broken\n\t\tfunction color( elem ) {\n\t\t\tif ( !jQuery.browser.safari )\n\t\t\t\treturn false;\n\n\t\t\t// defaultView is cached\n\t\t\tvar ret = defaultView.getComputedStyle( elem, null );\n\t\t\treturn !ret || ret.getPropertyValue(\"color\") == \"\";\n\t\t}\n\n\t\t// We need to handle opacity special in IE\n\t\tif ( name == \"opacity\" && jQuery.browser.msie ) {\n\t\t\tret = jQuery.attr( style, \"opacity\" );\n\n\t\t\treturn ret == \"\" ?\n\t\t\t\t\"1\" :\n\t\t\t\tret;\n\t\t}\n\t\t// Opera sometimes will give the wrong display answer, this fixes it, see #2037\n\t\tif ( jQuery.browser.opera && name == \"display\" ) {\n\t\t\tvar save = style.outline;\n\t\t\tstyle.outline = \"0 solid black\";\n\t\t\tstyle.outline = save;\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( name.match( /float/i ) )\n\t\t\tname = styleFloat;\n\n\t\tif ( !force && style && style[ name ] )\n\t\t\tret = style[ name ];\n\n\t\telse if ( defaultView.getComputedStyle ) {\n\n\t\t\t// Only \"float\" is needed here\n\t\t\tif ( name.match( /float/i ) )\n\t\t\t\tname = \"float\";\n\n\t\t\tname = name.replace( /([A-Z])/g, \"-$1\" ).toLowerCase();\n\n\t\t\tvar computedStyle = defaultView.getComputedStyle( elem, null );\n\n\t\t\tif ( computedStyle && !color( elem ) )\n\t\t\t\tret = computedStyle.getPropertyValue( name );\n\n\t\t\t// If the element isn't reporting its values properly in Safari\n\t\t\t// then some display: none elements are involved\n\t\t\telse {\n\t\t\t\tvar swap = [], stack = [], a = elem, i = 0;\n\n\t\t\t\t// Locate all of the parent display: none elements\n\t\t\t\tfor ( ; a && color(a); a = a.parentNode )\n\t\t\t\t\tstack.unshift(a);\n\n\t\t\t\t// Go through and make them visible, but in reverse\n\t\t\t\t// (It would be better if we knew the exact display type that they had)\n\t\t\t\tfor ( ; i < stack.length; i++ )\n\t\t\t\t\tif ( color( stack[ i ] ) ) {\n\t\t\t\t\t\tswap[ i ] = stack[ i ].style.display;\n\t\t\t\t\t\tstack[ i ].style.display = \"block\";\n\t\t\t\t\t}\n\n\t\t\t\t// Since we flip the display style, we have to handle that\n\t\t\t\t// one special, otherwise get the value\n\t\t\t\tret = name == \"display\" && swap[ stack.length - 1 ] != null ?\n\t\t\t\t\t\"none\" :\n\t\t\t\t\t( computedStyle && computedStyle.getPropertyValue( name ) ) || \"\";\n\n\t\t\t\t// Finally, revert the display styles back\n\t\t\t\tfor ( i = 0; i < swap.length; i++ )\n\t\t\t\t\tif ( swap[ i ] != null )\n\t\t\t\t\t\tstack[ i ].style.display = swap[ i ];\n\t\t\t}\n\n\t\t\t// We should always get a number back from opacity\n\t\t\tif ( name == \"opacity\" && ret == \"\" )\n\t\t\t\tret = \"1\";\n\n\t\t} else if ( elem.currentStyle ) {\n\t\t\tvar camelCase = name.replace(/\\-(\\w)/g, function(all, letter){\n\t\t\t\treturn letter.toUpperCase();\n\t\t\t});\n\n\t\t\tret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];\n\n\t\t\t// From the awesome hack by Dean Edwards\n\t\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t\t// If we're not dealing with a regular pixel number\n\t\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t\tif ( !/^\\d+(px)?$/i.test( ret ) && /^\\d/.test( ret ) ) {\n\t\t\t\t// Remember the original values\n\t\t\t\tvar left = style.left, rsLeft = elem.runtimeStyle.left;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t\tstyle.left = ret || 0;\n\t\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.left = left;\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tclean: function( elems, context ) {\n\t\tvar ret = [];\n\t\tcontext = context || document;\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif (typeof context.createElement == 'undefined')\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\n\t\tjQuery.each(elems, function(i, elem){\n\t\t\tif ( !elem )\n\t\t\t\treturn;\n\n\t\t\tif ( elem.constructor == Number )\n\t\t\t\telem += '';\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem == \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(/(<(\\w+)[^>]*?)\\/>/g, function(all, front, tag){\n\t\t\t\t\treturn tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?\n\t\t\t\t\t\tall :\n\t\t\t\t\t\tfront + \"></\" + tag + \">\";\n\t\t\t\t});\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement(\"div\");\n\n\t\t\t\tvar wrap =\n\t\t\t\t\t// option or optgroup\n\t\t\t\t\t!tags.indexOf(\"<opt\") &&\n\t\t\t\t\t[ 1, \"<select multiple='multiple'>\", \"</select>\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"<leg\") &&\n\t\t\t\t\t[ 1, \"<fieldset>\", \"</fieldset>\" ] ||\n\n\t\t\t\t\ttags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&\n\t\t\t\t\t[ 1, \"<table>\", \"</table>\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"<tr\") &&\n\t\t\t\t\t[ 2, \"<table><tbody>\", \"</tbody></table>\" ] ||\n\n\t\t\t\t \t// <thead> matched above\n\t\t\t\t\t(!tags.indexOf(\"<td\") || !tags.indexOf(\"<th\")) &&\n\t\t\t\t\t[ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"<col\") &&\n\t\t\t\t\t[ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ] ||\n\n\t\t\t\t\t// IE can't serialize <link> and <script> tags normally\n\t\t\t\t\tjQuery.browser.msie &&\n\t\t\t\t\t[ 1, \"div<div>\", \"</div>\" ] ||\n\n\t\t\t\t\t[ 0, \"\", \"\" ];\n\n\t\t\t\t// Go to html and back, then peel off extra wrappers\n\t\t\t\tdiv.innerHTML = wrap[1] + elem + wrap[2];\n\n\t\t\t\t// Move to the right depth\n\t\t\t\twhile ( wrap[0]-- )\n\t\t\t\t\tdiv = div.lastChild;\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( jQuery.browser.msie ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\tvar tbody = !tags.indexOf(\"<table\") && tags.indexOf(\"<tbody\") < 0 ?\n\t\t\t\t\t\tdiv.firstChild && div.firstChild.childNodes :\n\n\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\twrap[1] == \"<table>\" && tags.indexOf(\"<tbody\") < 0 ?\n\t\t\t\t\t\t\tdiv.childNodes :\n\t\t\t\t\t\t\t[];\n\n\t\t\t\t\tfor ( var j = tbody.length - 1; j >= 0 ; --j )\n\t\t\t\t\t\tif ( jQuery.nodeName( tbody[ j ], \"tbody\" ) && !tbody[ j ].childNodes.length )\n\t\t\t\t\t\t\ttbody[ j ].parentNode.removeChild( tbody[ j ] );\n\n\t\t\t\t\t// IE completely kills leading whitespace when innerHTML is used\n\t\t\t\t\tif ( /^\\s/.test( elem ) )\n\t\t\t\t\t\tdiv.insertBefore( context.createTextNode( elem.match(/^\\s*/)[0] ), div.firstChild );\n\n\t\t\t\t}\n\n\t\t\t\telem = jQuery.makeArray( div.childNodes );\n\t\t\t}\n\n\t\t\tif ( elem.length === 0 && (!jQuery.nodeName( elem, \"form\" ) && !jQuery.nodeName( elem, \"select\" )) )\n\t\t\t\treturn;\n\n\t\t\tif ( elem[0] == undefined || jQuery.nodeName( elem, \"form\" ) || elem.options )\n\t\t\t\tret.push( elem );\n\n\t\t\telse\n\t\t\t\tret = jQuery.merge( ret, elem );\n\n\t\t});\n\n\t\treturn ret;\n\t},\n\n\tattr: function( elem, name, value ) {\n\t\t// don't set attributes on text and comment nodes\n\t\tif (!elem || elem.nodeType == 3 || elem.nodeType == 8)\n\t\t\treturn undefined;\n\n\t\tvar notxml = !jQuery.isXMLDoc( elem ),\n\t\t\t// Whether we are setting (or getting)\n\t\t\tset = value !== undefined,\n\t\t\tmsie = jQuery.browser.msie;\n\n\t\t// Try to normalize/fix the name\n\t\tname = notxml && jQuery.props[ name ] || name;\n\n\t\t// Only do all the following if this is a node (faster for style)\n\t\t// IE elem.getAttribute passes even for style\n\t\tif ( elem.tagName ) {\n\n\t\t\t// These attributes require special treatment\n\t\t\tvar special = /href|src|style/.test( name );\n\n\t\t\t// Safari mis-reports the default selected property of a hidden option\n\t\t\t// Accessing the parent's selectedIndex property fixes it\n\t\t\tif ( name == \"selected\" && jQuery.browser.safari )\n\t\t\t\telem.parentNode.selectedIndex;\n\n\t\t\t// If applicable, access the attribute via the DOM 0 way\n\t\t\tif ( name in elem && notxml && !special ) {\n\t\t\t\tif ( set ){\n\t\t\t\t\t// We can't allow the type property to be changed (since it causes problems in IE)\n\t\t\t\t\tif ( name == \"type\" && jQuery.nodeName( elem, \"input\" ) && elem.parentNode )\n\t\t\t\t\t\tthrow \"type property can't be changed\";\n\n\t\t\t\t\telem[ name ] = value;\n\t\t\t\t}\n\n\t\t\t\t// browsers index elements by id/name on forms, give priority to attributes.\n\t\t\t\tif( jQuery.nodeName( elem, \"form\" ) && elem.getAttributeNode(name) )\n\t\t\t\t\treturn elem.getAttributeNode( name ).nodeValue;\n\n\t\t\t\treturn elem[ name ];\n\t\t\t}\n\n\t\t\tif ( msie && notxml &&  name == \"style\" )\n\t\t\t\treturn jQuery.attr( elem.style, \"cssText\", value );\n\n\t\t\tif ( set )\n\t\t\t\t// convert the value to a string (all browsers do this but IE) see #1070\n\t\t\t\telem.setAttribute( name, \"\" + value );\n\n\t\t\tvar attr = msie && notxml && special\n\t\t\t\t\t// Some attributes require a special call on IE\n\t\t\t\t\t? elem.getAttribute( name, 2 )\n\t\t\t\t\t: elem.getAttribute( name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn attr === null ? undefined : attr;\n\t\t}\n\n\t\t// elem is actually elem.style ... set the style\n\n\t\t// IE uses filters for opacity\n\t\tif ( msie && name == \"opacity\" ) {\n\t\t\tif ( set ) {\n\t\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t\t// Force it by setting the zoom level\n\t\t\t\telem.zoom = 1;\n\n\t\t\t\t// Set the alpha filter to set the opacity\n\t\t\t\telem.filter = (elem.filter || \"\").replace( /alpha\\([^)]*\\)/, \"\" ) +\n\t\t\t\t\t(parseInt( value ) + '' == \"NaN\" ? \"\" : \"alpha(opacity=\" + value * 100 + \")\");\n\t\t\t}\n\n\t\t\treturn elem.filter && elem.filter.indexOf(\"opacity=\") >= 0 ?\n\t\t\t\t(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':\n\t\t\t\t\"\";\n\t\t}\n\n\t\tname = name.replace(/-([a-z])/ig, function(all, letter){\n\t\t\treturn letter.toUpperCase();\n\t\t});\n\n\t\tif ( set )\n\t\t\telem[ name ] = value;\n\n\t\treturn elem[ name ];\n\t},\n\n\ttrim: function( text ) {\n\t\treturn (text || \"\").replace( /^\\s+|\\s+$/g, \"\" );\n\t},\n\n\tmakeArray: function( array ) {\n\t\tvar ret = [];\n\n\t\tif( array != null ){\n\t\t\tvar i = array.length;\n\t\t\t//the window, strings and functions also have 'length'\n\t\t\tif( i == null || array.split || array.setInterval || array.call )\n\t\t\t\tret[0] = array;\n\t\t\telse\n\t\t\t\twhile( i )\n\t\t\t\t\tret[--i] = array[i];\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, array ) {\n\t\tfor ( var i = 0, length = array.length; i < length; i++ )\n\t\t// Use === because on IE, window == document\n\t\t\tif ( array[ i ] === elem )\n\t\t\t\treturn i;\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\t// We have to loop this way because IE & Opera overwrite the length\n\t\t// expando of getElementsByTagName\n\t\tvar i = 0, elem, pos = first.length;\n\t\t// Also, we need to make sure that the correct elements are being returned\n\t\t// (IE returns comment nodes in a '*' query)\n\t\tif ( jQuery.browser.msie ) {\n\t\t\twhile ( elem = second[ i++ ] )\n\t\t\t\tif ( elem.nodeType != 8 )\n\t\t\t\t\tfirst[ pos++ ] = elem;\n\n\t\t} else\n\t\t\twhile ( elem = second[ i++ ] )\n\t\t\t\tfirst[ pos++ ] = elem;\n\n\t\treturn first;\n\t},\n\n\tunique: function( array ) {\n\t\tvar ret = [], done = {};\n\n\t\ttry {\n\n\t\t\tfor ( var i = 0, length = array.length; i < length; i++ ) {\n\t\t\t\tvar id = jQuery.data( array[ i ] );\n\n\t\t\t\tif ( !done[ id ] ) {\n\t\t\t\t\tdone[ id ] = true;\n\t\t\t\t\tret.push( array[ i ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch( e ) {\n\t\t\tret = array;\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar ret = [];\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ )\n\t\t\tif ( !inv != !callback( elems[ i ], i ) )\n\t\t\t\tret.push( elems[ i ] );\n\n\t\treturn ret;\n\t},\n\n\tmap: function( elems, callback ) {\n\t\tvar ret = [];\n\n\t\t// Go through the array, translating each of the items to their\n\t\t// new value (or values).\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tvar value = callback( elems[ i ], i );\n\n\t\t\tif ( value != null )\n\t\t\t\tret[ ret.length ] = value;\n\t\t}\n\n\t\treturn ret.concat.apply( [], ret );\n\t}\n});\n\nvar userAgent = navigator.userAgent.toLowerCase();\n\n// Figure out what browser is being used\njQuery.browser = {\n\tversion: (userAgent.match( /.+(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/ ) || [])[1],\n\tsafari: /webkit/.test( userAgent ),\n\topera: /opera/.test( userAgent ),\n\tmsie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),\n\tmozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )\n};\n\nvar styleFloat = jQuery.browser.msie ?\n\t\"styleFloat\" :\n\t\"cssFloat\";\n\njQuery.extend({\n\t// Check to see if the W3C box model is being used\n\tboxModel: !jQuery.browser.msie || document.compatMode == \"CSS1Compat\",\n\n\tprops: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\",\n\t\t\"float\": styleFloat,\n\t\tcssFloat: styleFloat,\n\t\tstyleFloat: styleFloat,\n\t\treadonly: \"readOnly\",\n\t\tmaxlength: \"maxLength\",\n\t\tcellspacing: \"cellSpacing\"\n\t}\n});\n\njQuery.each({\n\tparent: function(elem){return elem.parentNode;},\n\tparents: function(elem){return jQuery.dir(elem,\"parentNode\");},\n\tnext: function(elem){return jQuery.nth(elem,2,\"nextSibling\");},\n\tprev: function(elem){return jQuery.nth(elem,2,\"previousSibling\");},\n\tnextAll: function(elem){return jQuery.dir(elem,\"nextSibling\");},\n\tprevAll: function(elem){return jQuery.dir(elem,\"previousSibling\");},\n\tsiblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},\n\tchildren: function(elem){return jQuery.sibling(elem.firstChild);},\n\tcontents: function(elem){return jQuery.nodeName(elem,\"iframe\")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}\n}, function(name, fn){\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar ret = jQuery.map( this, fn );\n\n\t\tif ( selector && typeof selector == \"string\" )\n\t\t\tret = jQuery.multiFilter( selector, ret );\n\n\t\treturn this.pushStack( jQuery.unique( ret ) );\n\t};\n});\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function(name, original){\n\tjQuery.fn[ name ] = function() {\n\t\tvar args = arguments;\n\n\t\treturn this.each(function(){\n\t\t\tfor ( var i = 0, length = args.length; i < length; i++ )\n\t\t\t\tjQuery( args[ i ] )[ original ]( this );\n\t\t});\n\t};\n});\n\njQuery.each({\n\tremoveAttr: function( name ) {\n\t\tjQuery.attr( this, name, \"\" );\n\t\tif (this.nodeType == 1)\n\t\t\tthis.removeAttribute( name );\n\t},\n\n\taddClass: function( classNames ) {\n\t\tjQuery.className.add( this, classNames );\n\t},\n\n\tremoveClass: function( classNames ) {\n\t\tjQuery.className.remove( this, classNames );\n\t},\n\n\ttoggleClass: function( classNames ) {\n\t\tjQuery.className[ jQuery.className.has( this, classNames ) ? \"remove\" : \"add\" ]( this, classNames );\n\t},\n\n\tremove: function( selector ) {\n\t\tif ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {\n\t\t\t// Prevent memory leaks\n\t\t\tjQuery( \"*\", this ).add(this).each(function(){\n\t\t\t\tjQuery.event.remove(this);\n\t\t\t\tjQuery.removeData(this);\n\t\t\t});\n\t\t\tif (this.parentNode)\n\t\t\t\tthis.parentNode.removeChild( this );\n\t\t}\n\t},\n\n\tempty: function() {\n\t\t// Remove element nodes and prevent memory leaks\n\t\tjQuery( \">*\", this ).remove();\n\n\t\t// Remove any remaining nodes\n\t\twhile ( this.firstChild )\n\t\t\tthis.removeChild( this.firstChild );\n\t}\n}, function(name, fn){\n\tjQuery.fn[ name ] = function(){\n\t\treturn this.each( fn, arguments );\n\t};\n});\n\njQuery.each([ \"Height\", \"Width\" ], function(i, name){\n\tvar type = name.toLowerCase();\n\n\tjQuery.fn[ type ] = function( size ) {\n\t\t// Get window width or height\n\t\treturn this[0] == window ?\n\t\t\t// Opera reports document.body.client[Width/Height] properly in both quirks and standards\n\t\t\tjQuery.browser.opera && document.body[ \"client\" + name ] ||\n\n\t\t\t// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)\n\t\t\tjQuery.browser.safari && window[ \"inner\" + name ] ||\n\n\t\t\t// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode\n\t\t\tdocument.compatMode == \"CSS1Compat\" && document.documentElement[ \"client\" + name ] || document.body[ \"client\" + name ] :\n\n\t\t\t// Get document width or height\n\t\t\tthis[0] == document ?\n\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n\t\t\t\tMath.max(\n\t\t\t\t\tMath.max(document.body[\"scroll\" + name], document.documentElement[\"scroll\" + name]),\n\t\t\t\t\tMath.max(document.body[\"offset\" + name], document.documentElement[\"offset\" + name])\n\t\t\t\t) :\n\n\t\t\t\t// Get or set width or height on the element\n\t\t\t\tsize == undefined ?\n\t\t\t\t\t// Get width or height on the element\n\t\t\t\t\t(this.length ? jQuery.css( this[0], type ) : null) :\n\n\t\t\t\t\t// Set the width or height on the element (default to pixels if value is unitless)\n\t\t\t\t\tthis.css( type, size.constructor == String ? size : size + \"px\" );\n\t};\n});\n\n// Helper function used by the dimensions and offset modules\nfunction num(elem, prop) {\n\treturn elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;\n}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?\n\t\t\"(?:[\\\\w*_-]|\\\\\\\\.)\" :\n\t\t\"(?:[\\\\w\\u0128-\\uFFFF*_-]|\\\\\\\\.)\",\n\tquickChild = new RegExp(\"^>\\\\s*(\" + chars + \"+)\"),\n\tquickID = new RegExp(\"^(\" + chars + \"+)(#)(\" + chars + \"+)\"),\n\tquickClass = new RegExp(\"^([#.]?)(\" + chars + \"*)\");\n\njQuery.extend({\n\texpr: {\n\t\t\"\": function(a,i,m){return m[2]==\"*\"||jQuery.nodeName(a,m[2]);},\n\t\t\"#\": function(a,i,m){return a.getAttribute(\"id\")==m[2];},\n\t\t\":\": {\n\t\t\t// Position Checks\n\t\t\tlt: function(a,i,m){return i<m[3]-0;},\n\t\t\tgt: function(a,i,m){return i>m[3]-0;},\n\t\t\tnth: function(a,i,m){return m[3]-0==i;},\n\t\t\teq: function(a,i,m){return m[3]-0==i;},\n\t\t\tfirst: function(a,i){return i==0;},\n\t\t\tlast: function(a,i,m,r){return i==r.length-1;},\n\t\t\teven: function(a,i){return i%2==0;},\n\t\t\todd: function(a,i){return i%2;},\n\n\t\t\t// Child Checks\n\t\t\t\"first-child\": function(a){return a.parentNode.getElementsByTagName(\"*\")[0]==a;},\n\t\t\t\"last-child\": function(a){return jQuery.nth(a.parentNode.lastChild,1,\"previousSibling\")==a;},\n\t\t\t\"only-child\": function(a){return !jQuery.nth(a.parentNode.lastChild,2,\"previousSibling\");},\n\n\t\t\t// Parent Checks\n\t\t\tparent: function(a){return a.firstChild;},\n\t\t\tempty: function(a){return !a.firstChild;},\n\n\t\t\t// Text Check\n\t\t\tcontains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||\"\").indexOf(m[3])>=0;},\n\n\t\t\t// Visibility\n\t\t\tvisible: function(a){return \"hidden\"!=a.type&&jQuery.css(a,\"display\")!=\"none\"&&jQuery.css(a,\"visibility\")!=\"hidden\";},\n\t\t\thidden: function(a){return \"hidden\"==a.type||jQuery.css(a,\"display\")==\"none\"||jQuery.css(a,\"visibility\")==\"hidden\";},\n\n\t\t\t// Form attributes\n\t\t\tenabled: function(a){return !a.disabled;},\n\t\t\tdisabled: function(a){return a.disabled;},\n\t\t\tchecked: function(a){return a.checked;},\n\t\t\tselected: function(a){return a.selected||jQuery.attr(a,\"selected\");},\n\n\t\t\t// Form elements\n\t\t\ttext: function(a){return \"text\"==a.type;},\n\t\t\tradio: function(a){return \"radio\"==a.type;},\n\t\t\tcheckbox: function(a){return \"checkbox\"==a.type;},\n\t\t\tfile: function(a){return \"file\"==a.type;},\n\t\t\tpassword: function(a){return \"password\"==a.type;},\n\t\t\tsubmit: function(a){return \"submit\"==a.type;},\n\t\t\timage: function(a){return \"image\"==a.type;},\n\t\t\treset: function(a){return \"reset\"==a.type;},\n\t\t\tbutton: function(a){return \"button\"==a.type||jQuery.nodeName(a,\"button\");},\n\t\t\tinput: function(a){return /input|select|textarea|button/i.test(a.nodeName);},\n\n\t\t\t// :has()\n\t\t\thas: function(a,i,m){return jQuery.find(m[3],a).length;},\n\n\t\t\t// :header\n\t\t\theader: function(a){return /h\\d/i.test(a.nodeName);},\n\n\t\t\t// :animated\n\t\t\tanimated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}\n\t\t}\n\t},\n\n\t// The regular expressions that power the parsing engine\n\tparse: [\n\t\t// Match: [@value='test'], [@foo]\n\t\t/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *('?\"?)(.*?)\\4 *\\]/,\n\n\t\t// Match: :contains('foo')\n\t\t/^(:)([\\w-]+)\\(\"?'?(.*?(\\(.*?\\))?[^(]*?)\"?'?\\)/,\n\n\t\t// Match: :even, :last-child, #id, .class\n\t\tnew RegExp(\"^([:.#]*)(\" + chars + \"+)\")\n\t],\n\n\tmultiFilter: function( expr, elems, not ) {\n\t\tvar old, cur = [];\n\n\t\twhile ( expr && expr != old ) {\n\t\t\told = expr;\n\t\t\tvar f = jQuery.filter( expr, elems, not );\n\t\t\texpr = f.t.replace(/^\\s*,\\s*/, \"\" );\n\t\t\tcur = not ? elems = f.r : jQuery.merge( cur, f.r );\n\t\t}\n\n\t\treturn cur;\n\t},\n\n\tfind: function( t, context ) {\n\t\t// Quickly handle non-string expressions\n\t\tif ( typeof t != \"string\" )\n\t\t\treturn [ t ];\n\n\t\t// check to make sure context is a DOM element or a document\n\t\tif ( context && context.nodeType != 1 && context.nodeType != 9)\n\t\t\treturn [ ];\n\n\t\t// Set the correct context (if none is provided)\n\t\tcontext = context || document;\n\n\t\t// Initialize the search\n\t\tvar ret = [context], done = [], last, nodeName;\n\n\t\t// Continue while a selector expression exists, and while\n\t\t// we're no longer looping upon ourselves\n\t\twhile ( t && last != t ) {\n\t\t\tvar r = [];\n\t\t\tlast = t;\n\n\t\t\tt = jQuery.trim(t);\n\n\t\t\tvar foundToken = false,\n\n\t\t\t// An attempt at speeding up child selectors that\n\t\t\t// point to a specific element tag\n\t\t\t\tre = quickChild,\n\n\t\t\t\tm = re.exec(t);\n\n\t\t\tif ( m ) {\n\t\t\t\tnodeName = m[1].toUpperCase();\n\n\t\t\t\t// Perform our own iteration and filter\n\t\t\t\tfor ( var i = 0; ret[i]; i++ )\n\t\t\t\t\tfor ( var c = ret[i].firstChild; c; c = c.nextSibling )\n\t\t\t\t\t\tif ( c.nodeType == 1 && (nodeName == \"*\" || c.nodeName.toUpperCase() == nodeName) )\n\t\t\t\t\t\t\tr.push( c );\n\n\t\t\t\tret = r;\n\t\t\t\tt = t.replace( re, \"\" );\n\t\t\t\tif ( t.indexOf(\" \") == 0 ) continue;\n\t\t\t\tfoundToken = true;\n\t\t\t} else {\n\t\t\t\tre = /^([>+~])\\s*(\\w*)/i;\n\n\t\t\t\tif ( (m = re.exec(t)) != null ) {\n\t\t\t\t\tr = [];\n\n\t\t\t\t\tvar merge = {};\n\t\t\t\t\tnodeName = m[2].toUpperCase();\n\t\t\t\t\tm = m[1];\n\n\t\t\t\t\tfor ( var j = 0, rl = ret.length; j < rl; j++ ) {\n\t\t\t\t\t\tvar n = m == \"~\" || m == \"+\" ? ret[j].nextSibling : ret[j].firstChild;\n\t\t\t\t\t\tfor ( ; n; n = n.nextSibling )\n\t\t\t\t\t\t\tif ( n.nodeType == 1 ) {\n\t\t\t\t\t\t\t\tvar id = jQuery.data(n);\n\n\t\t\t\t\t\t\t\tif ( m == \"~\" && merge[id] ) break;\n\n\t\t\t\t\t\t\t\tif (!nodeName || n.nodeName.toUpperCase() == nodeName ) {\n\t\t\t\t\t\t\t\t\tif ( m == \"~\" ) merge[id] = true;\n\t\t\t\t\t\t\t\t\tr.push( n );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( m == \"+\" ) break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tret = r;\n\n\t\t\t\t\t// And remove the token\n\t\t\t\t\tt = jQuery.trim( t.replace( re, \"\" ) );\n\t\t\t\t\tfoundToken = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// See if there's still an expression, and that we haven't already\n\t\t\t// matched a token\n\t\t\tif ( t && !foundToken ) {\n\t\t\t\t// Handle multiple expressions\n\t\t\t\tif ( !t.indexOf(\",\") ) {\n\t\t\t\t\t// Clean the result set\n\t\t\t\t\tif ( context == ret[0] ) ret.shift();\n\n\t\t\t\t\t// Merge the result sets\n\t\t\t\t\tdone = jQuery.merge( done, ret );\n\n\t\t\t\t\t// Reset the context\n\t\t\t\t\tr = ret = [context];\n\n\t\t\t\t\t// Touch up the selector string\n\t\t\t\t\tt = \" \" + t.substr(1,t.length);\n\n\t\t\t\t} else {\n\t\t\t\t\t// Optimize for the case nodeName#idName\n\t\t\t\t\tvar re2 = quickID;\n\t\t\t\t\tvar m = re2.exec(t);\n\n\t\t\t\t\t// Re-organize the results, so that they're consistent\n\t\t\t\t\tif ( m ) {\n\t\t\t\t\t\tm = [ 0, m[2], m[3], m[1] ];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, do a traditional filter check for\n\t\t\t\t\t\t// ID, class, and element selectors\n\t\t\t\t\t\tre2 = quickClass;\n\t\t\t\t\t\tm = re2.exec(t);\n\t\t\t\t\t}\n\n\t\t\t\t\tm[2] = m[2].replace(/\\\\/g, \"\");\n\n\t\t\t\t\tvar elem = ret[ret.length-1];\n\n\t\t\t\t\t// Try to do a global search by ID, where we can\n\t\t\t\t\tif ( m[1] == \"#\" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {\n\t\t\t\t\t\t// Optimization for HTML document case\n\t\t\t\t\t\tvar oid = elem.getElementById(m[2]);\n\n\t\t\t\t\t\t// Do a quick check for the existence of the actual ID attribute\n\t\t\t\t\t\t// to avoid selecting by the name attribute in IE\n\t\t\t\t\t\t// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form\n\t\t\t\t\t\tif ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == \"string\" && oid.id != m[2] )\n\t\t\t\t\t\t\toid = jQuery('[@id=\"'+m[2]+'\"]', elem)[0];\n\n\t\t\t\t\t\t// Do a quick check for node name (where applicable) so\n\t\t\t\t\t\t// that div#foo searches will be really fast\n\t\t\t\t\t\tret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We need to find all descendant elements\n\t\t\t\t\t\tfor ( var i = 0; ret[i]; i++ ) {\n\t\t\t\t\t\t\t// Grab the tag name being searched for\n\t\t\t\t\t\t\tvar tag = m[1] == \"#\" && m[3] ? m[3] : m[1] != \"\" || m[0] == \"\" ? \"*\" : m[2];\n\n\t\t\t\t\t\t\t// Handle IE7 being really dumb about <object>s\n\t\t\t\t\t\t\tif ( tag == \"*\" && ret[i].nodeName.toLowerCase() == \"object\" )\n\t\t\t\t\t\t\t\ttag = \"param\";\n\n\t\t\t\t\t\t\tr = jQuery.merge( r, ret[i].getElementsByTagName( tag ));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// It's faster to filter by class and be done with it\n\t\t\t\t\t\tif ( m[1] == \".\" )\n\t\t\t\t\t\t\tr = jQuery.classFilter( r, m[2] );\n\n\t\t\t\t\t\t// Same with ID filtering\n\t\t\t\t\t\tif ( m[1] == \"#\" ) {\n\t\t\t\t\t\t\tvar tmp = [];\n\n\t\t\t\t\t\t\t// Try to find the element with the ID\n\t\t\t\t\t\t\tfor ( var i = 0; r[i]; i++ )\n\t\t\t\t\t\t\t\tif ( r[i].getAttribute(\"id\") == m[2] ) {\n\t\t\t\t\t\t\t\t\ttmp = [ r[i] ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tr = tmp;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tret = r;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = t.replace( re2, \"\" );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// If a selector string still exists\n\t\t\tif ( t ) {\n\t\t\t\t// Attempt to filter it\n\t\t\t\tvar val = jQuery.filter(t,r);\n\t\t\t\tret = r = val.r;\n\t\t\t\tt = jQuery.trim(val.t);\n\t\t\t}\n\t\t}\n\n\t\t// An error occurred with the selector;\n\t\t// just return an empty set instead\n\t\tif ( t )\n\t\t\tret = [];\n\n\t\t// Remove the root context\n\t\tif ( ret && context == ret[0] )\n\t\t\tret.shift();\n\n\t\t// And combine the results\n\t\tdone = jQuery.merge( done, ret );\n\n\t\treturn done;\n\t},\n\n\tclassFilter: function(r,m,not){\n\t\tm = \" \" + m + \" \";\n\t\tvar tmp = [];\n\t\tfor ( var i = 0; r[i]; i++ ) {\n\t\t\tvar pass = (\" \" + r[i].className + \" \").indexOf( m ) >= 0;\n\t\t\tif ( !not && pass || not && !pass )\n\t\t\t\ttmp.push( r[i] );\n\t\t}\n\t\treturn tmp;\n\t},\n\n\tfilter: function(t,r,not) {\n\t\tvar last;\n\n\t\t// Look for common filter expressions\n\t\twhile ( t && t != last ) {\n\t\t\tlast = t;\n\n\t\t\tvar p = jQuery.parse, m;\n\n\t\t\tfor ( var i = 0; p[i]; i++ ) {\n\t\t\t\tm = p[i].exec( t );\n\n\t\t\t\tif ( m ) {\n\t\t\t\t\t// Remove what we just matched\n\t\t\t\t\tt = t.substring( m[0].length );\n\n\t\t\t\t\tm[2] = m[2].replace(/\\\\/g, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !m )\n\t\t\t\tbreak;\n\n\t\t\t// :not() is a special case that can be optimized by\n\t\t\t// keeping it out of the expression list\n\t\t\tif ( m[1] == \":\" && m[2] == \"not\" )\n\t\t\t\t// optimize if only one selector found (most common case)\n\t\t\t\tr = isSimple.test( m[3] ) ?\n\t\t\t\t\tjQuery.filter(m[3], r, true).r :\n\t\t\t\t\tjQuery( r ).not( m[3] );\n\n\t\t\t// We can get a big speed boost by filtering by class here\n\t\t\telse if ( m[1] == \".\" )\n\t\t\t\tr = jQuery.classFilter(r, m[2], not);\n\n\t\t\telse if ( m[1] == \"[\" ) {\n\t\t\t\tvar tmp = [], type = m[3];\n\n\t\t\t\tfor ( var i = 0, rl = r.length; i < rl; i++ ) {\n\t\t\t\t\tvar a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];\n\n\t\t\t\t\tif ( z == null || /href|src|selected/.test(m[2]) )\n\t\t\t\t\t\tz = jQuery.attr(a,m[2]) || '';\n\n\t\t\t\t\tif ( (type == \"\" && !!z ||\n\t\t\t\t\t\t type == \"=\" && z == m[5] ||\n\t\t\t\t\t\t type == \"!=\" && z != m[5] ||\n\t\t\t\t\t\t type == \"^=\" && z && !z.indexOf(m[5]) ||\n\t\t\t\t\t\t type == \"$=\" && z.substr(z.length - m[5].length) == m[5] ||\n\t\t\t\t\t\t (type == \"*=\" || type == \"~=\") && z.indexOf(m[5]) >= 0) ^ not )\n\t\t\t\t\t\t\ttmp.push( a );\n\t\t\t\t}\n\n\t\t\t\tr = tmp;\n\n\t\t\t// We can get a speed boost by handling nth-child here\n\t\t\t} else if ( m[1] == \":\" && m[2] == \"nth-child\" ) {\n\t\t\t\tvar merge = {}, tmp = [],\n\t\t\t\t\t// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n\t\t\t\t\ttest = /(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(\n\t\t\t\t\t\tm[3] == \"even\" && \"2n\" || m[3] == \"odd\" && \"2n+1\" ||\n\t\t\t\t\t\t!/\\D/.test(m[3]) && \"0n+\" + m[3] || m[3]),\n\t\t\t\t\t// calculate the numbers (first)n+(last) including if they are negative\n\t\t\t\t\tfirst = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;\n\n\t\t\t\t// loop through all the elements left in the jQuery object\n\t\t\t\tfor ( var i = 0, rl = r.length; i < rl; i++ ) {\n\t\t\t\t\tvar node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);\n\n\t\t\t\t\tif ( !merge[id] ) {\n\t\t\t\t\t\tvar c = 1;\n\n\t\t\t\t\t\tfor ( var n = parentNode.firstChild; n; n = n.nextSibling )\n\t\t\t\t\t\t\tif ( n.nodeType == 1 )\n\t\t\t\t\t\t\t\tn.nodeIndex = c++;\n\n\t\t\t\t\t\tmerge[id] = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar add = false;\n\n\t\t\t\t\tif ( first == 0 ) {\n\t\t\t\t\t\tif ( node.nodeIndex == last )\n\t\t\t\t\t\t\tadd = true;\n\t\t\t\t\t} else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )\n\t\t\t\t\t\tadd = true;\n\n\t\t\t\t\tif ( add ^ not )\n\t\t\t\t\t\ttmp.push( node );\n\t\t\t\t}\n\n\t\t\t\tr = tmp;\n\n\t\t\t// Otherwise, find the expression to execute\n\t\t\t} else {\n\t\t\t\tvar fn = jQuery.expr[ m[1] ];\n\t\t\t\tif ( typeof fn == \"object\" )\n\t\t\t\t\tfn = fn[ m[2] ];\n\n\t\t\t\tif ( typeof fn == \"string\" )\n\t\t\t\t\tfn = eval(\"false||function(a,i){return \" + fn + \";}\");\n\n\t\t\t\t// Execute it against the current filter\n\t\t\t\tr = jQuery.grep( r, function(elem, i){\n\t\t\t\t\treturn fn(elem, i, m, r);\n\t\t\t\t}, not );\n\t\t\t}\n\t\t}\n\n\t\t// Return an array of filtered elements (r)\n\t\t// and the modified expression string (t)\n\t\treturn { r: r, t: t };\n\t},\n\n\tdir: function( elem, dir ){\n\t\tvar matched = [],\n\t\t\tcur = elem[dir];\n\t\twhile ( cur && cur != document ) {\n\t\t\tif ( cur.nodeType == 1 )\n\t\t\t\tmatched.push( cur );\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tnth: function(cur,result,dir,elem){\n\t\tresult = result || 1;\n\t\tvar num = 0;\n\n\t\tfor ( ; cur; cur = cur[dir] )\n\t\t\tif ( cur.nodeType == 1 && ++num == result )\n\t\t\t\tbreak;\n\n\t\treturn cur;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType == 1 && n != elem )\n\t\t\t\tr.push( n );\n\t\t}\n\n\t\treturn r;\n\t}\n});\n/*\n * A number of helper functions used for managing events.\n * Many of the ideas behind this code orignated from\n * Dean Edwards' addEvent library.\n */\njQuery.event = {\n\n\t// Bind an event to an element\n\t// Original by Dean Edwards\n\tadd: function(elem, types, handler, data) {\n\t\tif ( elem.nodeType == 3 || elem.nodeType == 8 )\n\t\t\treturn;\n\n\t\t// For whatever reason, IE has trouble passing the window object\n\t\t// around, causing it to be cloned in the process\n\t\tif ( jQuery.browser.msie && elem.setInterval )\n\t\t\telem = window;\n\n\t\t// Make sure that the function being executed has a unique ID\n\t\tif ( !handler.guid )\n\t\t\thandler.guid = this.guid++;\n\n\t\t// if data is passed, bind to handler\n\t\tif( data != undefined ) {\n\t\t\t// Create temporary function pointer to original handler\n\t\t\tvar fn = handler;\n\n\t\t\t// Create unique handler function, wrapped around original handler\n\t\t\thandler = this.proxy( fn, function() {\n\t\t\t\t// Pass arguments and context to original handler\n\t\t\t\treturn fn.apply(this, arguments);\n\t\t\t});\n\n\t\t\t// Store data in unique handler\n\t\t\thandler.data = data;\n\t\t}\n\n\t\t// Init the element's event structure\n\t\tvar events = jQuery.data(elem, \"events\") || jQuery.data(elem, \"events\", {}),\n\t\t\thandle = jQuery.data(elem, \"handle\") || jQuery.data(elem, \"handle\", function(){\n\t\t\t\t// Handle the second event of a trigger and when\n\t\t\t\t// an event is called after a page has unloaded\n\t\t\t\tif ( typeof jQuery != \"undefined\" && !jQuery.event.triggered )\n\t\t\t\t\treturn jQuery.event.handle.apply(arguments.callee.elem, arguments);\n\t\t\t});\n\t\t// Add elem as a property of the handle function\n\t\t// This is to prevent a memory leak with non-native\n\t\t// event in IE.\n\t\thandle.elem = elem;\n\n\t\t// Handle multiple events separated by a space\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\n\t\tjQuery.each(types.split(/\\s+/), function(index, type) {\n\t\t\t// Namespaced event handlers\n\t\t\tvar parts = type.split(\".\");\n\t\t\ttype = parts[0];\n\t\t\thandler.type = parts[1];\n\n\t\t\t// Get the current list of functions bound to this event\n\t\t\tvar handlers = events[type];\n\n\t\t\t// Init the event handler queue\n\t\t\tif (!handlers) {\n\t\t\t\thandlers = events[type] = {};\n\n\t\t\t\t// Check for a special event handler\n\t\t\t\t// Only use addEventListener/attachEvent if the special\n\t\t\t\t// events handler returns false\n\t\t\t\tif ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif (elem.addEventListener)\n\t\t\t\t\t\telem.addEventListener(type, handle, false);\n\t\t\t\t\telse if (elem.attachEvent)\n\t\t\t\t\t\telem.attachEvent(\"on\" + type, handle);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the function to the element's handler list\n\t\t\thandlers[handler.guid] = handler;\n\n\t\t\t// Keep track of which events have been used, for global triggering\n\t\t\tjQuery.event.global[type] = true;\n\t\t});\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\tguid: 1,\n\tglobal: {},\n\n\t// Detach an event or set of events from an element\n\tremove: function(elem, types, handler) {\n\t\t// don't do events on text and comment nodes\n\t\tif ( elem.nodeType == 3 || elem.nodeType == 8 )\n\t\t\treturn;\n\n\t\tvar events = jQuery.data(elem, \"events\"), ret, index;\n\n\t\tif ( events ) {\n\t\t\t// Unbind all events for the element\n\t\t\tif ( types == undefined || (typeof types == \"string\" && types.charAt(0) == \".\") )\n\t\t\t\tfor ( var type in events )\n\t\t\t\t\tthis.remove( elem, type + (types || \"\") );\n\t\t\telse {\n\t\t\t\t// types is actually an event object here\n\t\t\t\tif ( types.type ) {\n\t\t\t\t\thandler = types.handler;\n\t\t\t\t\ttypes = types.type;\n\t\t\t\t}\n\n\t\t\t\t// Handle multiple events seperated by a space\n\t\t\t\t// jQuery(...).unbind(\"mouseover mouseout\", fn);\n\t\t\t\tjQuery.each(types.split(/\\s+/), function(index, type){\n\t\t\t\t\t// Namespaced event handlers\n\t\t\t\t\tvar parts = type.split(\".\");\n\t\t\t\t\ttype = parts[0];\n\n\t\t\t\t\tif ( events[type] ) {\n\t\t\t\t\t\t// remove the given handler for the given type\n\t\t\t\t\t\tif ( handler )\n\t\t\t\t\t\t\tdelete events[type][handler.guid];\n\n\t\t\t\t\t\t// remove all handlers for the given type\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tfor ( handler in events[type] )\n\t\t\t\t\t\t\t\t// Handle the removal of namespaced events\n\t\t\t\t\t\t\t\tif ( !parts[1] || events[type][handler].type == parts[1] )\n\t\t\t\t\t\t\t\t\tdelete events[type][handler];\n\n\t\t\t\t\t\t// remove generic event handler if no more handlers exist\n\t\t\t\t\t\tfor ( ret in events[type] ) break;\n\t\t\t\t\t\tif ( !ret ) {\n\t\t\t\t\t\t\tif ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) {\n\t\t\t\t\t\t\t\tif (elem.removeEventListener)\n\t\t\t\t\t\t\t\t\telem.removeEventListener(type, jQuery.data(elem, \"handle\"), false);\n\t\t\t\t\t\t\t\telse if (elem.detachEvent)\n\t\t\t\t\t\t\t\t\telem.detachEvent(\"on\" + type, jQuery.data(elem, \"handle\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tret = null;\n\t\t\t\t\t\t\tdelete events[type];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Remove the expando if it's no longer used\n\t\t\tfor ( ret in events ) break;\n\t\t\tif ( !ret ) {\n\t\t\t\tvar handle = jQuery.data( elem, \"handle\" );\n\t\t\t\tif ( handle ) handle.elem = null;\n\t\t\t\tjQuery.removeData( elem, \"events\" );\n\t\t\t\tjQuery.removeData( elem, \"handle\" );\n\t\t\t}\n\t\t}\n\t},\n\n\ttrigger: function(type, data, elem, donative, extra) {\n\t\t// Clone the incoming data, if any\n\t\tdata = jQuery.makeArray(data);\n\n\t\tif ( type.indexOf(\"!\") >= 0 ) {\n\t\t\ttype = type.slice(0, -1);\n\t\t\tvar exclusive = true;\n\t\t}\n\n\t\t// Handle a global trigger\n\t\tif ( !elem ) {\n\t\t\t// Only trigger if we've ever bound an event for it\n\t\t\tif ( this.global[type] )\n\t\t\t\tjQuery(\"*\").add([window, document]).trigger(type, data);\n\n\t\t// Handle triggering a single element\n\t\t} else {\n\t\t\t// don't do events on text and comment nodes\n\t\t\tif ( elem.nodeType == 3 || elem.nodeType == 8 )\n\t\t\t\treturn undefined;\n\n\t\t\tvar val, ret, fn = jQuery.isFunction( elem[ type ] || null ),\n\t\t\t\t// Check to see if we need to provide a fake event, or not\n\t\t\t\tevent = !data[0] || !data[0].preventDefault;\n\n\t\t\t// Pass along a fake event\n\t\t\tif ( event ) {\n\t\t\t\tdata.unshift({\n\t\t\t\t\ttype: type,\n\t\t\t\t\ttarget: elem,\n\t\t\t\t\tpreventDefault: function(){},\n\t\t\t\t\tstopPropagation: function(){},\n\t\t\t\t\ttimeStamp: now()\n\t\t\t\t});\n\t\t\t\tdata[0][expando] = true; // no need to fix fake event\n\t\t\t}\n\n\t\t\t// Enforce the right trigger type\n\t\t\tdata[0].type = type;\n\t\t\tif ( exclusive )\n\t\t\t\tdata[0].exclusive = true;\n\n\t\t\t// Trigger the event, it is assumed that \"handle\" is a function\n\t\t\tvar handle = jQuery.data(elem, \"handle\");\n\t\t\tif ( handle )\n\t\t\t\tval = handle.apply( elem, data );\n\n\t\t\t// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)\n\t\t\tif ( (!fn || (jQuery.nodeName(elem, 'a') && type == \"click\")) && elem[\"on\"+type] && elem[\"on\"+type].apply( elem, data ) === false )\n\t\t\t\tval = false;\n\n\t\t\t// Extra functions don't get the custom event object\n\t\t\tif ( event )\n\t\t\t\tdata.shift();\n\n\t\t\t// Handle triggering of extra function\n\t\t\tif ( extra && jQuery.isFunction( extra ) ) {\n\t\t\t\t// call the extra function and tack the current return value on the end for possible inspection\n\t\t\t\tret = extra.apply( elem, val == null ? data : data.concat( val ) );\n\t\t\t\t// if anything is returned, give it precedence and have it overwrite the previous value\n\t\t\t\tif (ret !== undefined)\n\t\t\t\t\tval = ret;\n\t\t\t}\n\n\t\t\t// Trigger the native events (except for clicks on links)\n\t\t\tif ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == \"click\") ) {\n\t\t\t\tthis.triggered = true;\n\t\t\t\ttry {\n\t\t\t\t\telem[ type ]();\n\t\t\t\t// prevent IE from throwing an error for some hidden elements\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\tthis.triggered = false;\n\t\t}\n\n\t\treturn val;\n\t},\n\n\thandle: function(event) {\n\t\t// returned undefined or false\n\t\tvar val, ret, namespace, all, handlers;\n\n\t\tevent = arguments[0] = jQuery.event.fix( event || window.event );\n\n\t\t// Namespaced event handlers\n\t\tnamespace = event.type.split(\".\");\n\t\tevent.type = namespace[0];\n\t\tnamespace = namespace[1];\n\t\t// Cache this now, all = true means, any handler\n\t\tall = !namespace && !event.exclusive;\n\n\t\thandlers = ( jQuery.data(this, \"events\") || {} )[event.type];\n\n\t\tfor ( var j in handlers ) {\n\t\t\tvar handler = handlers[j];\n\n\t\t\t// Filter the functions by class\n\t\t\tif ( all || handler.type == namespace ) {\n\t\t\t\t// Pass in a reference to the handler function itself\n\t\t\t\t// So that we can later remove it\n\t\t\t\tevent.handler = handler;\n\t\t\t\tevent.data = handler.data;\n\n\t\t\t\tret = handler.apply( this, arguments );\n\n\t\t\t\tif ( val !== false )\n\t\t\t\t\tval = ret;\n\n\t\t\t\tif ( ret === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn val;\n\t},\n\n\tfix: function(event) {\n\t\tif ( event[expando] == true )\n\t\t\treturn event;\n\n\t\t// store a copy of the original event object\n\t\t// and \"clone\" to set read-only properties\n\t\tvar originalEvent = event;\n\t\tevent = { originalEvent: originalEvent };\n\t\tvar props = \"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which\".split(\" \");\n\t\tfor ( var i=props.length; i; i-- )\n\t\t\tevent[ props[i] ] = originalEvent[ props[i] ];\n\n\t\t// Mark it as fixed\n\t\tevent[expando] = true;\n\n\t\t// add preventDefault and stopPropagation since\n\t\t// they will not work on the clone\n\t\tevent.preventDefault = function() {\n\t\t\t// if preventDefault exists run it on the original event\n\t\t\tif (originalEvent.preventDefault)\n\t\t\t\toriginalEvent.preventDefault();\n\t\t\t// otherwise set the returnValue property of the original event to false (IE)\n\t\t\toriginalEvent.returnValue = false;\n\t\t};\n\t\tevent.stopPropagation = function() {\n\t\t\t// if stopPropagation exists run it on the original event\n\t\t\tif (originalEvent.stopPropagation)\n\t\t\t\toriginalEvent.stopPropagation();\n\t\t\t// otherwise set the cancelBubble property of the original event to true (IE)\n\t\t\toriginalEvent.cancelBubble = true;\n\t\t};\n\n\t\t// Fix timeStamp\n\t\tevent.timeStamp = event.timeStamp || now();\n\n\t\t// Fix target property, if necessary\n\t\tif ( !event.target )\n\t\t\tevent.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either\n\n\t\t// check if target is a textnode (safari)\n\t\tif ( event.target.nodeType == 3 )\n\t\t\tevent.target = event.target.parentNode;\n\n\t\t// Add relatedTarget, if necessary\n\t\tif ( !event.relatedTarget && event.fromElement )\n\t\t\tevent.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;\n\n\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\tif ( event.pageX == null && event.clientX != null ) {\n\t\t\tvar doc = document.documentElement, body = document.body;\n\t\t\tevent.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);\n\t\t\tevent.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);\n\t\t}\n\n\t\t// Add which for key events\n\t\tif ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )\n\t\t\tevent.which = event.charCode || event.keyCode;\n\n\t\t// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)\n\t\tif ( !event.metaKey && event.ctrlKey )\n\t\t\tevent.metaKey = event.ctrlKey;\n\n\t\t// Add which for click: 1 == left; 2 == middle; 3 == right\n\t\t// Note: button is not normalized, so don't use it\n\t\tif ( !event.which && event.button )\n\t\t\tevent.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));\n\n\t\treturn event;\n\t},\n\n\tproxy: function( fn, proxy ){\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;\n\t\t// So proxy can be declared as an argument\n\t\treturn proxy;\n\t},\n\n\tspecial: {\n\t\tready: {\n\t\t\tsetup: function() {\n\t\t\t\t// Make sure the ready event is setup\n\t\t\t\tbindReady();\n\t\t\t\treturn;\n\t\t\t},\n\n\t\t\tteardown: function() { return; }\n\t\t},\n\n\t\tmouseenter: {\n\t\t\tsetup: function() {\n\t\t\t\tif ( jQuery.browser.msie ) return false;\n\t\t\t\tjQuery(this).bind(\"mouseover\", jQuery.event.special.mouseenter.handler);\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\tteardown: function() {\n\t\t\t\tif ( jQuery.browser.msie ) return false;\n\t\t\t\tjQuery(this).unbind(\"mouseover\", jQuery.event.special.mouseenter.handler);\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\thandler: function(event) {\n\t\t\t\t// If we actually just moused on to a sub-element, ignore it\n\t\t\t\tif ( withinElement(event, this) ) return true;\n\t\t\t\t// Execute the right handlers by setting the event type to mouseenter\n\t\t\t\tevent.type = \"mouseenter\";\n\t\t\t\treturn jQuery.event.handle.apply(this, arguments);\n\t\t\t}\n\t\t},\n\n\t\tmouseleave: {\n\t\t\tsetup: function() {\n\t\t\t\tif ( jQuery.browser.msie ) return false;\n\t\t\t\tjQuery(this).bind(\"mouseout\", jQuery.event.special.mouseleave.handler);\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\tteardown: function() {\n\t\t\t\tif ( jQuery.browser.msie ) return false;\n\t\t\t\tjQuery(this).unbind(\"mouseout\", jQuery.event.special.mouseleave.handler);\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\thandler: function(event) {\n\t\t\t\t// If we actually just moused on to a sub-element, ignore it\n\t\t\t\tif ( withinElement(event, this) ) return true;\n\t\t\t\t// Execute the right handlers by setting the event type to mouseleave\n\t\t\t\tevent.type = \"mouseleave\";\n\t\t\t\treturn jQuery.event.handle.apply(this, arguments);\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.fn.extend({\n\tbind: function( type, data, fn ) {\n\t\treturn type == \"unload\" ? this.one(type, data, fn) : this.each(function(){\n\t\t\tjQuery.event.add( this, type, fn || data, fn && data );\n\t\t});\n\t},\n\n\tone: function( type, data, fn ) {\n\t\tvar one = jQuery.event.proxy( fn || data, function(event) {\n\t\t\tjQuery(this).unbind(event, one);\n\t\t\treturn (fn || data).apply( this, arguments );\n\t\t});\n\t\treturn this.each(function(){\n\t\t\tjQuery.event.add( this, type, one, fn && data);\n\t\t});\n\t},\n\n\tunbind: function( type, fn ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery.event.remove( this, type, fn );\n\t\t});\n\t},\n\n\ttrigger: function( type, data, fn ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery.event.trigger( type, data, this, true, fn );\n\t\t});\n\t},\n\n\ttriggerHandler: function( type, data, fn ) {\n\t\treturn this[0] && jQuery.event.trigger( type, data, this[0], false, fn );\n\t},\n\n\ttoggle: function( fn ) {\n\t\t// Save reference to arguments for access in closure\n\t\tvar args = arguments, i = 1;\n\n\t\t// link all the functions, so any of them can unbind this click handler\n\t\twhile( i < args.length )\n\t\t\tjQuery.event.proxy( fn, args[i++] );\n\n\t\treturn this.click( jQuery.event.proxy( fn, function(event) {\n\t\t\t// Figure out which function to execute\n\t\t\tthis.lastToggle = ( this.lastToggle || 0 ) % i;\n\n\t\t\t// Make sure that clicks stop\n\t\t\tevent.preventDefault();\n\n\t\t\t// and execute the function\n\t\t\treturn args[ this.lastToggle++ ].apply( this, arguments ) || false;\n\t\t}));\n\t},\n\n\thover: function(fnOver, fnOut) {\n\t\treturn this.bind('mouseenter', fnOver).bind('mouseleave', fnOut);\n\t},\n\n\tready: function(fn) {\n\t\t// Attach the listeners\n\t\tbindReady();\n\n\t\t// If the DOM is already ready\n\t\tif ( jQuery.isReady )\n\t\t\t// Execute the function immediately\n\t\t\tfn.call( document, jQuery );\n\n\t\t// Otherwise, remember the function for later\n\t\telse\n\t\t\t// Add the function to the wait list\n\t\t\tjQuery.readyList.push( function() { return fn.call(this, jQuery); } );\n\n\t\treturn this;\n\t}\n});\n\njQuery.extend({\n\tisReady: false,\n\treadyList: [],\n\t// Handle when the DOM is ready\n\tready: function() {\n\t\t// Make sure that the DOM is not already loaded\n\t\tif ( !jQuery.isReady ) {\n\t\t\t// Remember that the DOM is ready\n\t\t\tjQuery.isReady = true;\n\n\t\t\t// If there are functions bound, to execute\n\t\t\tif ( jQuery.readyList ) {\n\t\t\t\t// Execute all of them\n\t\t\t\tjQuery.each( jQuery.readyList, function(){\n\t\t\t\t\tthis.call( document );\n\t\t\t\t});\n\n\t\t\t\t// Reset the list of functions\n\t\t\t\tjQuery.readyList = null;\n\t\t\t}\n\n\t\t\t// Trigger any bound ready events\n\t\t\tjQuery(document).triggerHandler(\"ready\");\n\t\t}\n\t}\n});\n\nvar readyBound = false;\n\nfunction bindReady(){\n\tif ( readyBound ) return;\n\treadyBound = true;\n\n\t// Mozilla, Opera (see further below for it) and webkit nightlies currently support this event\n\tif ( document.addEventListener && !jQuery.browser.opera)\n\t\t// Use the handy event callback\n\t\tdocument.addEventListener( \"DOMContentLoaded\", jQuery.ready, false );\n\n\t// If IE is used and is not in a frame\n\t// Continually check to see if the document is ready\n\tif ( jQuery.browser.msie && window == top ) (function(){\n\t\tif (jQuery.isReady) return;\n\t\ttry {\n\t\t\t// If IE is used, use the trick by Diego Perini\n\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\tdocument.documentElement.doScroll(\"left\");\n\t\t} catch( error ) {\n\t\t\tsetTimeout( arguments.callee, 0 );\n\t\t\treturn;\n\t\t}\n\t\t// and execute any waiting functions\n\t\tjQuery.ready();\n\t})();\n\n\tif ( jQuery.browser.opera )\n\t\tdocument.addEventListener( \"DOMContentLoaded\", function () {\n\t\t\tif (jQuery.isReady) return;\n\t\t\tfor (var i = 0; i < document.styleSheets.length; i++)\n\t\t\t\tif (document.styleSheets[i].disabled) {\n\t\t\t\t\tsetTimeout( arguments.callee, 0 );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t// and execute any waiting functions\n\t\t\tjQuery.ready();\n\t\t}, false);\n\n\tif ( jQuery.browser.safari ) {\n\t\tvar numStyles;\n\t\t(function(){\n\t\t\tif (jQuery.isReady) return;\n\t\t\tif ( document.readyState != \"loaded\" && document.readyState != \"complete\" ) {\n\t\t\t\tsetTimeout( arguments.callee, 0 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( numStyles === undefined )\n\t\t\t\tnumStyles = jQuery(\"style, link[rel=stylesheet]\").length;\n\t\t\tif ( document.styleSheets.length != numStyles ) {\n\t\t\t\tsetTimeout( arguments.callee, 0 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// and execute any waiting functions\n\t\t\tjQuery.ready();\n\t\t})();\n\t}\n\n\t// A fallback to window.onload, that will always work\n\tjQuery.event.add( window, \"load\", jQuery.ready );\n}\n\njQuery.each( (\"blur,focus,load,resize,scroll,unload,click,dblclick,\" +\n\t\"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,\" +\n\t\"submit,keydown,keypress,keyup,error\").split(\",\"), function(i, name){\n\n\t// Handle event binding\n\tjQuery.fn[name] = function(fn){\n\t\treturn fn ? this.bind(name, fn) : this.trigger(name);\n\t};\n});\n\n// Checks if an event happened on an element within another element\n// Used in jQuery.event.special.mouseenter and mouseleave handlers\nvar withinElement = function(event, elem) {\n\t// Check if mouse(over|out) are still within the same parent element\n\tvar parent = event.relatedTarget;\n\t// Traverse up the tree\n\twhile ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; }\n\t// Return true if we actually just moused on to a sub-element\n\treturn parent == elem;\n};\n\n// Prevent memory leaks in IE\n// And prevent errors on refresh with events like mouseover in other browsers\n// Window isn't included so as not to unbind existing unload events\njQuery(window).bind(\"unload\", function() {\n\tjQuery(\"*\").add(document).unbind();\n});\njQuery.fn.extend({\n\t// Keep a copy of the old load\n\t_load: jQuery.fn.load,\n\n\tload: function( url, params, callback ) {\n\t\tif ( typeof url != 'string' )\n\t\t\treturn this._load( url );\n\n\t\tvar off = url.indexOf(\" \");\n\t\tif ( off >= 0 ) {\n\t\t\tvar selector = url.slice(off, url.length);\n\t\t\turl = url.slice(0, off);\n\t\t}\n\n\t\tcallback = callback || function(){};\n\n\t\t// Default to a GET request\n\t\tvar type = \"GET\";\n\n\t\t// If the second parameter was provided\n\t\tif ( params )\n\t\t\t// If it's a function\n\t\t\tif ( jQuery.isFunction( params ) ) {\n\t\t\t\t// We assume that it's the callback\n\t\t\t\tcallback = params;\n\t\t\t\tparams = null;\n\n\t\t\t// Otherwise, build a param string\n\t\t\t} else {\n\t\t\t\tparams = jQuery.param( params );\n\t\t\t\ttype = \"POST\";\n\t\t\t}\n\n\t\tvar self = this;\n\n\t\t// Request the remote document\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params,\n\t\t\tcomplete: function(res, status){\n\t\t\t\t// If successful, inject the HTML into all the matched elements\n\t\t\t\tif ( status == \"success\" || status == \"notmodified\" )\n\t\t\t\t\t// See if a selector was specified\n\t\t\t\t\tself.html( selector ?\n\t\t\t\t\t\t// Create a dummy div to hold the results\n\t\t\t\t\t\tjQuery(\"<div/>\")\n\t\t\t\t\t\t\t// inject the contents of the document in, removing the scripts\n\t\t\t\t\t\t\t// to avoid any 'Permission Denied' errors in IE\n\t\t\t\t\t\t\t.append(res.responseText.replace(/<script(.|\\s)*?\\/script>/g, \"\"))\n\n\t\t\t\t\t\t\t// Locate the specified elements\n\t\t\t\t\t\t\t.find(selector) :\n\n\t\t\t\t\t\t// If not, just inject the full result\n\t\t\t\t\t\tres.responseText );\n\n\t\t\t\tself.each( callback, [res.responseText, status, res] );\n\t\t\t}\n\t\t});\n\t\treturn this;\n\t},\n\n\tserialize: function() {\n\t\treturn jQuery.param(this.serializeArray());\n\t},\n\tserializeArray: function() {\n\t\treturn this.map(function(){\n\t\t\treturn jQuery.nodeName(this, \"form\") ?\n\t\t\t\tjQuery.makeArray(this.elements) : this;\n\t\t})\n\t\t.filter(function(){\n\t\t\treturn this.name && !this.disabled &&\n\t\t\t\t(this.checked || /select|textarea/i.test(this.nodeName) ||\n\t\t\t\t\t/text|hidden|password/i.test(this.type));\n\t\t})\n\t\t.map(function(i, elem){\n\t\t\tvar val = jQuery(this).val();\n\t\t\treturn val == null ? null :\n\t\t\t\tval.constructor == Array ?\n\t\t\t\t\tjQuery.map( val, function(val, i){\n\t\t\t\t\t\treturn {name: elem.name, value: val};\n\t\t\t\t\t}) :\n\t\t\t\t\t{name: elem.name, value: val};\n\t\t}).get();\n\t}\n});\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( \"ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend\".split(\",\"), function(i,o){\n\tjQuery.fn[o] = function(f){\n\t\treturn this.bind(o, f);\n\t};\n});\n\nvar jsc = now();\n\njQuery.extend({\n\tget: function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was ommited\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\tcallback = data;\n\t\t\tdata = null;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: \"GET\",\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get(url, null, callback, \"script\");\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get(url, data, callback, \"json\");\n\t},\n\n\tpost: function( url, data, callback, type ) {\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\tcallback = data;\n\t\t\tdata = {};\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t},\n\n\tajaxSetup: function( settings ) {\n\t\tjQuery.extend( jQuery.ajaxSettings, settings );\n\t},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\tglobal: true,\n\t\ttype: \"GET\",\n\t\ttimeout: 0,\n\t\tcontentType: \"application/x-www-form-urlencoded\",\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tdata: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\taccepts: {\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\thtml: \"text/html\",\n\t\t\tscript: \"text/javascript, application/javascript\",\n\t\t\tjson: \"application/json, text/javascript\",\n\t\t\ttext: \"text/plain\",\n\t\t\t_default: \"*/*\"\n\t\t}\n\t},\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\n\tajax: function( s ) {\n\t\t// Extend the settings, but re-extend 's' so that it can be\n\t\t// checked again later (in the test suite, specifically)\n\t\ts = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));\n\n\t\tvar jsonp, jsre = /=\\?(&|$)/g, status, data,\n\t\t\ttype = s.type.toUpperCase();\n\n\t\t// convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data != \"string\" )\n\t\t\ts.data = jQuery.param(s.data);\n\n\t\t// Handle JSONP Parameter Callbacks\n\t\tif ( s.dataType == \"jsonp\" ) {\n\t\t\tif ( type == \"GET\" ) {\n\t\t\t\tif ( !s.url.match(jsre) )\n\t\t\t\t\ts.url += (s.url.match(/\\?/) ? \"&\" : \"?\") + (s.jsonp || \"callback\") + \"=?\";\n\t\t\t} else if ( !s.data || !s.data.match(jsre) )\n\t\t\t\ts.data = (s.data ? s.data + \"&\" : \"\") + (s.jsonp || \"callback\") + \"=?\";\n\t\t\ts.dataType = \"json\";\n\t\t}\n\n\t\t// Build temporary JSONP function\n\t\tif ( s.dataType == \"json\" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {\n\t\t\tjsonp = \"jsonp\" + jsc++;\n\n\t\t\t// Replace the =? sequence both in the query string and the data\n\t\t\tif ( s.data )\n\t\t\t\ts.data = (s.data + \"\").replace(jsre, \"=\" + jsonp + \"$1\");\n\t\t\ts.url = s.url.replace(jsre, \"=\" + jsonp + \"$1\");\n\n\t\t\t// We need to make sure\n\t\t\t// that a JSONP style response is executed properly\n\t\t\ts.dataType = \"script\";\n\n\t\t\t// Handle JSONP-style loading\n\t\t\twindow[ jsonp ] = function(tmp){\n\t\t\t\tdata = tmp;\n\t\t\t\tsuccess();\n\t\t\t\tcomplete();\n\t\t\t\t// Garbage collect\n\t\t\t\twindow[ jsonp ] = undefined;\n\t\t\t\ttry{ delete window[ jsonp ]; } catch(e){}\n\t\t\t\tif ( head )\n\t\t\t\t\thead.removeChild( script );\n\t\t\t};\n\t\t}\n\n\t\tif ( s.dataType == \"script\" && s.cache == null )\n\t\t\ts.cache = false;\n\n\t\tif ( s.cache === false && type == \"GET\" ) {\n\t\t\tvar ts = now();\n\t\t\t// try replacing _= if it is there\n\t\t\tvar ret = s.url.replace(/(\\?|&)_=.*?(&|$)/, \"$1_=\" + ts + \"$2\");\n\t\t\t// if nothing was replaced, add timestamp to the end\n\t\t\ts.url = ret + ((ret == s.url) ? (s.url.match(/\\?/) ? \"&\" : \"?\") + \"_=\" + ts : \"\");\n\t\t}\n\n\t\t// If data is available, append data to url for get requests\n\t\tif ( s.data && type == \"GET\" ) {\n\t\t\ts.url += (s.url.match(/\\?/) ? \"&\" : \"?\") + s.data;\n\n\t\t\t// IE likes to send both get and post data, prevent this\n\t\t\ts.data = null;\n\t\t}\n\n\t\t// Watch for a new set of requests\n\t\tif ( s.global && ! jQuery.active++ )\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\n\t\t// Matches an absolute URL, and saves the domain\n\t\tvar remote = /^(?:\\w+:)?\\/\\/([^\\/?#]+)/;\n\n\t\t// If we're requesting a remote document\n\t\t// and trying to load JSON or Script with a GET\n\t\tif ( s.dataType == \"script\" && type == \"GET\"\n\t\t\t\t&& remote.test(s.url) && remote.exec(s.url)[1] != location.host ){\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n\t\t\tvar script = document.createElement(\"script\");\n\t\t\tscript.src = s.url;\n\t\t\tif (s.scriptCharset)\n\t\t\t\tscript.charset = s.scriptCharset;\n\n\t\t\t// Handle Script loading\n\t\t\tif ( !jsonp ) {\n\t\t\t\tvar done = false;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function(){\n\t\t\t\t\tif ( !done && (!this.readyState ||\n\t\t\t\t\t\t\tthis.readyState == \"loaded\" || this.readyState == \"complete\") ) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tsuccess();\n\t\t\t\t\t\tcomplete();\n\t\t\t\t\t\thead.removeChild( script );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\thead.appendChild(script);\n\n\t\t\t// We handle everything using the script element injection\n\t\t\treturn undefined;\n\t\t}\n\n\t\tvar requestDone = false;\n\n\t\t// Create the request object; Microsoft failed to properly\n\t\t// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available\n\t\tvar xhr = window.ActiveXObject ? new ActiveXObject(\"Microsoft.XMLHTTP\") : new XMLHttpRequest();\n\n\t\t// Open the socket\n\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\tif( s.username )\n\t\t\txhr.open(type, s.url, s.async, s.username, s.password);\n\t\telse\n\t\t\txhr.open(type, s.url, s.async);\n\n\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\ttry {\n\t\t\t// Set the correct header, if data is being sent\n\t\t\tif ( s.data )\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", s.contentType);\n\n\t\t\t// Set the If-Modified-Since header, if ifModified mode.\n\t\t\tif ( s.ifModified )\n\t\t\t\txhr.setRequestHeader(\"If-Modified-Since\",\n\t\t\t\t\tjQuery.lastModified[s.url] || \"Thu, 01 Jan 1970 00:00:00 GMT\" );\n\n\t\t\t// Set header so the called script knows that it's an XMLHttpRequest\n\t\t\txhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\n\t\t\t// Set the Accepts header for the server, depending on the dataType\n\t\t\txhr.setRequestHeader(\"Accept\", s.dataType && s.accepts[ s.dataType ] ?\n\t\t\t\ts.accepts[ s.dataType ] + \", */*\" :\n\t\t\t\ts.accepts._default );\n\t\t} catch(e){}\n\n\t\t// Allow custom headers/mimetypes\n\t\tif ( s.beforeSend && s.beforeSend(xhr, s) === false ) {\n\t\t\t// cleanup active request counter\n\t\t\ts.global && jQuery.active--;\n\t\t\t// close opended socket\n\t\t\txhr.abort();\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( s.global )\n\t\t\tjQuery.event.trigger(\"ajaxSend\", [xhr, s]);\n\n\t\t// Wait for a response to come back\n\t\tvar onreadystatechange = function(isTimeout){\n\t\t\t// The transfer is complete and the data is available, or the request timed out\n\t\t\tif ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == \"timeout\") ) {\n\t\t\t\trequestDone = true;\n\n\t\t\t\t// clear poll interval\n\t\t\t\tif (ival) {\n\t\t\t\t\tclearInterval(ival);\n\t\t\t\t\tival = null;\n\t\t\t\t}\n\n\t\t\t\tstatus = isTimeout == \"timeout\" && \"timeout\" ||\n\t\t\t\t\t!jQuery.httpSuccess( xhr ) && \"error\" ||\n\t\t\t\t\ts.ifModified && jQuery.httpNotModified( xhr, s.url ) && \"notmodified\" ||\n\t\t\t\t\t\"success\";\n\n\t\t\t\tif ( status == \"success\" ) {\n\t\t\t\t\t// Watch for, and catch, XML document parse errors\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// process the data (runs the xml through httpData regardless of callback)\n\t\t\t\t\t\tdata = jQuery.httpData( xhr, s.dataType, s.dataFilter );\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\tstatus = \"parsererror\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Make sure that the request was successful or notmodified\n\t\t\t\tif ( status == \"success\" ) {\n\t\t\t\t\t// Cache Last-Modified header, if ifModified mode.\n\t\t\t\t\tvar modRes;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmodRes = xhr.getResponseHeader(\"Last-Modified\");\n\t\t\t\t\t} catch(e) {} // swallow exception thrown by FF if header is not available\n\n\t\t\t\t\tif ( s.ifModified && modRes )\n\t\t\t\t\t\tjQuery.lastModified[s.url] = modRes;\n\n\t\t\t\t\t// JSONP handles its own success callback\n\t\t\t\t\tif ( !jsonp )\n\t\t\t\t\t\tsuccess();\n\t\t\t\t} else\n\t\t\t\t\tjQuery.handleError(s, xhr, status);\n\n\t\t\t\t// Fire the complete handlers\n\t\t\t\tcomplete();\n\n\t\t\t\t// Stop memory leaks\n\t\t\t\tif ( s.async )\n\t\t\t\t\txhr = null;\n\t\t\t}\n\t\t};\n\n\t\tif ( s.async ) {\n\t\t\t// don't attach the handler to the request, just poll it instead\n\t\t\tvar ival = setInterval(onreadystatechange, 13);\n\n\t\t\t// Timeout checker\n\t\t\tif ( s.timeout > 0 )\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t// Check to see if the request is still happening\n\t\t\t\t\tif ( xhr ) {\n\t\t\t\t\t\t// Cancel the request\n\t\t\t\t\t\txhr.abort();\n\n\t\t\t\t\t\tif( !requestDone )\n\t\t\t\t\t\t\tonreadystatechange( \"timeout\" );\n\t\t\t\t\t}\n\t\t\t\t}, s.timeout);\n\t\t}\n\n\t\t// Send the data\n\t\ttry {\n\t\t\txhr.send(s.data);\n\t\t} catch(e) {\n\t\t\tjQuery.handleError(s, xhr, null, e);\n\t\t}\n\n\t\t// firefox 1.5 doesn't fire statechange for sync requests\n\t\tif ( !s.async )\n\t\t\tonreadystatechange();\n\n\t\tfunction success(){\n\t\t\t// If a local callback was specified, fire it and pass it the data\n\t\t\tif ( s.success )\n\t\t\t\ts.success( data, status );\n\n\t\t\t// Fire the global callback\n\t\t\tif ( s.global )\n\t\t\t\tjQuery.event.trigger( \"ajaxSuccess\", [xhr, s] );\n\t\t}\n\n\t\tfunction complete(){\n\t\t\t// Process result\n\t\t\tif ( s.complete )\n\t\t\t\ts.complete(xhr, status);\n\n\t\t\t// The request was completed\n\t\t\tif ( s.global )\n\t\t\t\tjQuery.event.trigger( \"ajaxComplete\", [xhr, s] );\n\n\t\t\t// Handle the global AJAX counter\n\t\t\tif ( s.global && ! --jQuery.active )\n\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t}\n\n\t\t// return XMLHttpRequest to allow aborting the request etc.\n\t\treturn xhr;\n\t},\n\n\thandleError: function( s, xhr, status, e ) {\n\t\t// If a local callback was specified, fire it\n\t\tif ( s.error ) s.error( xhr, status, e );\n\n\t\t// Fire the global callback\n\t\tif ( s.global )\n\t\t\tjQuery.event.trigger( \"ajaxError\", [xhr, s, e] );\n\t},\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Determines if an XMLHttpRequest was successful or not\n\thttpSuccess: function( xhr ) {\n\t\ttry {\n\t\t\t// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450\n\t\t\treturn !xhr.status && location.protocol == \"file:\" ||\n\t\t\t\t( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223 ||\n\t\t\t\tjQuery.browser.safari && xhr.status == undefined;\n\t\t} catch(e){}\n\t\treturn false;\n\t},\n\n\t// Determines if an XMLHttpRequest returns NotModified\n\thttpNotModified: function( xhr, url ) {\n\t\ttry {\n\t\t\tvar xhrRes = xhr.getResponseHeader(\"Last-Modified\");\n\n\t\t\t// Firefox always returns 200. check Last-Modified date\n\t\t\treturn xhr.status == 304 || xhrRes == jQuery.lastModified[url] ||\n\t\t\t\tjQuery.browser.safari && xhr.status == undefined;\n\t\t} catch(e){}\n\t\treturn false;\n\t},\n\n\thttpData: function( xhr, type, filter ) {\n\t\tvar ct = xhr.getResponseHeader(\"content-type\"),\n\t\t\txml = type == \"xml\" || !type && ct && ct.indexOf(\"xml\") >= 0,\n\t\t\tdata = xml ? xhr.responseXML : xhr.responseText;\n\n\t\tif ( xml && data.documentElement.tagName == \"parsererror\" )\n\t\t\tthrow \"parsererror\";\n\t\t\t\n\t\t// Allow a pre-filtering function to sanitize the response\n\t\tif( filter )\n\t\t\tdata = filter( data, type );\n\n\t\t// If the type is \"script\", eval it in global context\n\t\tif ( type == \"script\" )\n\t\t\tjQuery.globalEval( data );\n\n\t\t// Get the JavaScript object, if JSON is used.\n\t\tif ( type == \"json\" )\n\t\t\tdata = eval(\"(\" + data + \")\");\n\n\t\treturn data;\n\t},\n\n\t// Serialize an array of form elements or a set of\n\t// key/values into a query string\n\tparam: function( a ) {\n\t\tvar s = [];\n\n\t\t// If an array was passed in, assume that it is an array\n\t\t// of form elements\n\t\tif ( a.constructor == Array || a.jquery )\n\t\t\t// Serialize the form elements\n\t\t\tjQuery.each( a, function(){\n\t\t\t\ts.push( encodeURIComponent(this.name) + \"=\" + encodeURIComponent( this.value ) );\n\t\t\t});\n\n\t\t// Otherwise, assume that it's an object of key/value pairs\n\t\telse\n\t\t\t// Serialize the key/values\n\t\t\tfor ( var j in a )\n\t\t\t\t// If the value is an array then the key names need to be repeated\n\t\t\t\tif ( a[j] && a[j].constructor == Array )\n\t\t\t\t\tjQuery.each( a[j], function(){\n\t\t\t\t\t\ts.push( encodeURIComponent(j) + \"=\" + encodeURIComponent( this ) );\n\t\t\t\t\t});\n\t\t\t\telse\n\t\t\t\t\ts.push( encodeURIComponent(j) + \"=\" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );\n\n\t\t// Return the resulting serialization\n\t\treturn s.join(\"&\").replace(/%20/g, \"+\");\n\t}\n\n});\njQuery.fn.extend({\n\tshow: function(speed,callback){\n\t\treturn speed ?\n\t\t\tthis.animate({\n\t\t\t\theight: \"show\", width: \"show\", opacity: \"show\"\n\t\t\t}, speed, callback) :\n\n\t\t\tthis.filter(\":hidden\").each(function(){\n\t\t\t\tthis.style.display = this.oldblock || \"\";\n\t\t\t\tif ( jQuery.css(this,\"display\") == \"none\" ) {\n\t\t\t\t\tvar elem = jQuery(\"<\" + this.tagName + \" />\").appendTo(\"body\");\n\t\t\t\t\tthis.style.display = elem.css(\"display\");\n\t\t\t\t\t// handle an edge condition where css is - div { display:none; } or similar\n\t\t\t\t\tif (this.style.display == \"none\")\n\t\t\t\t\t\tthis.style.display = \"block\";\n\t\t\t\t\telem.remove();\n\t\t\t\t}\n\t\t\t}).end();\n\t},\n\n\thide: function(speed,callback){\n\t\treturn speed ?\n\t\t\tthis.animate({\n\t\t\t\theight: \"hide\", width: \"hide\", opacity: \"hide\"\n\t\t\t}, speed, callback) :\n\n\t\t\tthis.filter(\":visible\").each(function(){\n\t\t\t\tthis.oldblock = this.oldblock || jQuery.css(this,\"display\");\n\t\t\t\tthis.style.display = \"none\";\n\t\t\t}).end();\n\t},\n\n\t// Save the old toggle function\n\t_toggle: jQuery.fn.toggle,\n\n\ttoggle: function( fn, fn2 ){\n\t\treturn jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?\n\t\t\tthis._toggle.apply( this, arguments ) :\n\t\t\tfn ?\n\t\t\t\tthis.animate({\n\t\t\t\t\theight: \"toggle\", width: \"toggle\", opacity: \"toggle\"\n\t\t\t\t}, fn, fn2) :\n\t\t\t\tthis.each(function(){\n\t\t\t\t\tjQuery(this)[ jQuery(this).is(\":hidden\") ? \"show\" : \"hide\" ]();\n\t\t\t\t});\n\t},\n\n\tslideDown: function(speed,callback){\n\t\treturn this.animate({height: \"show\"}, speed, callback);\n\t},\n\n\tslideUp: function(speed,callback){\n\t\treturn this.animate({height: \"hide\"}, speed, callback);\n\t},\n\n\tslideToggle: function(speed, callback){\n\t\treturn this.animate({height: \"toggle\"}, speed, callback);\n\t},\n\n\tfadeIn: function(speed, callback){\n\t\treturn this.animate({opacity: \"show\"}, speed, callback);\n\t},\n\n\tfadeOut: function(speed, callback){\n\t\treturn this.animate({opacity: \"hide\"}, speed, callback);\n\t},\n\n\tfadeTo: function(speed,to,callback){\n\t\treturn this.animate({opacity: to}, speed, callback);\n\t},\n\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar optall = jQuery.speed(speed, easing, callback);\n\n\t\treturn this[ optall.queue === false ? \"each\" : \"queue\" ](function(){\n\t\t\tif ( this.nodeType != 1)\n\t\t\t\treturn false;\n\n\t\t\tvar opt = jQuery.extend({}, optall), p,\n\t\t\t\thidden = jQuery(this).is(\":hidden\"), self = this;\n\n\t\t\tfor ( p in prop ) {\n\t\t\t\tif ( prop[p] == \"hide\" && hidden || prop[p] == \"show\" && !hidden )\n\t\t\t\t\treturn opt.complete.call(this);\n\n\t\t\t\tif ( p == \"height\" || p == \"width\" ) {\n\t\t\t\t\t// Store display property\n\t\t\t\t\topt.display = jQuery.css(this, \"display\");\n\n\t\t\t\t\t// Make sure that nothing sneaks out\n\t\t\t\t\topt.overflow = this.style.overflow;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( opt.overflow != null )\n\t\t\t\tthis.style.overflow = \"hidden\";\n\n\t\t\topt.curAnim = jQuery.extend({}, prop);\n\n\t\t\tjQuery.each( prop, function(name, val){\n\t\t\t\tvar e = new jQuery.fx( self, opt, name );\n\n\t\t\t\tif ( /toggle|show|hide/.test(val) )\n\t\t\t\t\te[ val == \"toggle\" ? hidden ? \"show\" : \"hide\" : val ]( prop );\n\t\t\t\telse {\n\t\t\t\t\tvar parts = val.toString().match(/^([+-]=)?([\\d+-.]+)(.*)$/),\n\t\t\t\t\t\tstart = e.cur(true) || 0;\n\n\t\t\t\t\tif ( parts ) {\n\t\t\t\t\t\tvar end = parseFloat(parts[2]),\n\t\t\t\t\t\t\tunit = parts[3] || \"px\";\n\n\t\t\t\t\t\t// We need to compute starting value\n\t\t\t\t\t\tif ( unit != \"px\" ) {\n\t\t\t\t\t\t\tself.style[ name ] = (end || 1) + unit;\n\t\t\t\t\t\t\tstart = ((end || 1) / e.cur(true)) * start;\n\t\t\t\t\t\t\tself.style[ name ] = start + unit;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\t\t\tif ( parts[1] )\n\t\t\t\t\t\t\tend = ((parts[1] == \"-=\" ? -1 : 1) * end) + start;\n\n\t\t\t\t\t\te.custom( start, end, unit );\n\t\t\t\t\t} else\n\t\t\t\t\t\te.custom( start, val, \"\" );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// For JS strict compliance\n\t\t\treturn true;\n\t\t});\n\t},\n\n\tqueue: function(type, fn){\n\t\tif ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {\n\t\t\tfn = type;\n\t\t\ttype = \"fx\";\n\t\t}\n\n\t\tif ( !type || (typeof type == \"string\" && !fn) )\n\t\t\treturn queue( this[0], type );\n\n\t\treturn this.each(function(){\n\t\t\tif ( fn.constructor == Array )\n\t\t\t\tqueue(this, type, fn);\n\t\t\telse {\n\t\t\t\tqueue(this, type).push( fn );\n\n\t\t\t\tif ( queue(this, type).length == 1 )\n\t\t\t\t\tfn.call(this);\n\t\t\t}\n\t\t});\n\t},\n\n\tstop: function(clearQueue, gotoEnd){\n\t\tvar timers = jQuery.timers;\n\n\t\tif (clearQueue)\n\t\t\tthis.queue([]);\n\n\t\tthis.each(function(){\n\t\t\t// go in reverse order so anything added to the queue during the loop is ignored\n\t\t\tfor ( var i = timers.length - 1; i >= 0; i-- )\n\t\t\t\tif ( timers[i].elem == this ) {\n\t\t\t\t\tif (gotoEnd)\n\t\t\t\t\t\t// force the next step to be the last\n\t\t\t\t\t\ttimers[i](true);\n\t\t\t\t\ttimers.splice(i, 1);\n\t\t\t\t}\n\t\t});\n\n\t\t// start the next in the queue if the last step wasn't forced\n\t\tif (!gotoEnd)\n\t\t\tthis.dequeue();\n\n\t\treturn this;\n\t}\n\n});\n\nvar queue = function( elem, type, array ) {\n\tif ( elem ){\n\n\t\ttype = type || \"fx\";\n\n\t\tvar q = jQuery.data( elem, type + \"queue\" );\n\n\t\tif ( !q || array )\n\t\t\tq = jQuery.data( elem, type + \"queue\", jQuery.makeArray(array) );\n\n\t}\n\treturn q;\n};\n\njQuery.fn.dequeue = function(type){\n\ttype = type || \"fx\";\n\n\treturn this.each(function(){\n\t\tvar q = queue(this, type);\n\n\t\tq.shift();\n\n\t\tif ( q.length )\n\t\t\tq[0].call( this );\n\t});\n};\n\njQuery.extend({\n\n\tspeed: function(speed, easing, fn) {\n\t\tvar opt = speed && speed.constructor == Object ? speed : {\n\t\t\tcomplete: fn || !fn && easing ||\n\t\t\t\tjQuery.isFunction( speed ) && speed,\n\t\t\tduration: speed,\n\t\t\teasing: fn && easing || easing && easing.constructor != Function && easing\n\t\t};\n\n\t\topt.duration = (opt.duration && opt.duration.constructor == Number ?\n\t\t\topt.duration :\n\t\t\tjQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def;\n\n\t\t// Queueing\n\t\topt.old = opt.complete;\n\t\topt.complete = function(){\n\t\t\tif ( opt.queue !== false )\n\t\t\t\tjQuery(this).dequeue();\n\t\t\tif ( jQuery.isFunction( opt.old ) )\n\t\t\t\topt.old.call( this );\n\t\t};\n\n\t\treturn opt;\n\t},\n\n\teasing: {\n\t\tlinear: function( p, n, firstNum, diff ) {\n\t\t\treturn firstNum + diff * p;\n\t\t},\n\t\tswing: function( p, n, firstNum, diff ) {\n\t\t\treturn ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;\n\t\t}\n\t},\n\n\ttimers: [],\n\ttimerId: null,\n\n\tfx: function( elem, options, prop ){\n\t\tthis.options = options;\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\n\t\tif ( !options.orig )\n\t\t\toptions.orig = {};\n\t}\n\n});\n\njQuery.fx.prototype = {\n\n\t// Simple function for setting a style value\n\tupdate: function(){\n\t\tif ( this.options.step )\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\n\t\t(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );\n\n\t\t// Set display property to block for height/width animations\n\t\tif ( this.prop == \"height\" || this.prop == \"width\" )\n\t\t\tthis.elem.style.display = \"block\";\n\t},\n\n\t// Get the current size\n\tcur: function(force){\n\t\tif ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )\n\t\t\treturn this.elem[ this.prop ];\n\n\t\tvar r = parseFloat(jQuery.css(this.elem, this.prop, force));\n\t\treturn r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;\n\t},\n\n\t// Start an animation from one number to another\n\tcustom: function(from, to, unit){\n\t\tthis.startTime = now();\n\t\tthis.start = from;\n\t\tthis.end = to;\n\t\tthis.unit = unit || this.unit || \"px\";\n\t\tthis.now = this.start;\n\t\tthis.pos = this.state = 0;\n\t\tthis.update();\n\n\t\tvar self = this;\n\t\tfunction t(gotoEnd){\n\t\t\treturn self.step(gotoEnd);\n\t\t}\n\n\t\tt.elem = this.elem;\n\n\t\tjQuery.timers.push(t);\n\n\t\tif ( jQuery.timerId == null ) {\n\t\t\tjQuery.timerId = setInterval(function(){\n\t\t\t\tvar timers = jQuery.timers;\n\n\t\t\t\tfor ( var i = 0; i < timers.length; i++ )\n\t\t\t\t\tif ( !timers[i]() )\n\t\t\t\t\t\ttimers.splice(i--, 1);\n\n\t\t\t\tif ( !timers.length ) {\n\t\t\t\t\tclearInterval( jQuery.timerId );\n\t\t\t\t\tjQuery.timerId = null;\n\t\t\t\t}\n\t\t\t}, 13);\n\t\t}\n\t},\n\n\t// Simple 'show' function\n\tshow: function(){\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );\n\t\tthis.options.show = true;\n\n\t\t// Begin the animation\n\t\tthis.custom(0, this.cur());\n\n\t\t// Make sure that we start at a small width/height to avoid any\n\t\t// flash of content\n\t\tif ( this.prop == \"width\" || this.prop == \"height\" )\n\t\t\tthis.elem.style[this.prop] = \"1px\";\n\n\t\t// Start by showing the element\n\t\tjQuery(this.elem).show();\n\t},\n\n\t// Simple 'hide' function\n\thide: function(){\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );\n\t\tthis.options.hide = true;\n\n\t\t// Begin the animation\n\t\tthis.custom(this.cur(), 0);\n\t},\n\n\t// Each step of an animation\n\tstep: function(gotoEnd){\n\t\tvar t = now();\n\n\t\tif ( gotoEnd || t > this.options.duration + this.startTime ) {\n\t\t\tthis.now = this.end;\n\t\t\tthis.pos = this.state = 1;\n\t\t\tthis.update();\n\n\t\t\tthis.options.curAnim[ this.prop ] = true;\n\n\t\t\tvar done = true;\n\t\t\tfor ( var i in this.options.curAnim )\n\t\t\t\tif ( this.options.curAnim[i] !== true )\n\t\t\t\t\tdone = false;\n\n\t\t\tif ( done ) {\n\t\t\t\tif ( this.options.display != null ) {\n\t\t\t\t\t// Reset the overflow\n\t\t\t\t\tthis.elem.style.overflow = this.options.overflow;\n\n\t\t\t\t\t// Reset the display\n\t\t\t\t\tthis.elem.style.display = this.options.display;\n\t\t\t\t\tif ( jQuery.css(this.elem, \"display\") == \"none\" )\n\t\t\t\t\t\tthis.elem.style.display = \"block\";\n\t\t\t\t}\n\n\t\t\t\t// Hide the element if the \"hide\" operation was done\n\t\t\t\tif ( this.options.hide )\n\t\t\t\t\tthis.elem.style.display = \"none\";\n\n\t\t\t\t// Reset the properties, if the item has been hidden or shown\n\t\t\t\tif ( this.options.hide || this.options.show )\n\t\t\t\t\tfor ( var p in this.options.curAnim )\n\t\t\t\t\t\tjQuery.attr(this.elem.style, p, this.options.orig[p]);\n\t\t\t}\n\n\t\t\tif ( done )\n\t\t\t\t// Execute the complete function\n\t\t\t\tthis.options.complete.call( this.elem );\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\tvar n = t - this.startTime;\n\t\t\tthis.state = n / this.options.duration;\n\n\t\t\t// Perform the easing function, defaults to swing\n\t\t\tthis.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? \"swing\" : \"linear\")](this.state, n, 0, 1, this.options.duration);\n\t\t\tthis.now = this.start + ((this.end - this.start) * this.pos);\n\n\t\t\t// Perform the next step of the animation\n\t\t\tthis.update();\n\t\t}\n\n\t\treturn true;\n\t}\n\n};\n\njQuery.extend( jQuery.fx, {\n\tspeeds:{\n\t\tslow: 600,\n \t\tfast: 200,\n \t\t// Default speed\n \t\tdef: 400\n\t},\n\tstep: {\n\t\tscrollLeft: function(fx){\n\t\t\tfx.elem.scrollLeft = fx.now;\n\t\t},\n\n\t\tscrollTop: function(fx){\n\t\t\tfx.elem.scrollTop = fx.now;\n\t\t},\n\n\t\topacity: function(fx){\n\t\t\tjQuery.attr(fx.elem.style, \"opacity\", fx.now);\n\t\t},\n\n\t\t_default: function(fx){\n\t\t\tfx.elem.style[ fx.prop ] = fx.now + fx.unit;\n\t\t}\n\t}\n});\n// The Offset Method\n// Originally By Brandon Aaron, part of the Dimension Plugin\n// http://jquery.com/plugins/project/dimensions\njQuery.fn.offset = function() {\n\tvar left = 0, top = 0, elem = this[0], results;\n\n\tif ( elem ) with ( jQuery.browser ) {\n\t\tvar parent       = elem.parentNode,\n\t\t    offsetChild  = elem,\n\t\t    offsetParent = elem.offsetParent,\n\t\t    doc          = elem.ownerDocument,\n\t\t    safari2      = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent),\n\t\t    css          = jQuery.curCSS,\n\t\t    fixed        = css(elem, \"position\") == \"fixed\";\n\n\t\t// Use getBoundingClientRect if available\n\t\tif ( elem.getBoundingClientRect ) {\n\t\t\tvar box = elem.getBoundingClientRect();\n\n\t\t\t// Add the document scroll offsets\n\t\t\tadd(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),\n\t\t\t\tbox.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop));\n\n\t\t\t// IE adds the HTML element's border, by default it is medium which is 2px\n\t\t\t// IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; }\n\t\t\t// IE 7 standards mode, the border is always 2px\n\t\t\t// This border/offset is typically represented by the clientLeft and clientTop properties\n\t\t\t// However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS\n\t\t\t// Therefore this method will be off by 2px in IE while in quirksmode\n\t\t\tadd( -doc.documentElement.clientLeft, -doc.documentElement.clientTop );\n\n\t\t// Otherwise loop through the offsetParents and parentNodes\n\t\t} else {\n\n\t\t\t// Initial element offsets\n\t\t\tadd( elem.offsetLeft, elem.offsetTop );\n\n\t\t\t// Get parent offsets\n\t\t\twhile ( offsetParent ) {\n\t\t\t\t// Add offsetParent offsets\n\t\t\t\tadd( offsetParent.offsetLeft, offsetParent.offsetTop );\n\n\t\t\t\t// Mozilla and Safari > 2 does not include the border on offset parents\n\t\t\t\t// However Mozilla adds the border for table or table cells\n\t\t\t\tif ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 )\n\t\t\t\t\tborder( offsetParent );\n\n\t\t\t\t// Add the document scroll offsets if position is fixed on any offsetParent\n\t\t\t\tif ( !fixed && css(offsetParent, \"position\") == \"fixed\" )\n\t\t\t\t\tfixed = true;\n\n\t\t\t\t// Set offsetChild to previous offsetParent unless it is the body element\n\t\t\t\toffsetChild  = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent;\n\t\t\t\t// Get next offsetParent\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\t// Get parent scroll offsets\n\t\t\twhile ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) {\n\t\t\t\t// Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug\n\t\t\t\tif ( !/^inline|table.*$/i.test(css(parent, \"display\")) )\n\t\t\t\t\t// Subtract parent scroll offsets\n\t\t\t\t\tadd( -parent.scrollLeft, -parent.scrollTop );\n\n\t\t\t\t// Mozilla does not add the border for a parent that has overflow != visible\n\t\t\t\tif ( mozilla && css(parent, \"overflow\") != \"visible\" )\n\t\t\t\t\tborder( parent );\n\n\t\t\t\t// Get next parent\n\t\t\t\tparent = parent.parentNode;\n\t\t\t}\n\n\t\t\t// Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild\n\t\t\t// Mozilla doubles body offsets with a non-absolutely positioned offsetChild\n\t\t\tif ( (safari2 && (fixed || css(offsetChild, \"position\") == \"absolute\")) ||\n\t\t\t\t(mozilla && css(offsetChild, \"position\") != \"absolute\") )\n\t\t\t\t\tadd( -doc.body.offsetLeft, -doc.body.offsetTop );\n\n\t\t\t// Add the document scroll offsets if position is fixed\n\t\t\tif ( fixed )\n\t\t\t\tadd(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),\n\t\t\t\t\tMath.max(doc.documentElement.scrollTop,  doc.body.scrollTop));\n\t\t}\n\n\t\t// Return an object with top and left properties\n\t\tresults = { top: top, left: left };\n\t}\n\n\tfunction border(elem) {\n\t\tadd( jQuery.curCSS(elem, \"borderLeftWidth\", true), jQuery.curCSS(elem, \"borderTopWidth\", true) );\n\t}\n\n\tfunction add(l, t) {\n\t\tleft += parseInt(l, 10) || 0;\n\t\ttop += parseInt(t, 10) || 0;\n\t}\n\n\treturn results;\n};\n\n\njQuery.fn.extend({\n\tposition: function() {\n\t\tvar left = 0, top = 0, results;\n\n\t\tif ( this[0] ) {\n\t\t\t// Get *real* offsetParent\n\t\t\tvar offsetParent = this.offsetParent(),\n\n\t\t\t// Get correct offsets\n\t\t\toffset       = this.offset(),\n\t\t\tparentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();\n\n\t\t\t// Subtract element margins\n\t\t\t// note: when an element has margin: auto the offsetLeft and marginLeft \n\t\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\t\toffset.top  -= num( this, 'marginTop' );\n\t\t\toffset.left -= num( this, 'marginLeft' );\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top  += num( offsetParent, 'borderTopWidth' );\n\t\t\tparentOffset.left += num( offsetParent, 'borderLeftWidth' );\n\n\t\t\t// Subtract the two offsets\n\t\t\tresults = {\n\t\t\t\ttop:  offset.top  - parentOffset.top,\n\t\t\t\tleft: offset.left - parentOffset.left\n\t\t\t};\n\t\t}\n\n\t\treturn results;\n\t},\n\n\toffsetParent: function() {\n\t\tvar offsetParent = this[0].offsetParent;\n\t\twhile ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )\n\t\t\toffsetParent = offsetParent.offsetParent;\n\t\treturn jQuery(offsetParent);\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( ['Left', 'Top'], function(i, name) {\n\tvar method = 'scroll' + name;\n\t\n\tjQuery.fn[ method ] = function(val) {\n\t\tif (!this[0]) return;\n\n\t\treturn val != undefined ?\n\n\t\t\t// Set the scroll offset\n\t\t\tthis.each(function() {\n\t\t\t\tthis == window || this == document ?\n\t\t\t\t\twindow.scrollTo(\n\t\t\t\t\t\t!i ? val : jQuery(window).scrollLeft(),\n\t\t\t\t\t\t i ? val : jQuery(window).scrollTop()\n\t\t\t\t\t) :\n\t\t\t\t\tthis[ method ] = val;\n\t\t\t}) :\n\n\t\t\t// Return the scroll offset\n\t\t\tthis[0] == window || this[0] == document ?\n\t\t\t\tself[ i ? 'pageYOffset' : 'pageXOffset' ] ||\n\t\t\t\t\tjQuery.boxModel && document.documentElement[ method ] ||\n\t\t\t\t\tdocument.body[ method ] :\n\t\t\t\tthis[0][ method ];\n\t};\n});\n// Create innerHeight, innerWidth, outerHeight and outerWidth methods\njQuery.each([ \"Height\", \"Width\" ], function(i, name){\n\n\tvar tl = i ? \"Left\"  : \"Top\",  // top or left\n\t\tbr = i ? \"Right\" : \"Bottom\"; // bottom or right\n\n\t// innerHeight and innerWidth\n\tjQuery.fn[\"inner\" + name] = function(){\n\t\treturn this[ name.toLowerCase() ]() +\n\t\t\tnum(this, \"padding\" + tl) +\n\t\t\tnum(this, \"padding\" + br);\n\t};\n\n\t// outerHeight and outerWidth\n\tjQuery.fn[\"outer\" + name] = function(margin) {\n\t\treturn this[\"inner\" + name]() +\n\t\t\tnum(this, \"border\" + tl + \"Width\") +\n\t\t\tnum(this, \"border\" + br + \"Width\") +\n\t\t\t(margin ?\n\t\t\t\tnum(this, \"margin\" + tl) + num(this, \"margin\" + br) : 0);\n\t};\n\n});})();\n"
  },
  {
    "path": "example/media/js/mootools.js",
    "content": "/*\n---\n\nscript: Core.js\n\ndescription: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts.\n\nlicense: MIT-style license.\n\ncopyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/).\n\nauthors: The MooTools production team (http://mootools.net/developers/)\n\ninspiration:\n- Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php)\n- Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php)\n\nprovides: [Mootools, Native, Hash.base, Array.each, $util]\n\n...\n*/\n\nvar MooTools = {\n\t'version': '1.2.4',\n\t'build': '0d9113241a90b9cd5643b926795852a2026710d4'\n};\n\nvar Native = function(options){\n\toptions = options || {};\n\tvar name = options.name;\n\tvar legacy = options.legacy;\n\tvar protect = options.protect;\n\tvar methods = options.implement;\n\tvar generics = options.generics;\n\tvar initialize = options.initialize;\n\tvar afterImplement = options.afterImplement || function(){};\n\tvar object = initialize || legacy;\n\tgenerics = generics !== false;\n\n\tobject.constructor = Native;\n\tobject.$family = {name: 'native'};\n\tif (legacy && initialize) object.prototype = legacy.prototype;\n\tobject.prototype.constructor = object;\n\n\tif (name){\n\t\tvar family = name.toLowerCase();\n\t\tobject.prototype.$family = {name: family};\n\t\tNative.typize(object, family);\n\t}\n\n\tvar add = function(obj, name, method, force){\n\t\tif (!protect || force || !obj.prototype[name]) obj.prototype[name] = method;\n\t\tif (generics) Native.genericize(obj, name, protect);\n\t\tafterImplement.call(obj, name, method);\n\t\treturn obj;\n\t};\n\n\tobject.alias = function(a1, a2, a3){\n\t\tif (typeof a1 == 'string'){\n\t\t\tvar pa1 = this.prototype[a1];\n\t\t\tif ((a1 = pa1)) return add(this, a2, a1, a3);\n\t\t}\n\t\tfor (var a in a1) this.alias(a, a1[a], a2);\n\t\treturn this;\n\t};\n\n\tobject.implement = function(a1, a2, a3){\n\t\tif (typeof a1 == 'string') return add(this, a1, a2, a3);\n\t\tfor (var p in a1) add(this, p, a1[p], a2);\n\t\treturn this;\n\t};\n\n\tif (methods) object.implement(methods);\n\n\treturn object;\n};\n\nNative.genericize = function(object, property, check){\n\tif ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\treturn object.prototype[property].apply(args.shift(), args);\n\t};\n};\n\nNative.implement = function(objects, properties){\n\tfor (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties);\n};\n\nNative.typize = function(object, family){\n\tif (!object.type) object.type = function(item){\n\t\treturn ($type(item) === family);\n\t};\n};\n\n(function(){\n\tvar natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String};\n\tfor (var n in natives) new Native({name: n, initialize: natives[n], protect: true});\n\n\tvar types = {'boolean': Boolean, 'native': Native, 'object': Object};\n\tfor (var t in types) Native.typize(types[t], t);\n\n\tvar generics = {\n\t\t'Array': [\"concat\", \"indexOf\", \"join\", \"lastIndexOf\", \"pop\", \"push\", \"reverse\", \"shift\", \"slice\", \"sort\", \"splice\", \"toString\", \"unshift\", \"valueOf\"],\n\t\t'String': [\"charAt\", \"charCodeAt\", \"concat\", \"indexOf\", \"lastIndexOf\", \"match\", \"replace\", \"search\", \"slice\", \"split\", \"substr\", \"substring\", \"toLowerCase\", \"toUpperCase\", \"valueOf\"]\n\t};\n\tfor (var g in generics){\n\t\tfor (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true);\n\t}\n})();\n\nvar Hash = new Native({\n\n\tname: 'Hash',\n\n\tinitialize: function(object){\n\t\tif ($type(object) == 'hash') object = $unlink(object.getClean());\n\t\tfor (var key in object) this[key] = object[key];\n\t\treturn this;\n\t}\n\n});\n\nHash.implement({\n\n\tforEach: function(fn, bind){\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this);\n\t\t}\n\t},\n\n\tgetClean: function(){\n\t\tvar clean = {};\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key)) clean[key] = this[key];\n\t\t}\n\t\treturn clean;\n\t},\n\n\tgetLength: function(){\n\t\tvar length = 0;\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key)) length++;\n\t\t}\n\t\treturn length;\n\t}\n\n});\n\nHash.alias('forEach', 'each');\n\nArray.implement({\n\n\tforEach: function(fn, bind){\n\t\tfor (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this);\n\t}\n\n});\n\nArray.alias('forEach', 'each');\n\nfunction $A(iterable){\n\tif (iterable.item){\n\t\tvar l = iterable.length, array = new Array(l);\n\t\twhile (l--) array[l] = iterable[l];\n\t\treturn array;\n\t}\n\treturn Array.prototype.slice.call(iterable);\n};\n\nfunction $arguments(i){\n\treturn function(){\n\t\treturn arguments[i];\n\t};\n};\n\nfunction $chk(obj){\n\treturn !!(obj || obj === 0);\n};\n\nfunction $clear(timer){\n\tclearTimeout(timer);\n\tclearInterval(timer);\n\treturn null;\n};\n\nfunction $defined(obj){\n\treturn (obj != undefined);\n};\n\nfunction $each(iterable, fn, bind){\n\tvar type = $type(iterable);\n\t((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind);\n};\n\nfunction $empty(){};\n\nfunction $extend(original, extended){\n\tfor (var key in (extended || {})) original[key] = extended[key];\n\treturn original;\n};\n\nfunction $H(object){\n\treturn new Hash(object);\n};\n\nfunction $lambda(value){\n\treturn ($type(value) == 'function') ? value : function(){\n\t\treturn value;\n\t};\n};\n\nfunction $merge(){\n\tvar args = Array.slice(arguments);\n\targs.unshift({});\n\treturn $mixin.apply(null, args);\n};\n\nfunction $mixin(mix){\n\tfor (var i = 1, l = arguments.length; i < l; i++){\n\t\tvar object = arguments[i];\n\t\tif ($type(object) != 'object') continue;\n\t\tfor (var key in object){\n\t\t\tvar op = object[key], mp = mix[key];\n\t\t\tmix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op);\n\t\t}\n\t}\n\treturn mix;\n};\n\nfunction $pick(){\n\tfor (var i = 0, l = arguments.length; i < l; i++){\n\t\tif (arguments[i] != undefined) return arguments[i];\n\t}\n\treturn null;\n};\n\nfunction $random(min, max){\n\treturn Math.floor(Math.random() * (max - min + 1) + min);\n};\n\nfunction $splat(obj){\n\tvar type = $type(obj);\n\treturn (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : [];\n};\n\nvar $time = Date.now || function(){\n\treturn +new Date;\n};\n\nfunction $try(){\n\tfor (var i = 0, l = arguments.length; i < l; i++){\n\t\ttry {\n\t\t\treturn arguments[i]();\n\t\t} catch(e){}\n\t}\n\treturn null;\n};\n\nfunction $type(obj){\n\tif (obj == undefined) return false;\n\tif (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name;\n\tif (obj.nodeName){\n\t\tswitch (obj.nodeType){\n\t\t\tcase 1: return 'element';\n\t\t\tcase 3: return (/\\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace';\n\t\t}\n\t} else if (typeof obj.length == 'number'){\n\t\tif (obj.callee) return 'arguments';\n\t\telse if (obj.item) return 'collection';\n\t}\n\treturn typeof obj;\n};\n\nfunction $unlink(object){\n\tvar unlinked;\n\tswitch ($type(object)){\n\t\tcase 'object':\n\t\t\tunlinked = {};\n\t\t\tfor (var p in object) unlinked[p] = $unlink(object[p]);\n\t\tbreak;\n\t\tcase 'hash':\n\t\t\tunlinked = new Hash(object);\n\t\tbreak;\n\t\tcase 'array':\n\t\t\tunlinked = [];\n\t\t\tfor (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]);\n\t\tbreak;\n\t\tdefault: return object;\n\t}\n\treturn unlinked;\n};\n\n\n/*\n---\n\nscript: Browser.js\n\ndescription: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash.\n\nlicense: MIT-style license.\n\nrequires: \n- /Native\n- /$util\n\nprovides: [Browser, Window, Document, $exec]\n\n...\n*/\n\nvar Browser = $merge({\n\n\tEngine: {name: 'unknown', version: 0},\n\n\tPlatform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()},\n\n\tFeatures: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)},\n\n\tPlugins: {},\n\n\tEngines: {\n\n\t\tpresto: function(){\n\t\t\treturn (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925));\n\t\t},\n\n\t\ttrident: function(){\n\t\t\treturn (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4);\n\t\t},\n\n\t\twebkit: function(){\n\t\t\treturn (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419);\n\t\t},\n\n\t\tgecko: function(){\n\t\t\treturn (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18);\n\t\t}\n\n\t}\n\n}, Browser || {});\n\nBrowser.Platform[Browser.Platform.name] = true;\n\nBrowser.detect = function(){\n\n\tfor (var engine in this.Engines){\n\t\tvar version = this.Engines[engine]();\n\t\tif (version){\n\t\t\tthis.Engine = {name: engine, version: version};\n\t\t\tthis.Engine[engine] = this.Engine[engine + version] = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn {name: engine, version: version};\n\n};\n\nBrowser.detect();\n\nBrowser.Request = function(){\n\treturn $try(function(){\n\t\treturn new XMLHttpRequest();\n\t}, function(){\n\t\treturn new ActiveXObject('MSXML2.XMLHTTP');\n\t}, function(){\n\t\treturn new ActiveXObject('Microsoft.XMLHTTP');\n\t});\n};\n\nBrowser.Features.xhr = !!(Browser.Request());\n\nBrowser.Plugins.Flash = (function(){\n\tvar version = ($try(function(){\n\t\treturn navigator.plugins['Shockwave Flash'].description;\n\t}, function(){\n\t\treturn new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');\n\t}) || '0 r0').match(/\\d+/g);\n\treturn {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0};\n})();\n\nfunction $exec(text){\n\tif (!text) return text;\n\tif (window.execScript){\n\t\twindow.execScript(text);\n\t} else {\n\t\tvar script = document.createElement('script');\n\t\tscript.setAttribute('type', 'text/javascript');\n\t\tscript[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text;\n\t\tdocument.head.appendChild(script);\n\t\tdocument.head.removeChild(script);\n\t}\n\treturn text;\n};\n\nNative.UID = 1;\n\nvar $uid = (Browser.Engine.trident) ? function(item){\n\treturn (item.uid || (item.uid = [Native.UID++]))[0];\n} : function(item){\n\treturn item.uid || (item.uid = Native.UID++);\n};\n\nvar Window = new Native({\n\n\tname: 'Window',\n\n\tlegacy: (Browser.Engine.trident) ? null: window.Window,\n\n\tinitialize: function(win){\n\t\t$uid(win);\n\t\tif (!win.Element){\n\t\t\twin.Element = $empty;\n\t\t\tif (Browser.Engine.webkit) win.document.createElement(\"iframe\"); //fixes safari 2\n\t\t\twin.Element.prototype = (Browser.Engine.webkit) ? window[\"[[DOMElement.prototype]]\"] : {};\n\t\t}\n\t\twin.document.window = win;\n\t\treturn $extend(win, Window.Prototype);\n\t},\n\n\tafterImplement: function(property, value){\n\t\twindow[property] = Window.Prototype[property] = value;\n\t}\n\n});\n\nWindow.Prototype = {$family: {name: 'window'}};\n\nnew Window(window);\n\nvar Document = new Native({\n\n\tname: 'Document',\n\n\tlegacy: (Browser.Engine.trident) ? null: window.Document,\n\n\tinitialize: function(doc){\n\t\t$uid(doc);\n\t\tdoc.head = doc.getElementsByTagName('head')[0];\n\t\tdoc.html = doc.getElementsByTagName('html')[0];\n\t\tif (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){\n\t\t\tdoc.execCommand(\"BackgroundImageCache\", false, true);\n\t\t});\n\t\tif (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){\n\t\t\tdoc.window.detachEvent('onunload', arguments.callee);\n\t\t\tdoc.head = doc.html = doc.window = null;\n\t\t});\n\t\treturn $extend(doc, Document.Prototype);\n\t},\n\n\tafterImplement: function(property, value){\n\t\tdocument[property] = Document.Prototype[property] = value;\n\t}\n\n});\n\nDocument.Prototype = {$family: {name: 'document'}};\n\nnew Document(document);\n\n\n/*\n---\n\nscript: Array.js\n\ndescription: Contains Array Prototypes like each, contains, and erase.\n\nlicense: MIT-style license.\n\nrequires:\n- /$util\n- /Array.each\n\nprovides: [Array]\n\n...\n*/\n\nArray.implement({\n\n\tevery: function(fn, bind){\n\t\tfor (var i = 0, l = this.length; i < l; i++){\n\t\t\tif (!fn.call(bind, this[i], i, this)) return false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tfilter: function(fn, bind){\n\t\tvar results = [];\n\t\tfor (var i = 0, l = this.length; i < l; i++){\n\t\t\tif (fn.call(bind, this[i], i, this)) results.push(this[i]);\n\t\t}\n\t\treturn results;\n\t},\n\n\tclean: function(){\n\t\treturn this.filter($defined);\n\t},\n\n\tindexOf: function(item, from){\n\t\tvar len = this.length;\n\t\tfor (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){\n\t\t\tif (this[i] === item) return i;\n\t\t}\n\t\treturn -1;\n\t},\n\n\tmap: function(fn, bind){\n\t\tvar results = [];\n\t\tfor (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this);\n\t\treturn results;\n\t},\n\n\tsome: function(fn, bind){\n\t\tfor (var i = 0, l = this.length; i < l; i++){\n\t\t\tif (fn.call(bind, this[i], i, this)) return true;\n\t\t}\n\t\treturn false;\n\t},\n\n\tassociate: function(keys){\n\t\tvar obj = {}, length = Math.min(this.length, keys.length);\n\t\tfor (var i = 0; i < length; i++) obj[keys[i]] = this[i];\n\t\treturn obj;\n\t},\n\n\tlink: function(object){\n\t\tvar result = {};\n\t\tfor (var i = 0, l = this.length; i < l; i++){\n\t\t\tfor (var key in object){\n\t\t\t\tif (object[key](this[i])){\n\t\t\t\t\tresult[key] = this[i];\n\t\t\t\t\tdelete object[key];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t},\n\n\tcontains: function(item, from){\n\t\treturn this.indexOf(item, from) != -1;\n\t},\n\n\textend: function(array){\n\t\tfor (var i = 0, j = array.length; i < j; i++) this.push(array[i]);\n\t\treturn this;\n\t},\n\t\n\tgetLast: function(){\n\t\treturn (this.length) ? this[this.length - 1] : null;\n\t},\n\n\tgetRandom: function(){\n\t\treturn (this.length) ? this[$random(0, this.length - 1)] : null;\n\t},\n\n\tinclude: function(item){\n\t\tif (!this.contains(item)) this.push(item);\n\t\treturn this;\n\t},\n\n\tcombine: function(array){\n\t\tfor (var i = 0, l = array.length; i < l; i++) this.include(array[i]);\n\t\treturn this;\n\t},\n\n\terase: function(item){\n\t\tfor (var i = this.length; i--; i){\n\t\t\tif (this[i] === item) this.splice(i, 1);\n\t\t}\n\t\treturn this;\n\t},\n\n\tempty: function(){\n\t\tthis.length = 0;\n\t\treturn this;\n\t},\n\n\tflatten: function(){\n\t\tvar array = [];\n\t\tfor (var i = 0, l = this.length; i < l; i++){\n\t\t\tvar type = $type(this[i]);\n\t\t\tif (!type) continue;\n\t\t\tarray = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]);\n\t\t}\n\t\treturn array;\n\t},\n\n\thexToRgb: function(array){\n\t\tif (this.length != 3) return null;\n\t\tvar rgb = this.map(function(value){\n\t\t\tif (value.length == 1) value += value;\n\t\t\treturn value.toInt(16);\n\t\t});\n\t\treturn (array) ? rgb : 'rgb(' + rgb + ')';\n\t},\n\n\trgbToHex: function(array){\n\t\tif (this.length < 3) return null;\n\t\tif (this.length == 4 && this[3] == 0 && !array) return 'transparent';\n\t\tvar hex = [];\n\t\tfor (var i = 0; i < 3; i++){\n\t\t\tvar bit = (this[i] - 0).toString(16);\n\t\t\thex.push((bit.length == 1) ? '0' + bit : bit);\n\t\t}\n\t\treturn (array) ? hex : '#' + hex.join('');\n\t}\n\n});\n\n\n/*\n---\n\nscript: Function.js\n\ndescription: Contains Function Prototypes like create, bind, pass, and delay.\n\nlicense: MIT-style license.\n\nrequires:\n- /Native\n- /$util\n\nprovides: [Function]\n\n...\n*/\n\nFunction.implement({\n\n\textend: function(properties){\n\t\tfor (var property in properties) this[property] = properties[property];\n\t\treturn this;\n\t},\n\n\tcreate: function(options){\n\t\tvar self = this;\n\t\toptions = options || {};\n\t\treturn function(event){\n\t\t\tvar args = options.arguments;\n\t\t\targs = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0);\n\t\t\tif (options.event) args = [event || window.event].extend(args);\n\t\t\tvar returns = function(){\n\t\t\t\treturn self.apply(options.bind || null, args);\n\t\t\t};\n\t\t\tif (options.delay) return setTimeout(returns, options.delay);\n\t\t\tif (options.periodical) return setInterval(returns, options.periodical);\n\t\t\tif (options.attempt) return $try(returns);\n\t\t\treturn returns();\n\t\t};\n\t},\n\n\trun: function(args, bind){\n\t\treturn this.apply(bind, $splat(args));\n\t},\n\n\tpass: function(args, bind){\n\t\treturn this.create({bind: bind, arguments: args});\n\t},\n\n\tbind: function(bind, args){\n\t\treturn this.create({bind: bind, arguments: args});\n\t},\n\n\tbindWithEvent: function(bind, args){\n\t\treturn this.create({bind: bind, arguments: args, event: true});\n\t},\n\n\tattempt: function(args, bind){\n\t\treturn this.create({bind: bind, arguments: args, attempt: true})();\n\t},\n\n\tdelay: function(delay, bind, args){\n\t\treturn this.create({bind: bind, arguments: args, delay: delay})();\n\t},\n\n\tperiodical: function(periodical, bind, args){\n\t\treturn this.create({bind: bind, arguments: args, periodical: periodical})();\n\t}\n\n});\n\n\n/*\n---\n\nscript: Number.js\n\ndescription: Contains Number Prototypes like limit, round, times, and ceil.\n\nlicense: MIT-style license.\n\nrequires:\n- /Native\n- /$util\n\nprovides: [Number]\n\n...\n*/\n\nNumber.implement({\n\n\tlimit: function(min, max){\n\t\treturn Math.min(max, Math.max(min, this));\n\t},\n\n\tround: function(precision){\n\t\tprecision = Math.pow(10, precision || 0);\n\t\treturn Math.round(this * precision) / precision;\n\t},\n\n\ttimes: function(fn, bind){\n\t\tfor (var i = 0; i < this; i++) fn.call(bind, i, this);\n\t},\n\n\ttoFloat: function(){\n\t\treturn parseFloat(this);\n\t},\n\n\ttoInt: function(base){\n\t\treturn parseInt(this, base || 10);\n\t}\n\n});\n\nNumber.alias('times', 'each');\n\n(function(math){\n\tvar methods = {};\n\tmath.each(function(name){\n\t\tif (!Number[name]) methods[name] = function(){\n\t\t\treturn Math[name].apply(null, [this].concat($A(arguments)));\n\t\t};\n\t});\n\tNumber.implement(methods);\n})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']);\n\n\n/*\n---\n\nscript: String.js\n\ndescription: Contains String Prototypes like camelCase, capitalize, test, and toInt.\n\nlicense: MIT-style license.\n\nrequires:\n- /Native\n\nprovides: [String]\n\n...\n*/\n\nString.implement({\n\n\ttest: function(regex, params){\n\t\treturn ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this);\n\t},\n\n\tcontains: function(string, separator){\n\t\treturn (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1;\n\t},\n\n\ttrim: function(){\n\t\treturn this.replace(/^\\s+|\\s+$/g, '');\n\t},\n\n\tclean: function(){\n\t\treturn this.replace(/\\s+/g, ' ').trim();\n\t},\n\n\tcamelCase: function(){\n\t\treturn this.replace(/-\\D/g, function(match){\n\t\t\treturn match.charAt(1).toUpperCase();\n\t\t});\n\t},\n\n\thyphenate: function(){\n\t\treturn this.replace(/[A-Z]/g, function(match){\n\t\t\treturn ('-' + match.charAt(0).toLowerCase());\n\t\t});\n\t},\n\n\tcapitalize: function(){\n\t\treturn this.replace(/\\b[a-z]/g, function(match){\n\t\t\treturn match.toUpperCase();\n\t\t});\n\t},\n\n\tescapeRegExp: function(){\n\t\treturn this.replace(/([-.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1');\n\t},\n\n\ttoInt: function(base){\n\t\treturn parseInt(this, base || 10);\n\t},\n\n\ttoFloat: function(){\n\t\treturn parseFloat(this);\n\t},\n\n\thexToRgb: function(array){\n\t\tvar hex = this.match(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);\n\t\treturn (hex) ? hex.slice(1).hexToRgb(array) : null;\n\t},\n\n\trgbToHex: function(array){\n\t\tvar rgb = this.match(/\\d{1,3}/g);\n\t\treturn (rgb) ? rgb.rgbToHex(array) : null;\n\t},\n\n\tstripScripts: function(option){\n\t\tvar scripts = '';\n\t\tvar text = this.replace(/<script[^>]*>([\\s\\S]*?)<\\/script>/gi, function(){\n\t\t\tscripts += arguments[1] + '\\n';\n\t\t\treturn '';\n\t\t});\n\t\tif (option === true) $exec(scripts);\n\t\telse if ($type(option) == 'function') option(scripts, text);\n\t\treturn text;\n\t},\n\n\tsubstitute: function(object, regexp){\n\t\treturn this.replace(regexp || (/\\\\?\\{([^{}]+)\\}/g), function(match, name){\n\t\t\tif (match.charAt(0) == '\\\\') return match.slice(1);\n\t\t\treturn (object[name] != undefined) ? object[name] : '';\n\t\t});\n\t}\n\n});\n\n\n/*\n---\n\nscript: Hash.js\n\ndescription: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects.\n\nlicense: MIT-style license.\n\nrequires:\n- /Hash.base\n\nprovides: [Hash]\n\n...\n*/\n\nHash.implement({\n\n\thas: Object.prototype.hasOwnProperty,\n\n\tkeyOf: function(value){\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key) && this[key] === value) return key;\n\t\t}\n\t\treturn null;\n\t},\n\n\thasValue: function(value){\n\t\treturn (Hash.keyOf(this, value) !== null);\n\t},\n\n\textend: function(properties){\n\t\tHash.each(properties || {}, function(value, key){\n\t\t\tHash.set(this, key, value);\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\tcombine: function(properties){\n\t\tHash.each(properties || {}, function(value, key){\n\t\t\tHash.include(this, key, value);\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\terase: function(key){\n\t\tif (this.hasOwnProperty(key)) delete this[key];\n\t\treturn this;\n\t},\n\n\tget: function(key){\n\t\treturn (this.hasOwnProperty(key)) ? this[key] : null;\n\t},\n\n\tset: function(key, value){\n\t\tif (!this[key] || this.hasOwnProperty(key)) this[key] = value;\n\t\treturn this;\n\t},\n\n\tempty: function(){\n\t\tHash.each(this, function(value, key){\n\t\t\tdelete this[key];\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\tinclude: function(key, value){\n\t\tif (this[key] == undefined) this[key] = value;\n\t\treturn this;\n\t},\n\n\tmap: function(fn, bind){\n\t\tvar results = new Hash;\n\t\tHash.each(this, function(value, key){\n\t\t\tresults.set(key, fn.call(bind, value, key, this));\n\t\t}, this);\n\t\treturn results;\n\t},\n\n\tfilter: function(fn, bind){\n\t\tvar results = new Hash;\n\t\tHash.each(this, function(value, key){\n\t\t\tif (fn.call(bind, value, key, this)) results.set(key, value);\n\t\t}, this);\n\t\treturn results;\n\t},\n\n\tevery: function(fn, bind){\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tsome: function(fn, bind){\n\t\tfor (var key in this){\n\t\t\tif (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true;\n\t\t}\n\t\treturn false;\n\t},\n\n\tgetKeys: function(){\n\t\tvar keys = [];\n\t\tHash.each(this, function(value, key){\n\t\t\tkeys.push(key);\n\t\t});\n\t\treturn keys;\n\t},\n\n\tgetValues: function(){\n\t\tvar values = [];\n\t\tHash.each(this, function(value){\n\t\t\tvalues.push(value);\n\t\t});\n\t\treturn values;\n\t},\n\n\ttoQueryString: function(base){\n\t\tvar queryString = [];\n\t\tHash.each(this, function(value, key){\n\t\t\tif (base) key = base + '[' + key + ']';\n\t\t\tvar result;\n\t\t\tswitch ($type(value)){\n\t\t\t\tcase 'object': result = Hash.toQueryString(value, key); break;\n\t\t\t\tcase 'array':\n\t\t\t\t\tvar qs = {};\n\t\t\t\t\tvalue.each(function(val, i){\n\t\t\t\t\t\tqs[i] = val;\n\t\t\t\t\t});\n\t\t\t\t\tresult = Hash.toQueryString(qs, key);\n\t\t\t\tbreak;\n\t\t\t\tdefault: result = key + '=' + encodeURIComponent(value);\n\t\t\t}\n\t\t\tif (value != undefined) queryString.push(result);\n\t\t});\n\n\t\treturn queryString.join('&');\n\t}\n\n});\n\nHash.alias({keyOf: 'indexOf', hasValue: 'contains'});\n\n\n/*\n---\n\nscript: Event.js\n\ndescription: Contains the Event Class, to make the event object cross-browser.\n\nlicense: MIT-style license.\n\nrequires:\n- /Window\n- /Document\n- /Hash\n- /Array\n- /Function\n- /String\n\nprovides: [Event]\n\n...\n*/\n\nvar Event = new Native({\n\n\tname: 'Event',\n\n\tinitialize: function(event, win){\n\t\twin = win || window;\n\t\tvar doc = win.document;\n\t\tevent = event || win.event;\n\t\tif (event.$extended) return event;\n\t\tthis.$extended = true;\n\t\tvar type = event.type;\n\t\tvar target = event.target || event.srcElement;\n\t\twhile (target && target.nodeType == 3) target = target.parentNode;\n\n\t\tif (type.test(/key/)){\n\t\t\tvar code = event.which || event.keyCode;\n\t\t\tvar key = Event.Keys.keyOf(code);\n\t\t\tif (type == 'keydown'){\n\t\t\t\tvar fKey = code - 111;\n\t\t\t\tif (fKey > 0 && fKey < 13) key = 'f' + fKey;\n\t\t\t}\n\t\t\tkey = key || String.fromCharCode(code).toLowerCase();\n\t\t} else if (type.match(/(click|mouse|menu)/i)){\n\t\t\tdoc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body;\n\t\t\tvar page = {\n\t\t\t\tx: event.pageX || event.clientX + doc.scrollLeft,\n\t\t\t\ty: event.pageY || event.clientY + doc.scrollTop\n\t\t\t};\n\t\t\tvar client = {\n\t\t\t\tx: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX,\n\t\t\t\ty: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY\n\t\t\t};\n\t\t\tif (type.match(/DOMMouseScroll|mousewheel/)){\n\t\t\t\tvar wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3;\n\t\t\t}\n\t\t\tvar rightClick = (event.which == 3) || (event.button == 2);\n\t\t\tvar related = null;\n\t\t\tif (type.match(/over|out/)){\n\t\t\t\tswitch (type){\n\t\t\t\t\tcase 'mouseover': related = event.relatedTarget || event.fromElement; break;\n\t\t\t\t\tcase 'mouseout': related = event.relatedTarget || event.toElement;\n\t\t\t\t}\n\t\t\t\tif (!(function(){\n\t\t\t\t\twhile (related && related.nodeType == 3) related = related.parentNode;\n\t\t\t\t\treturn true;\n\t\t\t\t}).create({attempt: Browser.Engine.gecko})()) related = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $extend(this, {\n\t\t\tevent: event,\n\t\t\ttype: type,\n\n\t\t\tpage: page,\n\t\t\tclient: client,\n\t\t\trightClick: rightClick,\n\n\t\t\twheel: wheel,\n\n\t\t\trelatedTarget: related,\n\t\t\ttarget: target,\n\n\t\t\tcode: code,\n\t\t\tkey: key,\n\n\t\t\tshift: event.shiftKey,\n\t\t\tcontrol: event.ctrlKey,\n\t\t\talt: event.altKey,\n\t\t\tmeta: event.metaKey\n\t\t});\n\t}\n\n});\n\nEvent.Keys = new Hash({\n\t'enter': 13,\n\t'up': 38,\n\t'down': 40,\n\t'left': 37,\n\t'right': 39,\n\t'esc': 27,\n\t'space': 32,\n\t'backspace': 8,\n\t'tab': 9,\n\t'delete': 46\n});\n\nEvent.implement({\n\n\tstop: function(){\n\t\treturn this.stopPropagation().preventDefault();\n\t},\n\n\tstopPropagation: function(){\n\t\tif (this.event.stopPropagation) this.event.stopPropagation();\n\t\telse this.event.cancelBubble = true;\n\t\treturn this;\n\t},\n\n\tpreventDefault: function(){\n\t\tif (this.event.preventDefault) this.event.preventDefault();\n\t\telse this.event.returnValue = false;\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Class.js\n\ndescription: Contains the Class Function for easily creating, extending, and implementing reusable Classes.\n\nlicense: MIT-style license.\n\nrequires:\n- /$util\n- /Native\n- /Array\n- /String\n- /Function\n- /Number\n- /Hash\n\nprovides: [Class]\n\n...\n*/\n\nfunction Class(params){\n\t\n\tif (params instanceof Function) params = {initialize: params};\n\t\n\tvar newClass = function(){\n\t\tObject.reset(this);\n\t\tif (newClass._prototyping) return this;\n\t\tthis._current = $empty;\n\t\tvar value = (this.initialize) ? this.initialize.apply(this, arguments) : this;\n\t\tdelete this._current; delete this.caller;\n\t\treturn value;\n\t}.extend(this);\n\t\n\tnewClass.implement(params);\n\t\n\tnewClass.constructor = Class;\n\tnewClass.prototype.constructor = newClass;\n\n\treturn newClass;\n\n};\n\nFunction.prototype.protect = function(){\n\tthis._protected = true;\n\treturn this;\n};\n\nObject.reset = function(object, key){\n\t\t\n\tif (key == null){\n\t\tfor (var p in object) Object.reset(object, p);\n\t\treturn object;\n\t}\n\t\n\tdelete object[key];\n\t\n\tswitch ($type(object[key])){\n\t\tcase 'object':\n\t\t\tvar F = function(){};\n\t\t\tF.prototype = object[key];\n\t\t\tvar i = new F;\n\t\t\tobject[key] = Object.reset(i);\n\t\tbreak;\n\t\tcase 'array': object[key] = $unlink(object[key]); break;\n\t}\n\t\n\treturn object;\n\t\n};\n\nnew Native({name: 'Class', initialize: Class}).extend({\n\n\tinstantiate: function(F){\n\t\tF._prototyping = true;\n\t\tvar proto = new F;\n\t\tdelete F._prototyping;\n\t\treturn proto;\n\t},\n\t\n\twrap: function(self, key, method){\n\t\tif (method._origin) method = method._origin;\n\t\t\n\t\treturn function(){\n\t\t\tif (method._protected && this._current == null) throw new Error('The method \"' + key + '\" cannot be called.');\n\t\t\tvar caller = this.caller, current = this._current;\n\t\t\tthis.caller = current; this._current = arguments.callee;\n\t\t\tvar result = method.apply(this, arguments);\n\t\t\tthis._current = current; this.caller = caller;\n\t\t\treturn result;\n\t\t}.extend({_owner: self, _origin: method, _name: key});\n\n\t}\n\t\n});\n\nClass.implement({\n\t\n\timplement: function(key, value){\n\t\t\n\t\tif ($type(key) == 'object'){\n\t\t\tfor (var p in key) this.implement(p, key[p]);\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar mutator = Class.Mutators[key];\n\t\t\n\t\tif (mutator){\n\t\t\tvalue = mutator.call(this, value);\n\t\t\tif (value == null) return this;\n\t\t}\n\t\t\n\t\tvar proto = this.prototype;\n\n\t\tswitch ($type(value)){\n\t\t\t\n\t\t\tcase 'function':\n\t\t\t\tif (value._hidden) return this;\n\t\t\t\tproto[key] = Class.wrap(this, key, value);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'object':\n\t\t\t\tvar previous = proto[key];\n\t\t\t\tif ($type(previous) == 'object') $mixin(previous, value);\n\t\t\t\telse proto[key] = $unlink(value);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'array':\n\t\t\t\tproto[key] = $unlink(value);\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault: proto[key] = value;\n\n\t\t}\n\t\t\n\t\treturn this;\n\n\t}\n\t\n});\n\nClass.Mutators = {\n\t\n\tExtends: function(parent){\n\n\t\tthis.parent = parent;\n\t\tthis.prototype = Class.instantiate(parent);\n\n\t\tthis.implement('parent', function(){\n\t\t\tvar name = this.caller._name, previous = this.caller._owner.parent.prototype[name];\n\t\t\tif (!previous) throw new Error('The method \"' + name + '\" has no parent.');\n\t\t\treturn previous.apply(this, arguments);\n\t\t}.protect());\n\n\t},\n\n\tImplements: function(items){\n\t\t$splat(items).each(function(item){\n\t\t\tif (item instanceof Function) item = Class.instantiate(item);\n\t\t\tthis.implement(item);\n\t\t}, this);\n\n\t}\n\t\n};\n\n\n/*\n---\n\nscript: Class.Extras.js\n\ndescription: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks.\n\nlicense: MIT-style license.\n\nrequires:\n- /Class\n\nprovides: [Chain, Events, Options]\n\n...\n*/\n\nvar Chain = new Class({\n\n\t$chain: [],\n\n\tchain: function(){\n\t\tthis.$chain.extend(Array.flatten(arguments));\n\t\treturn this;\n\t},\n\n\tcallChain: function(){\n\t\treturn (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false;\n\t},\n\n\tclearChain: function(){\n\t\tthis.$chain.empty();\n\t\treturn this;\n\t}\n\n});\n\nvar Events = new Class({\n\n\t$events: {},\n\n\taddEvent: function(type, fn, internal){\n\t\ttype = Events.removeOn(type);\n\t\tif (fn != $empty){\n\t\t\tthis.$events[type] = this.$events[type] || [];\n\t\t\tthis.$events[type].include(fn);\n\t\t\tif (internal) fn.internal = true;\n\t\t}\n\t\treturn this;\n\t},\n\n\taddEvents: function(events){\n\t\tfor (var type in events) this.addEvent(type, events[type]);\n\t\treturn this;\n\t},\n\n\tfireEvent: function(type, args, delay){\n\t\ttype = Events.removeOn(type);\n\t\tif (!this.$events || !this.$events[type]) return this;\n\t\tthis.$events[type].each(function(fn){\n\t\t\tfn.create({'bind': this, 'delay': delay, 'arguments': args})();\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\tremoveEvent: function(type, fn){\n\t\ttype = Events.removeOn(type);\n\t\tif (!this.$events[type]) return this;\n\t\tif (!fn.internal) this.$events[type].erase(fn);\n\t\treturn this;\n\t},\n\n\tremoveEvents: function(events){\n\t\tvar type;\n\t\tif ($type(events) == 'object'){\n\t\t\tfor (type in events) this.removeEvent(type, events[type]);\n\t\t\treturn this;\n\t\t}\n\t\tif (events) events = Events.removeOn(events);\n\t\tfor (type in this.$events){\n\t\t\tif (events && events != type) continue;\n\t\t\tvar fns = this.$events[type];\n\t\t\tfor (var i = fns.length; i--; i) this.removeEvent(type, fns[i]);\n\t\t}\n\t\treturn this;\n\t}\n\n});\n\nEvents.removeOn = function(string){\n\treturn string.replace(/^on([A-Z])/, function(full, first){\n\t\treturn first.toLowerCase();\n\t});\n};\n\nvar Options = new Class({\n\n\tsetOptions: function(){\n\t\tthis.options = $merge.run([this.options].extend(arguments));\n\t\tif (!this.addEvent) return this;\n\t\tfor (var option in this.options){\n\t\t\tif ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue;\n\t\t\tthis.addEvent(option, this.options[option]);\n\t\t\tdelete this.options[option];\n\t\t}\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Element.js\n\ndescription: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements.\n\nlicense: MIT-style license.\n\nrequires:\n- /Window\n- /Document\n- /Array\n- /String\n- /Function\n- /Number\n- /Hash\n\nprovides: [Element, Elements, $, $$, Iframe]\n\n...\n*/\n\nvar Element = new Native({\n\n\tname: 'Element',\n\n\tlegacy: window.Element,\n\n\tinitialize: function(tag, props){\n\t\tvar konstructor = Element.Constructors.get(tag);\n\t\tif (konstructor) return konstructor(props);\n\t\tif (typeof tag == 'string') return document.newElement(tag, props);\n\t\treturn document.id(tag).set(props);\n\t},\n\n\tafterImplement: function(key, value){\n\t\tElement.Prototype[key] = value;\n\t\tif (Array[key]) return;\n\t\tElements.implement(key, function(){\n\t\t\tvar items = [], elements = true;\n\t\t\tfor (var i = 0, j = this.length; i < j; i++){\n\t\t\t\tvar returns = this[i][key].apply(this[i], arguments);\n\t\t\t\titems.push(returns);\n\t\t\t\tif (elements) elements = ($type(returns) == 'element');\n\t\t\t}\n\t\t\treturn (elements) ? new Elements(items) : items;\n\t\t});\n\t}\n\n});\n\nElement.Prototype = {$family: {name: 'element'}};\n\nElement.Constructors = new Hash;\n\nvar IFrame = new Native({\n\n\tname: 'IFrame',\n\n\tgenerics: false,\n\n\tinitialize: function(){\n\t\tvar params = Array.link(arguments, {properties: Object.type, iframe: $defined});\n\t\tvar props = params.properties || {};\n\t\tvar iframe = document.id(params.iframe);\n\t\tvar onload = props.onload || $empty;\n\t\tdelete props.onload;\n\t\tprops.id = props.name = $pick(props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + $time());\n\t\tiframe = new Element(iframe || 'iframe', props);\n\t\tvar onFrameLoad = function(){\n\t\t\tvar host = $try(function(){\n\t\t\t\treturn iframe.contentWindow.location.host;\n\t\t\t});\n\t\t\tif (!host || host == window.location.host){\n\t\t\t\tvar win = new Window(iframe.contentWindow);\n\t\t\t\tnew Document(iframe.contentWindow.document);\n\t\t\t\t$extend(win.Element.prototype, Element.Prototype);\n\t\t\t}\n\t\t\tonload.call(iframe.contentWindow, iframe.contentWindow.document);\n\t\t};\n\t\tvar contentWindow = $try(function(){\n\t\t\treturn iframe.contentWindow;\n\t\t});\n\t\t((contentWindow && contentWindow.document.body) || window.frames[props.id]) ? onFrameLoad() : iframe.addListener('load', onFrameLoad);\n\t\treturn iframe;\n\t}\n\n});\n\nvar Elements = new Native({\n\n\tinitialize: function(elements, options){\n\t\toptions = $extend({ddup: true, cash: true}, options);\n\t\telements = elements || [];\n\t\tif (options.ddup || options.cash){\n\t\t\tvar uniques = {}, returned = [];\n\t\t\tfor (var i = 0, l = elements.length; i < l; i++){\n\t\t\t\tvar el = document.id(elements[i], !options.cash);\n\t\t\t\tif (options.ddup){\n\t\t\t\t\tif (uniques[el.uid]) continue;\n\t\t\t\t\tuniques[el.uid] = true;\n\t\t\t\t}\n\t\t\t\tif (el) returned.push(el);\n\t\t\t}\n\t\t\telements = returned;\n\t\t}\n\t\treturn (options.cash) ? $extend(elements, this) : elements;\n\t}\n\n});\n\nElements.implement({\n\n\tfilter: function(filter, bind){\n\t\tif (!filter) return this;\n\t\treturn new Elements(Array.filter(this, (typeof filter == 'string') ? function(item){\n\t\t\treturn item.match(filter);\n\t\t} : filter, bind));\n\t}\n\n});\n\nDocument.implement({\n\n\tnewElement: function(tag, props){\n\t\tif (Browser.Engine.trident && props){\n\t\t\t['name', 'type', 'checked'].each(function(attribute){\n\t\t\t\tif (!props[attribute]) return;\n\t\t\t\ttag += ' ' + attribute + '=\"' + props[attribute] + '\"';\n\t\t\t\tif (attribute != 'checked') delete props[attribute];\n\t\t\t});\n\t\t\ttag = '<' + tag + '>';\n\t\t}\n\t\treturn document.id(this.createElement(tag)).set(props);\n\t},\n\n\tnewTextNode: function(text){\n\t\treturn this.createTextNode(text);\n\t},\n\n\tgetDocument: function(){\n\t\treturn this;\n\t},\n\n\tgetWindow: function(){\n\t\treturn this.window;\n\t},\n\t\n\tid: (function(){\n\t\t\n\t\tvar types = {\n\n\t\t\tstring: function(id, nocash, doc){\n\t\t\t\tid = doc.getElementById(id);\n\t\t\t\treturn (id) ? types.element(id, nocash) : null;\n\t\t\t},\n\t\t\t\n\t\t\telement: function(el, nocash){\n\t\t\t\t$uid(el);\n\t\t\t\tif (!nocash && !el.$family && !(/^object|embed$/i).test(el.tagName)){\n\t\t\t\t\tvar proto = Element.Prototype;\n\t\t\t\t\tfor (var p in proto) el[p] = proto[p];\n\t\t\t\t};\n\t\t\t\treturn el;\n\t\t\t},\n\t\t\t\n\t\t\tobject: function(obj, nocash, doc){\n\t\t\t\tif (obj.toElement) return types.element(obj.toElement(doc), nocash);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t};\n\n\t\ttypes.textnode = types.whitespace = types.window = types.document = $arguments(0);\n\t\t\n\t\treturn function(el, nocash, doc){\n\t\t\tif (el && el.$family && el.uid) return el;\n\t\t\tvar type = $type(el);\n\t\t\treturn (types[type]) ? types[type](el, nocash, doc || document) : null;\n\t\t};\n\n\t})()\n\n});\n\nif (window.$ == null) Window.implement({\n\t$: function(el, nc){\n\t\treturn document.id(el, nc, this.document);\n\t}\n});\n\nWindow.implement({\n\n\t$$: function(selector){\n\t\tif (arguments.length == 1 && typeof selector == 'string') return this.document.getElements(selector);\n\t\tvar elements = [];\n\t\tvar args = Array.flatten(arguments);\n\t\tfor (var i = 0, l = args.length; i < l; i++){\n\t\t\tvar item = args[i];\n\t\t\tswitch ($type(item)){\n\t\t\t\tcase 'element': elements.push(item); break;\n\t\t\t\tcase 'string': elements.extend(this.document.getElements(item, true));\n\t\t\t}\n\t\t}\n\t\treturn new Elements(elements);\n\t},\n\n\tgetDocument: function(){\n\t\treturn this.document;\n\t},\n\n\tgetWindow: function(){\n\t\treturn this;\n\t}\n\n});\n\nNative.implement([Element, Document], {\n\n\tgetElement: function(selector, nocash){\n\t\treturn document.id(this.getElements(selector, true)[0] || null, nocash);\n\t},\n\n\tgetElements: function(tags, nocash){\n\t\ttags = tags.split(',');\n\t\tvar elements = [];\n\t\tvar ddup = (tags.length > 1);\n\t\ttags.each(function(tag){\n\t\t\tvar partial = this.getElementsByTagName(tag.trim());\n\t\t\t(ddup) ? elements.extend(partial) : elements = partial;\n\t\t}, this);\n\t\treturn new Elements(elements, {ddup: ddup, cash: !nocash});\n\t}\n\n});\n\n(function(){\n\nvar collected = {}, storage = {};\nvar props = {input: 'checked', option: 'selected', textarea: (Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerHTML' : 'value'};\n\nvar get = function(uid){\n\treturn (storage[uid] || (storage[uid] = {}));\n};\n\nvar clean = function(item, retain){\n\tif (!item) return;\n\tvar uid = item.uid;\n\tif (Browser.Engine.trident){\n\t\tif (item.clearAttributes){\n\t\t\tvar clone = retain && item.cloneNode(false);\n\t\t\titem.clearAttributes();\n\t\t\tif (clone) item.mergeAttributes(clone);\n\t\t} else if (item.removeEvents){\n\t\t\titem.removeEvents();\n\t\t}\n\t\tif ((/object/i).test(item.tagName)){\n\t\t\tfor (var p in item){\n\t\t\t\tif (typeof item[p] == 'function') item[p] = $empty;\n\t\t\t}\n\t\t\tElement.dispose(item);\n\t\t}\n\t}\t\n\tif (!uid) return;\n\tcollected[uid] = storage[uid] = null;\n};\n\nvar purge = function(){\n\tHash.each(collected, clean);\n\tif (Browser.Engine.trident) $A(document.getElementsByTagName('object')).each(clean);\n\tif (window.CollectGarbage) CollectGarbage();\n\tcollected = storage = null;\n};\n\nvar walk = function(element, walk, start, match, all, nocash){\n\tvar el = element[start || walk];\n\tvar elements = [];\n\twhile (el){\n\t\tif (el.nodeType == 1 && (!match || Element.match(el, match))){\n\t\t\tif (!all) return document.id(el, nocash);\n\t\t\telements.push(el);\n\t\t}\n\t\tel = el[walk];\n\t}\n\treturn (all) ? new Elements(elements, {ddup: false, cash: !nocash}) : null;\n};\n\nvar attributes = {\n\t'html': 'innerHTML',\n\t'class': 'className',\n\t'for': 'htmlFor',\n\t'defaultValue': 'defaultValue',\n\t'text': (Browser.Engine.trident || (Browser.Engine.webkit && Browser.Engine.version < 420)) ? 'innerText' : 'textContent'\n};\nvar bools = ['compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'noresize', 'defer'];\nvar camels = ['value', 'type', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap'];\n\nbools = bools.associate(bools);\n\nHash.extend(attributes, bools);\nHash.extend(attributes, camels.associate(camels.map(String.toLowerCase)));\n\nvar inserters = {\n\n\tbefore: function(context, element){\n\t\tif (element.parentNode) element.parentNode.insertBefore(context, element);\n\t},\n\n\tafter: function(context, element){\n\t\tif (!element.parentNode) return;\n\t\tvar next = element.nextSibling;\n\t\t(next) ? element.parentNode.insertBefore(context, next) : element.parentNode.appendChild(context);\n\t},\n\n\tbottom: function(context, element){\n\t\telement.appendChild(context);\n\t},\n\n\ttop: function(context, element){\n\t\tvar first = element.firstChild;\n\t\t(first) ? element.insertBefore(context, first) : element.appendChild(context);\n\t}\n\n};\n\ninserters.inside = inserters.bottom;\n\nHash.each(inserters, function(inserter, where){\n\n\twhere = where.capitalize();\n\n\tElement.implement('inject' + where, function(el){\n\t\tinserter(this, document.id(el, true));\n\t\treturn this;\n\t});\n\n\tElement.implement('grab' + where, function(el){\n\t\tinserter(document.id(el, true), this);\n\t\treturn this;\n\t});\n\n});\n\nElement.implement({\n\n\tset: function(prop, value){\n\t\tswitch ($type(prop)){\n\t\t\tcase 'object':\n\t\t\t\tfor (var p in prop) this.set(p, prop[p]);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\tvar property = Element.Properties.get(prop);\n\t\t\t\t(property && property.set) ? property.set.apply(this, Array.slice(arguments, 1)) : this.setProperty(prop, value);\n\t\t}\n\t\treturn this;\n\t},\n\n\tget: function(prop){\n\t\tvar property = Element.Properties.get(prop);\n\t\treturn (property && property.get) ? property.get.apply(this, Array.slice(arguments, 1)) : this.getProperty(prop);\n\t},\n\n\terase: function(prop){\n\t\tvar property = Element.Properties.get(prop);\n\t\t(property && property.erase) ? property.erase.apply(this) : this.removeProperty(prop);\n\t\treturn this;\n\t},\n\n\tsetProperty: function(attribute, value){\n\t\tvar key = attributes[attribute];\n\t\tif (value == undefined) return this.removeProperty(attribute);\n\t\tif (key && bools[attribute]) value = !!value;\n\t\t(key) ? this[key] = value : this.setAttribute(attribute, '' + value);\n\t\treturn this;\n\t},\n\n\tsetProperties: function(attributes){\n\t\tfor (var attribute in attributes) this.setProperty(attribute, attributes[attribute]);\n\t\treturn this;\n\t},\n\n\tgetProperty: function(attribute){\n\t\tvar key = attributes[attribute];\n\t\tvar value = (key) ? this[key] : this.getAttribute(attribute, 2);\n\t\treturn (bools[attribute]) ? !!value : (key) ? value : value || null;\n\t},\n\n\tgetProperties: function(){\n\t\tvar args = $A(arguments);\n\t\treturn args.map(this.getProperty, this).associate(args);\n\t},\n\n\tremoveProperty: function(attribute){\n\t\tvar key = attributes[attribute];\n\t\t(key) ? this[key] = (key && bools[attribute]) ? false : '' : this.removeAttribute(attribute);\n\t\treturn this;\n\t},\n\n\tremoveProperties: function(){\n\t\tArray.each(arguments, this.removeProperty, this);\n\t\treturn this;\n\t},\n\n\thasClass: function(className){\n\t\treturn this.className.contains(className, ' ');\n\t},\n\n\taddClass: function(className){\n\t\tif (!this.hasClass(className)) this.className = (this.className + ' ' + className).clean();\n\t\treturn this;\n\t},\n\n\tremoveClass: function(className){\n\t\tthis.className = this.className.replace(new RegExp('(^|\\\\s)' + className + '(?:\\\\s|$)'), '$1');\n\t\treturn this;\n\t},\n\n\ttoggleClass: function(className){\n\t\treturn this.hasClass(className) ? this.removeClass(className) : this.addClass(className);\n\t},\n\n\tadopt: function(){\n\t\tArray.flatten(arguments).each(function(element){\n\t\t\telement = document.id(element, true);\n\t\t\tif (element) this.appendChild(element);\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\tappendText: function(text, where){\n\t\treturn this.grab(this.getDocument().newTextNode(text), where);\n\t},\n\n\tgrab: function(el, where){\n\t\tinserters[where || 'bottom'](document.id(el, true), this);\n\t\treturn this;\n\t},\n\n\tinject: function(el, where){\n\t\tinserters[where || 'bottom'](this, document.id(el, true));\n\t\treturn this;\n\t},\n\n\treplaces: function(el){\n\t\tel = document.id(el, true);\n\t\tel.parentNode.replaceChild(this, el);\n\t\treturn this;\n\t},\n\n\twraps: function(el, where){\n\t\tel = document.id(el, true);\n\t\treturn this.replaces(el).grab(el, where);\n\t},\n\n\tgetPrevious: function(match, nocash){\n\t\treturn walk(this, 'previousSibling', null, match, false, nocash);\n\t},\n\n\tgetAllPrevious: function(match, nocash){\n\t\treturn walk(this, 'previousSibling', null, match, true, nocash);\n\t},\n\n\tgetNext: function(match, nocash){\n\t\treturn walk(this, 'nextSibling', null, match, false, nocash);\n\t},\n\n\tgetAllNext: function(match, nocash){\n\t\treturn walk(this, 'nextSibling', null, match, true, nocash);\n\t},\n\n\tgetFirst: function(match, nocash){\n\t\treturn walk(this, 'nextSibling', 'firstChild', match, false, nocash);\n\t},\n\n\tgetLast: function(match, nocash){\n\t\treturn walk(this, 'previousSibling', 'lastChild', match, false, nocash);\n\t},\n\n\tgetParent: function(match, nocash){\n\t\treturn walk(this, 'parentNode', null, match, false, nocash);\n\t},\n\n\tgetParents: function(match, nocash){\n\t\treturn walk(this, 'parentNode', null, match, true, nocash);\n\t},\n\t\n\tgetSiblings: function(match, nocash){\n\t\treturn this.getParent().getChildren(match, nocash).erase(this);\n\t},\n\n\tgetChildren: function(match, nocash){\n\t\treturn walk(this, 'nextSibling', 'firstChild', match, true, nocash);\n\t},\n\n\tgetWindow: function(){\n\t\treturn this.ownerDocument.window;\n\t},\n\n\tgetDocument: function(){\n\t\treturn this.ownerDocument;\n\t},\n\n\tgetElementById: function(id, nocash){\n\t\tvar el = this.ownerDocument.getElementById(id);\n\t\tif (!el) return null;\n\t\tfor (var parent = el.parentNode; parent != this; parent = parent.parentNode){\n\t\t\tif (!parent) return null;\n\t\t}\n\t\treturn document.id(el, nocash);\n\t},\n\n\tgetSelected: function(){\n\t\treturn new Elements($A(this.options).filter(function(option){\n\t\t\treturn option.selected;\n\t\t}));\n\t},\n\n\tgetComputedStyle: function(property){\n\t\tif (this.currentStyle) return this.currentStyle[property.camelCase()];\n\t\tvar computed = this.getDocument().defaultView.getComputedStyle(this, null);\n\t\treturn (computed) ? computed.getPropertyValue([property.hyphenate()]) : null;\n\t},\n\n\ttoQueryString: function(){\n\t\tvar queryString = [];\n\t\tthis.getElements('input, select, textarea', true).each(function(el){\n\t\t\tif (!el.name || el.disabled || el.type == 'submit' || el.type == 'reset' || el.type == 'file') return;\n\t\t\tvar value = (el.tagName.toLowerCase() == 'select') ? Element.getSelected(el).map(function(opt){\n\t\t\t\treturn opt.value;\n\t\t\t}) : ((el.type == 'radio' || el.type == 'checkbox') && !el.checked) ? null : el.value;\n\t\t\t$splat(value).each(function(val){\n\t\t\t\tif (typeof val != 'undefined') queryString.push(el.name + '=' + encodeURIComponent(val));\n\t\t\t});\n\t\t});\n\t\treturn queryString.join('&');\n\t},\n\n\tclone: function(contents, keepid){\n\t\tcontents = contents !== false;\n\t\tvar clone = this.cloneNode(contents);\n\t\tvar clean = function(node, element){\n\t\t\tif (!keepid) node.removeAttribute('id');\n\t\t\tif (Browser.Engine.trident){\n\t\t\t\tnode.clearAttributes();\n\t\t\t\tnode.mergeAttributes(element);\n\t\t\t\tnode.removeAttribute('uid');\n\t\t\t\tif (node.options){\n\t\t\t\t\tvar no = node.options, eo = element.options;\n\t\t\t\t\tfor (var j = no.length; j--;) no[j].selected = eo[j].selected;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar prop = props[element.tagName.toLowerCase()];\n\t\t\tif (prop && element[prop]) node[prop] = element[prop];\n\t\t};\n\n\t\tif (contents){\n\t\t\tvar ce = clone.getElementsByTagName('*'), te = this.getElementsByTagName('*');\n\t\t\tfor (var i = ce.length; i--;) clean(ce[i], te[i]);\n\t\t}\n\n\t\tclean(clone, this);\n\t\treturn document.id(clone);\n\t},\n\n\tdestroy: function(){\n\t\tElement.empty(this);\n\t\tElement.dispose(this);\n\t\tclean(this, true);\n\t\treturn null;\n\t},\n\n\tempty: function(){\n\t\t$A(this.childNodes).each(function(node){\n\t\t\tElement.destroy(node);\n\t\t});\n\t\treturn this;\n\t},\n\n\tdispose: function(){\n\t\treturn (this.parentNode) ? this.parentNode.removeChild(this) : this;\n\t},\n\n\thasChild: function(el){\n\t\tel = document.id(el, true);\n\t\tif (!el) return false;\n\t\tif (Browser.Engine.webkit && Browser.Engine.version < 420) return $A(this.getElementsByTagName(el.tagName)).contains(el);\n\t\treturn (this.contains) ? (this != el && this.contains(el)) : !!(this.compareDocumentPosition(el) & 16);\n\t},\n\n\tmatch: function(tag){\n\t\treturn (!tag || (tag == this) || (Element.get(this, 'tag') == tag));\n\t}\n\n});\n\nNative.implement([Element, Window, Document], {\n\n\taddListener: function(type, fn){\n\t\tif (type == 'unload'){\n\t\t\tvar old = fn, self = this;\n\t\t\tfn = function(){\n\t\t\t\tself.removeListener('unload', fn);\n\t\t\t\told();\n\t\t\t};\n\t\t} else {\n\t\t\tcollected[this.uid] = this;\n\t\t}\n\t\tif (this.addEventListener) this.addEventListener(type, fn, false);\n\t\telse this.attachEvent('on' + type, fn);\n\t\treturn this;\n\t},\n\n\tremoveListener: function(type, fn){\n\t\tif (this.removeEventListener) this.removeEventListener(type, fn, false);\n\t\telse this.detachEvent('on' + type, fn);\n\t\treturn this;\n\t},\n\n\tretrieve: function(property, dflt){\n\t\tvar storage = get(this.uid), prop = storage[property];\n\t\tif (dflt != undefined && prop == undefined) prop = storage[property] = dflt;\n\t\treturn $pick(prop);\n\t},\n\n\tstore: function(property, value){\n\t\tvar storage = get(this.uid);\n\t\tstorage[property] = value;\n\t\treturn this;\n\t},\n\n\teliminate: function(property){\n\t\tvar storage = get(this.uid);\n\t\tdelete storage[property];\n\t\treturn this;\n\t}\n\n});\n\nwindow.addListener('unload', purge);\n\n})();\n\nElement.Properties = new Hash;\n\nElement.Properties.style = {\n\n\tset: function(style){\n\t\tthis.style.cssText = style;\n\t},\n\n\tget: function(){\n\t\treturn this.style.cssText;\n\t},\n\n\terase: function(){\n\t\tthis.style.cssText = '';\n\t}\n\n};\n\nElement.Properties.tag = {\n\n\tget: function(){\n\t\treturn this.tagName.toLowerCase();\n\t}\n\n};\n\nElement.Properties.html = (function(){\n\tvar wrapper = document.createElement('div');\n\n\tvar translations = {\n\t\ttable: [1, '<table>', '</table>'],\n\t\tselect: [1, '<select>', '</select>'],\n\t\ttbody: [2, '<table><tbody>', '</tbody></table>'],\n\t\ttr: [3, '<table><tbody><tr>', '</tr></tbody></table>']\n\t};\n\ttranslations.thead = translations.tfoot = translations.tbody;\n\n\tvar html = {\n\t\tset: function(){\n\t\t\tvar html = Array.flatten(arguments).join('');\n\t\t\tvar wrap = Browser.Engine.trident && translations[this.get('tag')];\n\t\t\tif (wrap){\n\t\t\t\tvar first = wrapper;\n\t\t\t\tfirst.innerHTML = wrap[1] + html + wrap[2];\n\t\t\t\tfor (var i = wrap[0]; i--;) first = first.firstChild;\n\t\t\t\tthis.empty().adopt(first.childNodes);\n\t\t\t} else {\n\t\t\t\tthis.innerHTML = html;\n\t\t\t}\n\t\t}\n\t};\n\n\thtml.erase = html.set;\n\n\treturn html;\n})();\n\nif (Browser.Engine.webkit && Browser.Engine.version < 420) Element.Properties.text = {\n\tget: function(){\n\t\tif (this.innerText) return this.innerText;\n\t\tvar temp = this.ownerDocument.newElement('div', {html: this.innerHTML}).inject(this.ownerDocument.body);\n\t\tvar text = temp.innerText;\n\t\ttemp.destroy();\n\t\treturn text;\n\t}\n};\n\n\n/*\n---\n\nscript: Element.Event.js\n\ndescription: Contains Element methods for dealing with events. This file also includes mouseenter and mouseleave custom Element Events.\n\nlicense: MIT-style license.\n\nrequires: \n- /Element\n- /Event\n\nprovides: [Element.Event]\n\n...\n*/\n\nElement.Properties.events = {set: function(events){\n\tthis.addEvents(events);\n}};\n\nNative.implement([Element, Window, Document], {\n\n\taddEvent: function(type, fn){\n\t\tvar events = this.retrieve('events', {});\n\t\tevents[type] = events[type] || {'keys': [], 'values': []};\n\t\tif (events[type].keys.contains(fn)) return this;\n\t\tevents[type].keys.push(fn);\n\t\tvar realType = type, custom = Element.Events.get(type), condition = fn, self = this;\n\t\tif (custom){\n\t\t\tif (custom.onAdd) custom.onAdd.call(this, fn);\n\t\t\tif (custom.condition){\n\t\t\t\tcondition = function(event){\n\t\t\t\t\tif (custom.condition.call(this, event)) return fn.call(this, event);\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t\t}\n\t\t\trealType = custom.base || realType;\n\t\t}\n\t\tvar defn = function(){\n\t\t\treturn fn.call(self);\n\t\t};\n\t\tvar nativeEvent = Element.NativeEvents[realType];\n\t\tif (nativeEvent){\n\t\t\tif (nativeEvent == 2){\n\t\t\t\tdefn = function(event){\n\t\t\t\t\tevent = new Event(event, self.getWindow());\n\t\t\t\t\tif (condition.call(self, event) === false) event.stop();\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.addListener(realType, defn);\n\t\t}\n\t\tevents[type].values.push(defn);\n\t\treturn this;\n\t},\n\n\tremoveEvent: function(type, fn){\n\t\tvar events = this.retrieve('events');\n\t\tif (!events || !events[type]) return this;\n\t\tvar pos = events[type].keys.indexOf(fn);\n\t\tif (pos == -1) return this;\n\t\tevents[type].keys.splice(pos, 1);\n\t\tvar value = events[type].values.splice(pos, 1)[0];\n\t\tvar custom = Element.Events.get(type);\n\t\tif (custom){\n\t\t\tif (custom.onRemove) custom.onRemove.call(this, fn);\n\t\t\ttype = custom.base || type;\n\t\t}\n\t\treturn (Element.NativeEvents[type]) ? this.removeListener(type, value) : this;\n\t},\n\n\taddEvents: function(events){\n\t\tfor (var event in events) this.addEvent(event, events[event]);\n\t\treturn this;\n\t},\n\n\tremoveEvents: function(events){\n\t\tvar type;\n\t\tif ($type(events) == 'object'){\n\t\t\tfor (type in events) this.removeEvent(type, events[type]);\n\t\t\treturn this;\n\t\t}\n\t\tvar attached = this.retrieve('events');\n\t\tif (!attached) return this;\n\t\tif (!events){\n\t\t\tfor (type in attached) this.removeEvents(type);\n\t\t\tthis.eliminate('events');\n\t\t} else if (attached[events]){\n\t\t\twhile (attached[events].keys[0]) this.removeEvent(events, attached[events].keys[0]);\n\t\t\tattached[events] = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\tfireEvent: function(type, args, delay){\n\t\tvar events = this.retrieve('events');\n\t\tif (!events || !events[type]) return this;\n\t\tevents[type].keys.each(function(fn){\n\t\t\tfn.create({'bind': this, 'delay': delay, 'arguments': args})();\n\t\t}, this);\n\t\treturn this;\n\t},\n\n\tcloneEvents: function(from, type){\n\t\tfrom = document.id(from);\n\t\tvar fevents = from.retrieve('events');\n\t\tif (!fevents) return this;\n\t\tif (!type){\n\t\t\tfor (var evType in fevents) this.cloneEvents(from, evType);\n\t\t} else if (fevents[type]){\n\t\t\tfevents[type].keys.each(function(fn){\n\t\t\t\tthis.addEvent(type, fn);\n\t\t\t}, this);\n\t\t}\n\t\treturn this;\n\t}\n\n});\n\nElement.NativeEvents = {\n\tclick: 2, dblclick: 2, mouseup: 2, mousedown: 2, contextmenu: 2, //mouse buttons\n\tmousewheel: 2, DOMMouseScroll: 2, //mouse wheel\n\tmouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement\n\tkeydown: 2, keypress: 2, keyup: 2, //keyboard\n\tfocus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements\n\tload: 1, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window\n\terror: 1, abort: 1, scroll: 1 //misc\n};\n\n(function(){\n\nvar $check = function(event){\n\tvar related = event.relatedTarget;\n\tif (related == undefined) return true;\n\tif (related === false) return false;\n\treturn ($type(this) != 'document' && related != this && related.prefix != 'xul' && !this.hasChild(related));\n};\n\nElement.Events = new Hash({\n\n\tmouseenter: {\n\t\tbase: 'mouseover',\n\t\tcondition: $check\n\t},\n\n\tmouseleave: {\n\t\tbase: 'mouseout',\n\t\tcondition: $check\n\t},\n\n\tmousewheel: {\n\t\tbase: (Browser.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel'\n\t}\n\n});\n\n})();\n\n\n/*\n---\n\nscript: Element.Style.js\n\ndescription: Contains methods for interacting with the styles of Elements in a fashionable way.\n\nlicense: MIT-style license.\n\nrequires:\n- /Element\n\nprovides: [Element.Style]\n\n...\n*/\n\nElement.Properties.styles = {set: function(styles){\n\tthis.setStyles(styles);\n}};\n\nElement.Properties.opacity = {\n\n\tset: function(opacity, novisibility){\n\t\tif (!novisibility){\n\t\t\tif (opacity == 0){\n\t\t\t\tif (this.style.visibility != 'hidden') this.style.visibility = 'hidden';\n\t\t\t} else {\n\t\t\t\tif (this.style.visibility != 'visible') this.style.visibility = 'visible';\n\t\t\t}\n\t\t}\n\t\tif (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1;\n\t\tif (Browser.Engine.trident) this.style.filter = (opacity == 1) ? '' : 'alpha(opacity=' + opacity * 100 + ')';\n\t\tthis.style.opacity = opacity;\n\t\tthis.store('opacity', opacity);\n\t},\n\n\tget: function(){\n\t\treturn this.retrieve('opacity', 1);\n\t}\n\n};\n\nElement.implement({\n\n\tsetOpacity: function(value){\n\t\treturn this.set('opacity', value, true);\n\t},\n\n\tgetOpacity: function(){\n\t\treturn this.get('opacity');\n\t},\n\n\tsetStyle: function(property, value){\n\t\tswitch (property){\n\t\t\tcase 'opacity': return this.set('opacity', parseFloat(value));\n\t\t\tcase 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat';\n\t\t}\n\t\tproperty = property.camelCase();\n\t\tif ($type(value) != 'string'){\n\t\t\tvar map = (Element.Styles.get(property) || '@').split(' ');\n\t\t\tvalue = $splat(value).map(function(val, i){\n\t\t\t\tif (!map[i]) return '';\n\t\t\t\treturn ($type(val) == 'number') ? map[i].replace('@', Math.round(val)) : val;\n\t\t\t}).join(' ');\n\t\t} else if (value == String(Number(value))){\n\t\t\tvalue = Math.round(value);\n\t\t}\n\t\tthis.style[property] = value;\n\t\treturn this;\n\t},\n\n\tgetStyle: function(property){\n\t\tswitch (property){\n\t\t\tcase 'opacity': return this.get('opacity');\n\t\t\tcase 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat';\n\t\t}\n\t\tproperty = property.camelCase();\n\t\tvar result = this.style[property];\n\t\tif (!$chk(result)){\n\t\t\tresult = [];\n\t\t\tfor (var style in Element.ShortStyles){\n\t\t\t\tif (property != style) continue;\n\t\t\t\tfor (var s in Element.ShortStyles[style]) result.push(this.getStyle(s));\n\t\t\t\treturn result.join(' ');\n\t\t\t}\n\t\t\tresult = this.getComputedStyle(property);\n\t\t}\n\t\tif (result){\n\t\t\tresult = String(result);\n\t\t\tvar color = result.match(/rgba?\\([\\d\\s,]+\\)/);\n\t\t\tif (color) result = result.replace(color[0], color[0].rgbToHex());\n\t\t}\n\t\tif (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result, 10)))){\n\t\t\tif (property.test(/^(height|width)$/)){\n\t\t\t\tvar values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0;\n\t\t\t\tvalues.each(function(value){\n\t\t\t\t\tsize += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt();\n\t\t\t\t}, this);\n\t\t\t\treturn this['offset' + property.capitalize()] - size + 'px';\n\t\t\t}\n\t\t\tif ((Browser.Engine.presto) && String(result).test('px')) return result;\n\t\t\tif (property.test(/(border(.+)Width|margin|padding)/)) return '0px';\n\t\t}\n\t\treturn result;\n\t},\n\n\tsetStyles: function(styles){\n\t\tfor (var style in styles) this.setStyle(style, styles[style]);\n\t\treturn this;\n\t},\n\n\tgetStyles: function(){\n\t\tvar result = {};\n\t\tArray.flatten(arguments).each(function(key){\n\t\t\tresult[key] = this.getStyle(key);\n\t\t}, this);\n\t\treturn result;\n\t}\n\n});\n\nElement.Styles = new Hash({\n\tleft: '@px', top: '@px', bottom: '@px', right: '@px',\n\twidth: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px',\n\tbackgroundColor: 'rgb(@, @, @)', backgroundPosition: '@px @px', color: 'rgb(@, @, @)',\n\tfontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)',\n\tmargin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)',\n\tborderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)',\n\tzIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@'\n});\n\nElement.ShortStyles = {margin: {}, padding: {}, border: {}, borderWidth: {}, borderStyle: {}, borderColor: {}};\n\n['Top', 'Right', 'Bottom', 'Left'].each(function(direction){\n\tvar Short = Element.ShortStyles;\n\tvar All = Element.Styles;\n\t['margin', 'padding'].each(function(style){\n\t\tvar sd = style + direction;\n\t\tShort[style][sd] = All[sd] = '@px';\n\t});\n\tvar bd = 'border' + direction;\n\tShort.border[bd] = All[bd] = '@px @ rgb(@, @, @)';\n\tvar bdw = bd + 'Width', bds = bd + 'Style', bdc = bd + 'Color';\n\tShort[bd] = {};\n\tShort.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = '@px';\n\tShort.borderStyle[bds] = Short[bd][bds] = All[bds] = '@';\n\tShort.borderColor[bdc] = Short[bd][bdc] = All[bdc] = 'rgb(@, @, @)';\n});\n\n\n/*\n---\n\nscript: Element.Dimensions.js\n\ndescription: Contains methods to work with size, scroll, or positioning of Elements and the window object.\n\nlicense: MIT-style license.\n\ncredits:\n- Element positioning based on the [qooxdoo](http://qooxdoo.org/) code and smart browser fixes, [LGPL License](http://www.gnu.org/licenses/lgpl.html).\n- Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html).\n\nrequires:\n- /Element\n\nprovides: [Element.Dimensions]\n\n...\n*/\n\n(function(){\n\nElement.implement({\n\n\tscrollTo: function(x, y){\n\t\tif (isBody(this)){\n\t\t\tthis.getWindow().scrollTo(x, y);\n\t\t} else {\n\t\t\tthis.scrollLeft = x;\n\t\t\tthis.scrollTop = y;\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetSize: function(){\n\t\tif (isBody(this)) return this.getWindow().getSize();\n\t\treturn {x: this.offsetWidth, y: this.offsetHeight};\n\t},\n\n\tgetScrollSize: function(){\n\t\tif (isBody(this)) return this.getWindow().getScrollSize();\n\t\treturn {x: this.scrollWidth, y: this.scrollHeight};\n\t},\n\n\tgetScroll: function(){\n\t\tif (isBody(this)) return this.getWindow().getScroll();\n\t\treturn {x: this.scrollLeft, y: this.scrollTop};\n\t},\n\n\tgetScrolls: function(){\n\t\tvar element = this, position = {x: 0, y: 0};\n\t\twhile (element && !isBody(element)){\n\t\t\tposition.x += element.scrollLeft;\n\t\t\tposition.y += element.scrollTop;\n\t\t\telement = element.parentNode;\n\t\t}\n\t\treturn position;\n\t},\n\n\tgetOffsetParent: function(){\n\t\tvar element = this;\n\t\tif (isBody(element)) return null;\n\t\tif (!Browser.Engine.trident) return element.offsetParent;\n\t\twhile ((element = element.parentNode) && !isBody(element)){\n\t\t\tif (styleString(element, 'position') != 'static') return element;\n\t\t}\n\t\treturn null;\n\t},\n\n\tgetOffsets: function(){\n\t\tif (this.getBoundingClientRect){\n\t\t\tvar bound = this.getBoundingClientRect(),\n\t\t\t\thtml = document.id(this.getDocument().documentElement),\n\t\t\t\thtmlScroll = html.getScroll(),\n\t\t\t\telemScrolls = this.getScrolls(),\n\t\t\t\telemScroll = this.getScroll(),\n\t\t\t\tisFixed = (styleString(this, 'position') == 'fixed');\n\n\t\t\treturn {\n\t\t\t\tx: bound.left.toInt() + elemScrolls.x - elemScroll.x + ((isFixed) ? 0 : htmlScroll.x) - html.clientLeft,\n\t\t\t\ty: bound.top.toInt()  + elemScrolls.y - elemScroll.y + ((isFixed) ? 0 : htmlScroll.y) - html.clientTop\n\t\t\t};\n\t\t}\n\n\t\tvar element = this, position = {x: 0, y: 0};\n\t\tif (isBody(this)) return position;\n\n\t\twhile (element && !isBody(element)){\n\t\t\tposition.x += element.offsetLeft;\n\t\t\tposition.y += element.offsetTop;\n\n\t\t\tif (Browser.Engine.gecko){\n\t\t\t\tif (!borderBox(element)){\n\t\t\t\t\tposition.x += leftBorder(element);\n\t\t\t\t\tposition.y += topBorder(element);\n\t\t\t\t}\n\t\t\t\tvar parent = element.parentNode;\n\t\t\t\tif (parent && styleString(parent, 'overflow') != 'visible'){\n\t\t\t\t\tposition.x += leftBorder(parent);\n\t\t\t\t\tposition.y += topBorder(parent);\n\t\t\t\t}\n\t\t\t} else if (element != this && Browser.Engine.webkit){\n\t\t\t\tposition.x += leftBorder(element);\n\t\t\t\tposition.y += topBorder(element);\n\t\t\t}\n\n\t\t\telement = element.offsetParent;\n\t\t}\n\t\tif (Browser.Engine.gecko && !borderBox(this)){\n\t\t\tposition.x -= leftBorder(this);\n\t\t\tposition.y -= topBorder(this);\n\t\t}\n\t\treturn position;\n\t},\n\n\tgetPosition: function(relative){\n\t\tif (isBody(this)) return {x: 0, y: 0};\n\t\tvar offset = this.getOffsets(),\n\t\t\t\tscroll = this.getScrolls();\n\t\tvar position = {\n\t\t\tx: offset.x - scroll.x,\n\t\t\ty: offset.y - scroll.y\n\t\t};\n\t\tvar relativePosition = (relative && (relative = document.id(relative))) ? relative.getPosition() : {x: 0, y: 0};\n\t\treturn {x: position.x - relativePosition.x, y: position.y - relativePosition.y};\n\t},\n\n\tgetCoordinates: function(element){\n\t\tif (isBody(this)) return this.getWindow().getCoordinates();\n\t\tvar position = this.getPosition(element),\n\t\t\t\tsize = this.getSize();\n\t\tvar obj = {\n\t\t\tleft: position.x,\n\t\t\ttop: position.y,\n\t\t\twidth: size.x,\n\t\t\theight: size.y\n\t\t};\n\t\tobj.right = obj.left + obj.width;\n\t\tobj.bottom = obj.top + obj.height;\n\t\treturn obj;\n\t},\n\n\tcomputePosition: function(obj){\n\t\treturn {\n\t\t\tleft: obj.x - styleNumber(this, 'margin-left'),\n\t\t\ttop: obj.y - styleNumber(this, 'margin-top')\n\t\t};\n\t},\n\n\tsetPosition: function(obj){\n\t\treturn this.setStyles(this.computePosition(obj));\n\t}\n\n});\n\n\nNative.implement([Document, Window], {\n\n\tgetSize: function(){\n\t\tif (Browser.Engine.presto || Browser.Engine.webkit){\n\t\t\tvar win = this.getWindow();\n\t\t\treturn {x: win.innerWidth, y: win.innerHeight};\n\t\t}\n\t\tvar doc = getCompatElement(this);\n\t\treturn {x: doc.clientWidth, y: doc.clientHeight};\n\t},\n\n\tgetScroll: function(){\n\t\tvar win = this.getWindow(), doc = getCompatElement(this);\n\t\treturn {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop};\n\t},\n\n\tgetScrollSize: function(){\n\t\tvar doc = getCompatElement(this), min = this.getSize();\n\t\treturn {x: Math.max(doc.scrollWidth, min.x), y: Math.max(doc.scrollHeight, min.y)};\n\t},\n\n\tgetPosition: function(){\n\t\treturn {x: 0, y: 0};\n\t},\n\n\tgetCoordinates: function(){\n\t\tvar size = this.getSize();\n\t\treturn {top: 0, left: 0, bottom: size.y, right: size.x, height: size.y, width: size.x};\n\t}\n\n});\n\n// private methods\n\nvar styleString = Element.getComputedStyle;\n\nfunction styleNumber(element, style){\n\treturn styleString(element, style).toInt() || 0;\n};\n\nfunction borderBox(element){\n\treturn styleString(element, '-moz-box-sizing') == 'border-box';\n};\n\nfunction topBorder(element){\n\treturn styleNumber(element, 'border-top-width');\n};\n\nfunction leftBorder(element){\n\treturn styleNumber(element, 'border-left-width');\n};\n\nfunction isBody(element){\n\treturn (/^(?:body|html)$/i).test(element.tagName);\n};\n\nfunction getCompatElement(element){\n\tvar doc = element.getDocument();\n\treturn (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body;\n};\n\n})();\n\n//aliases\nElement.alias('setPosition', 'position'); //compatability\n\nNative.implement([Window, Document, Element], {\n\n\tgetHeight: function(){\n\t\treturn this.getSize().y;\n\t},\n\n\tgetWidth: function(){\n\t\treturn this.getSize().x;\n\t},\n\n\tgetScrollTop: function(){\n\t\treturn this.getScroll().y;\n\t},\n\n\tgetScrollLeft: function(){\n\t\treturn this.getScroll().x;\n\t},\n\n\tgetScrollHeight: function(){\n\t\treturn this.getScrollSize().y;\n\t},\n\n\tgetScrollWidth: function(){\n\t\treturn this.getScrollSize().x;\n\t},\n\n\tgetTop: function(){\n\t\treturn this.getPosition().y;\n\t},\n\n\tgetLeft: function(){\n\t\treturn this.getPosition().x;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Selectors.js\n\ndescription: Adds advanced CSS-style querying capabilities for targeting HTML Elements. Includes pseudo selectors.\n\nlicense: MIT-style license.\n\nrequires:\n- /Element\n\nprovides: [Selectors]\n\n...\n*/\n\nNative.implement([Document, Element], {\n\n\tgetElements: function(expression, nocash){\n\t\texpression = expression.split(',');\n\t\tvar items, local = {};\n\t\tfor (var i = 0, l = expression.length; i < l; i++){\n\t\t\tvar selector = expression[i], elements = Selectors.Utils.search(this, selector, local);\n\t\t\tif (i != 0 && elements.item) elements = $A(elements);\n\t\t\titems = (i == 0) ? elements : (items.item) ? $A(items).concat(elements) : items.concat(elements);\n\t\t}\n\t\treturn new Elements(items, {ddup: (expression.length > 1), cash: !nocash});\n\t}\n\n});\n\nElement.implement({\n\n\tmatch: function(selector){\n\t\tif (!selector || (selector == this)) return true;\n\t\tvar tagid = Selectors.Utils.parseTagAndID(selector);\n\t\tvar tag = tagid[0], id = tagid[1];\n\t\tif (!Selectors.Filters.byID(this, id) || !Selectors.Filters.byTag(this, tag)) return false;\n\t\tvar parsed = Selectors.Utils.parseSelector(selector);\n\t\treturn (parsed) ? Selectors.Utils.filter(this, parsed, {}) : true;\n\t}\n\n});\n\nvar Selectors = {Cache: {nth: {}, parsed: {}}};\n\nSelectors.RegExps = {\n\tid: (/#([\\w-]+)/),\n\ttag: (/^(\\w+|\\*)/),\n\tquick: (/^(\\w+|\\*)$/),\n\tsplitter: (/\\s*([+>~\\s])\\s*([a-zA-Z#.*:\\[])/g),\n\tcombined: (/\\.([\\w-]+)|\\[(\\w+)(?:([!*^$~|]?=)([\"']?)([^\\4]*?)\\4)?\\]|:([\\w-]+)(?:\\([\"']?(.*?)?[\"']?\\)|$)/g)\n};\n\nSelectors.Utils = {\n\n\tchk: function(item, uniques){\n\t\tif (!uniques) return true;\n\t\tvar uid = $uid(item);\n\t\tif (!uniques[uid]) return uniques[uid] = true;\n\t\treturn false;\n\t},\n\n\tparseNthArgument: function(argument){\n\t\tif (Selectors.Cache.nth[argument]) return Selectors.Cache.nth[argument];\n\t\tvar parsed = argument.match(/^([+-]?\\d*)?([a-z]+)?([+-]?\\d*)?$/);\n\t\tif (!parsed) return false;\n\t\tvar inta = parseInt(parsed[1], 10);\n\t\tvar a = (inta || inta === 0) ? inta : 1;\n\t\tvar special = parsed[2] || false;\n\t\tvar b = parseInt(parsed[3], 10) || 0;\n\t\tif (a != 0){\n\t\t\tb--;\n\t\t\twhile (b < 1) b += a;\n\t\t\twhile (b >= a) b -= a;\n\t\t} else {\n\t\t\ta = b;\n\t\t\tspecial = 'index';\n\t\t}\n\t\tswitch (special){\n\t\t\tcase 'n': parsed = {a: a, b: b, special: 'n'}; break;\n\t\t\tcase 'odd': parsed = {a: 2, b: 0, special: 'n'}; break;\n\t\t\tcase 'even': parsed = {a: 2, b: 1, special: 'n'}; break;\n\t\t\tcase 'first': parsed = {a: 0, special: 'index'}; break;\n\t\t\tcase 'last': parsed = {special: 'last-child'}; break;\n\t\t\tcase 'only': parsed = {special: 'only-child'}; break;\n\t\t\tdefault: parsed = {a: (a - 1), special: 'index'};\n\t\t}\n\n\t\treturn Selectors.Cache.nth[argument] = parsed;\n\t},\n\n\tparseSelector: function(selector){\n\t\tif (Selectors.Cache.parsed[selector]) return Selectors.Cache.parsed[selector];\n\t\tvar m, parsed = {classes: [], pseudos: [], attributes: []};\n\t\twhile ((m = Selectors.RegExps.combined.exec(selector))){\n\t\t\tvar cn = m[1], an = m[2], ao = m[3], av = m[5], pn = m[6], pa = m[7];\n\t\t\tif (cn){\n\t\t\t\tparsed.classes.push(cn);\n\t\t\t} else if (pn){\n\t\t\t\tvar parser = Selectors.Pseudo.get(pn);\n\t\t\t\tif (parser) parsed.pseudos.push({parser: parser, argument: pa});\n\t\t\t\telse parsed.attributes.push({name: pn, operator: '=', value: pa});\n\t\t\t} else if (an){\n\t\t\t\tparsed.attributes.push({name: an, operator: ao, value: av});\n\t\t\t}\n\t\t}\n\t\tif (!parsed.classes.length) delete parsed.classes;\n\t\tif (!parsed.attributes.length) delete parsed.attributes;\n\t\tif (!parsed.pseudos.length) delete parsed.pseudos;\n\t\tif (!parsed.classes && !parsed.attributes && !parsed.pseudos) parsed = null;\n\t\treturn Selectors.Cache.parsed[selector] = parsed;\n\t},\n\n\tparseTagAndID: function(selector){\n\t\tvar tag = selector.match(Selectors.RegExps.tag);\n\t\tvar id = selector.match(Selectors.RegExps.id);\n\t\treturn [(tag) ? tag[1] : '*', (id) ? id[1] : false];\n\t},\n\n\tfilter: function(item, parsed, local){\n\t\tvar i;\n\t\tif (parsed.classes){\n\t\t\tfor (i = parsed.classes.length; i--; i){\n\t\t\t\tvar cn = parsed.classes[i];\n\t\t\t\tif (!Selectors.Filters.byClass(item, cn)) return false;\n\t\t\t}\n\t\t}\n\t\tif (parsed.attributes){\n\t\t\tfor (i = parsed.attributes.length; i--; i){\n\t\t\t\tvar att = parsed.attributes[i];\n\t\t\t\tif (!Selectors.Filters.byAttribute(item, att.name, att.operator, att.value)) return false;\n\t\t\t}\n\t\t}\n\t\tif (parsed.pseudos){\n\t\t\tfor (i = parsed.pseudos.length; i--; i){\n\t\t\t\tvar psd = parsed.pseudos[i];\n\t\t\t\tif (!Selectors.Filters.byPseudo(item, psd.parser, psd.argument, local)) return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\tgetByTagAndID: function(ctx, tag, id){\n\t\tif (id){\n\t\t\tvar item = (ctx.getElementById) ? ctx.getElementById(id, true) : Element.getElementById(ctx, id, true);\n\t\t\treturn (item && Selectors.Filters.byTag(item, tag)) ? [item] : [];\n\t\t} else {\n\t\t\treturn ctx.getElementsByTagName(tag);\n\t\t}\n\t},\n\n\tsearch: function(self, expression, local){\n\t\tvar splitters = [];\n\n\t\tvar selectors = expression.trim().replace(Selectors.RegExps.splitter, function(m0, m1, m2){\n\t\t\tsplitters.push(m1);\n\t\t\treturn ':)' + m2;\n\t\t}).split(':)');\n\n\t\tvar items, filtered, item;\n\n\t\tfor (var i = 0, l = selectors.length; i < l; i++){\n\n\t\t\tvar selector = selectors[i];\n\n\t\t\tif (i == 0 && Selectors.RegExps.quick.test(selector)){\n\t\t\t\titems = self.getElementsByTagName(selector);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar splitter = splitters[i - 1];\n\n\t\t\tvar tagid = Selectors.Utils.parseTagAndID(selector);\n\t\t\tvar tag = tagid[0], id = tagid[1];\n\n\t\t\tif (i == 0){\n\t\t\t\titems = Selectors.Utils.getByTagAndID(self, tag, id);\n\t\t\t} else {\n\t\t\t\tvar uniques = {}, found = [];\n\t\t\t\tfor (var j = 0, k = items.length; j < k; j++) found = Selectors.Getters[splitter](found, items[j], tag, id, uniques);\n\t\t\t\titems = found;\n\t\t\t}\n\n\t\t\tvar parsed = Selectors.Utils.parseSelector(selector);\n\n\t\t\tif (parsed){\n\t\t\t\tfiltered = [];\n\t\t\t\tfor (var m = 0, n = items.length; m < n; m++){\n\t\t\t\t\titem = items[m];\n\t\t\t\t\tif (Selectors.Utils.filter(item, parsed, local)) filtered.push(item);\n\t\t\t\t}\n\t\t\t\titems = filtered;\n\t\t\t}\n\n\t\t}\n\n\t\treturn items;\n\n\t}\n\n};\n\nSelectors.Getters = {\n\n\t' ': function(found, self, tag, id, uniques){\n\t\tvar items = Selectors.Utils.getByTagAndID(self, tag, id);\n\t\tfor (var i = 0, l = items.length; i < l; i++){\n\t\t\tvar item = items[i];\n\t\t\tif (Selectors.Utils.chk(item, uniques)) found.push(item);\n\t\t}\n\t\treturn found;\n\t},\n\n\t'>': function(found, self, tag, id, uniques){\n\t\tvar children = Selectors.Utils.getByTagAndID(self, tag, id);\n\t\tfor (var i = 0, l = children.length; i < l; i++){\n\t\t\tvar child = children[i];\n\t\t\tif (child.parentNode == self && Selectors.Utils.chk(child, uniques)) found.push(child);\n\t\t}\n\t\treturn found;\n\t},\n\n\t'+': function(found, self, tag, id, uniques){\n\t\twhile ((self = self.nextSibling)){\n\t\t\tif (self.nodeType == 1){\n\t\t\t\tif (Selectors.Utils.chk(self, uniques) && Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t},\n\n\t'~': function(found, self, tag, id, uniques){\n\t\twhile ((self = self.nextSibling)){\n\t\t\tif (self.nodeType == 1){\n\t\t\t\tif (!Selectors.Utils.chk(self, uniques)) break;\n\t\t\t\tif (Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self);\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}\n\n};\n\nSelectors.Filters = {\n\n\tbyTag: function(self, tag){\n\t\treturn (tag == '*' || (self.tagName && self.tagName.toLowerCase() == tag));\n\t},\n\n\tbyID: function(self, id){\n\t\treturn (!id || (self.id && self.id == id));\n\t},\n\n\tbyClass: function(self, klass){\n\t\treturn (self.className && self.className.contains && self.className.contains(klass, ' '));\n\t},\n\n\tbyPseudo: function(self, parser, argument, local){\n\t\treturn parser.call(self, argument, local);\n\t},\n\n\tbyAttribute: function(self, name, operator, value){\n\t\tvar result = Element.prototype.getProperty.call(self, name);\n\t\tif (!result) return (operator == '!=');\n\t\tif (!operator || value == undefined) return true;\n\t\tswitch (operator){\n\t\t\tcase '=': return (result == value);\n\t\t\tcase '*=': return (result.contains(value));\n\t\t\tcase '^=': return (result.substr(0, value.length) == value);\n\t\t\tcase '$=': return (result.substr(result.length - value.length) == value);\n\t\t\tcase '!=': return (result != value);\n\t\t\tcase '~=': return result.contains(value, ' ');\n\t\t\tcase '|=': return result.contains(value, '-');\n\t\t}\n\t\treturn false;\n\t}\n\n};\n\nSelectors.Pseudo = new Hash({\n\n\t// w3c pseudo selectors\n\n\tchecked: function(){\n\t\treturn this.checked;\n\t},\n\t\n\tempty: function(){\n\t\treturn !(this.innerText || this.textContent || '').length;\n\t},\n\n\tnot: function(selector){\n\t\treturn !Element.match(this, selector);\n\t},\n\n\tcontains: function(text){\n\t\treturn (this.innerText || this.textContent || '').contains(text);\n\t},\n\n\t'first-child': function(){\n\t\treturn Selectors.Pseudo.index.call(this, 0);\n\t},\n\n\t'last-child': function(){\n\t\tvar element = this;\n\t\twhile ((element = element.nextSibling)){\n\t\t\tif (element.nodeType == 1) return false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t'only-child': function(){\n\t\tvar prev = this;\n\t\twhile ((prev = prev.previousSibling)){\n\t\t\tif (prev.nodeType == 1) return false;\n\t\t}\n\t\tvar next = this;\n\t\twhile ((next = next.nextSibling)){\n\t\t\tif (next.nodeType == 1) return false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t'nth-child': function(argument, local){\n\t\targument = (argument == undefined) ? 'n' : argument;\n\t\tvar parsed = Selectors.Utils.parseNthArgument(argument);\n\t\tif (parsed.special != 'n') return Selectors.Pseudo[parsed.special].call(this, parsed.a, local);\n\t\tvar count = 0;\n\t\tlocal.positions = local.positions || {};\n\t\tvar uid = $uid(this);\n\t\tif (!local.positions[uid]){\n\t\t\tvar self = this;\n\t\t\twhile ((self = self.previousSibling)){\n\t\t\t\tif (self.nodeType != 1) continue;\n\t\t\t\tcount ++;\n\t\t\t\tvar position = local.positions[$uid(self)];\n\t\t\t\tif (position != undefined){\n\t\t\t\t\tcount = position + count;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal.positions[uid] = count;\n\t\t}\n\t\treturn (local.positions[uid] % parsed.a == parsed.b);\n\t},\n\n\t// custom pseudo selectors\n\n\tindex: function(index){\n\t\tvar element = this, count = 0;\n\t\twhile ((element = element.previousSibling)){\n\t\t\tif (element.nodeType == 1 && ++count > index) return false;\n\t\t}\n\t\treturn (count == index);\n\t},\n\n\teven: function(argument, local){\n\t\treturn Selectors.Pseudo['nth-child'].call(this, '2n+1', local);\n\t},\n\n\todd: function(argument, local){\n\t\treturn Selectors.Pseudo['nth-child'].call(this, '2n', local);\n\t},\n\t\n\tselected: function(){\n\t\treturn this.selected;\n\t},\n\t\n\tenabled: function(){\n\t\treturn (this.disabled === false);\n\t}\n\n});\n\n\n/*\n---\n\nscript: DomReady.js\n\ndescription: Contains the custom event domready.\n\nlicense: MIT-style license.\n\nrequires:\n- /Element.Event\n\nprovides: [DomReady]\n\n...\n*/\n\nElement.Events.domready = {\n\n\tonAdd: function(fn){\n\t\tif (Browser.loaded) fn.call(this);\n\t}\n\n};\n\n(function(){\n\n\tvar domready = function(){\n\t\tif (Browser.loaded) return;\n\t\tBrowser.loaded = true;\n\t\twindow.fireEvent('domready');\n\t\tdocument.fireEvent('domready');\n\t};\n\t\n\twindow.addEvent('load', domready);\n\n\tif (Browser.Engine.trident){\n\t\tvar temp = document.createElement('div');\n\t\t(function(){\n\t\t\t($try(function(){\n\t\t\t\ttemp.doScroll(); // Technique by Diego Perini\n\t\t\t\treturn document.id(temp).inject(document.body).set('html', 'temp').dispose();\n\t\t\t})) ? domready() : arguments.callee.delay(50);\n\t\t})();\n\t} else if (Browser.Engine.webkit && Browser.Engine.version < 525){\n\t\t(function(){\n\t\t\t(['loaded', 'complete'].contains(document.readyState)) ? domready() : arguments.callee.delay(50);\n\t\t})();\n\t} else {\n\t\tdocument.addEvent('DOMContentLoaded', domready);\n\t}\n\n})();\n\n\n/*\n---\n\nscript: JSON.js\n\ndescription: JSON encoder and decoder.\n\nlicense: MIT-style license.\n\nSee Also: <http://www.json.org/>\n\nrequires:\n- /Array\n- /String\n- /Number\n- /Function\n- /Hash\n\nprovides: [JSON]\n\n...\n*/\n\nvar JSON = new Hash(this.JSON && {\n\tstringify: JSON.stringify,\n\tparse: JSON.parse\n}).extend({\n\t\n\t$specialChars: {'\\b': '\\\\b', '\\t': '\\\\t', '\\n': '\\\\n', '\\f': '\\\\f', '\\r': '\\\\r', '\"' : '\\\\\"', '\\\\': '\\\\\\\\'},\n\n\t$replaceChars: function(chr){\n\t\treturn JSON.$specialChars[chr] || '\\\\u00' + Math.floor(chr.charCodeAt() / 16).toString(16) + (chr.charCodeAt() % 16).toString(16);\n\t},\n\n\tencode: function(obj){\n\t\tswitch ($type(obj)){\n\t\t\tcase 'string':\n\t\t\t\treturn '\"' + obj.replace(/[\\x00-\\x1f\\\\\"]/g, JSON.$replaceChars) + '\"';\n\t\t\tcase 'array':\n\t\t\t\treturn '[' + String(obj.map(JSON.encode).clean()) + ']';\n\t\t\tcase 'object': case 'hash':\n\t\t\t\tvar string = [];\n\t\t\t\tHash.each(obj, function(value, key){\n\t\t\t\t\tvar json = JSON.encode(value);\n\t\t\t\t\tif (json) string.push(JSON.encode(key) + ':' + json);\n\t\t\t\t});\n\t\t\t\treturn '{' + string + '}';\n\t\t\tcase 'number': case 'boolean': return String(obj);\n\t\t\tcase false: return 'null';\n\t\t}\n\t\treturn null;\n\t},\n\n\tdecode: function(string, secure){\n\t\tif ($type(string) != 'string' || !string.length) return null;\n\t\tif (secure && !(/^[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]*$/).test(string.replace(/\\\\./g, '@').replace(/\"[^\"\\\\\\n\\r]*\"/g, ''))) return null;\n\t\treturn eval('(' + string + ')');\n\t}\n\n});\n\nNative.implement([Hash, Array, String, Number], {\n\n\ttoJSON: function(){\n\t\treturn JSON.encode(this);\n\t}\n\n});\n\n\n/*\n---\n\nscript: Cookie.js\n\ndescription: Class for creating, reading, and deleting browser Cookies.\n\nlicense: MIT-style license.\n\ncredits:\n- Based on the functions by Peter-Paul Koch (http://quirksmode.org).\n\nrequires:\n- /Options\n\nprovides: [Cookie]\n\n...\n*/\n\nvar Cookie = new Class({\n\n\tImplements: Options,\n\n\toptions: {\n\t\tpath: false,\n\t\tdomain: false,\n\t\tduration: false,\n\t\tsecure: false,\n\t\tdocument: document\n\t},\n\n\tinitialize: function(key, options){\n\t\tthis.key = key;\n\t\tthis.setOptions(options);\n\t},\n\n\twrite: function(value){\n\t\tvalue = encodeURIComponent(value);\n\t\tif (this.options.domain) value += '; domain=' + this.options.domain;\n\t\tif (this.options.path) value += '; path=' + this.options.path;\n\t\tif (this.options.duration){\n\t\t\tvar date = new Date();\n\t\t\tdate.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000);\n\t\t\tvalue += '; expires=' + date.toGMTString();\n\t\t}\n\t\tif (this.options.secure) value += '; secure';\n\t\tthis.options.document.cookie = this.key + '=' + value;\n\t\treturn this;\n\t},\n\n\tread: function(){\n\t\tvar value = this.options.document.cookie.match('(?:^|;)\\\\s*' + this.key.escapeRegExp() + '=([^;]*)');\n\t\treturn (value) ? decodeURIComponent(value[1]) : null;\n\t},\n\n\tdispose: function(){\n\t\tnew Cookie(this.key, $merge(this.options, {duration: -1})).write('');\n\t\treturn this;\n\t}\n\n});\n\nCookie.write = function(key, value, options){\n\treturn new Cookie(key, options).write(value);\n};\n\nCookie.read = function(key){\n\treturn new Cookie(key).read();\n};\n\nCookie.dispose = function(key, options){\n\treturn new Cookie(key, options).dispose();\n};\n\n\n/*\n---\n\nscript: Swiff.js\n\ndescription: Wrapper for embedding SWF movies. Supports External Interface Communication.\n\nlicense: MIT-style license.\n\ncredits: \n- Flash detection & Internet Explorer + Flash Player 9 fix inspired by SWFObject.\n\nrequires:\n- /Options\n- /$util\n\nprovides: [Swiff]\n\n...\n*/\n\nvar Swiff = new Class({\n\n\tImplements: [Options],\n\n\toptions: {\n\t\tid: null,\n\t\theight: 1,\n\t\twidth: 1,\n\t\tcontainer: null,\n\t\tproperties: {},\n\t\tparams: {\n\t\t\tquality: 'high',\n\t\t\tallowScriptAccess: 'always',\n\t\t\twMode: 'transparent',\n\t\t\tswLiveConnect: true\n\t\t},\n\t\tcallBacks: {},\n\t\tvars: {}\n\t},\n\n\ttoElement: function(){\n\t\treturn this.object;\n\t},\n\n\tinitialize: function(path, options){\n\t\tthis.instance = 'Swiff_' + $time();\n\n\t\tthis.setOptions(options);\n\t\toptions = this.options;\n\t\tvar id = this.id = options.id || this.instance;\n\t\tvar container = document.id(options.container);\n\n\t\tSwiff.CallBacks[this.instance] = {};\n\n\t\tvar params = options.params, vars = options.vars, callBacks = options.callBacks;\n\t\tvar properties = $extend({height: options.height, width: options.width}, options.properties);\n\n\t\tvar self = this;\n\n\t\tfor (var callBack in callBacks){\n\t\t\tSwiff.CallBacks[this.instance][callBack] = (function(option){\n\t\t\t\treturn function(){\n\t\t\t\t\treturn option.apply(self.object, arguments);\n\t\t\t\t};\n\t\t\t})(callBacks[callBack]);\n\t\t\tvars[callBack] = 'Swiff.CallBacks.' + this.instance + '.' + callBack;\n\t\t}\n\n\t\tparams.flashVars = Hash.toQueryString(vars);\n\t\tif (Browser.Engine.trident){\n\t\t\tproperties.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';\n\t\t\tparams.movie = path;\n\t\t} else {\n\t\t\tproperties.type = 'application/x-shockwave-flash';\n\t\t\tproperties.data = path;\n\t\t}\n\t\tvar build = '<object id=\"' + id + '\"';\n\t\tfor (var property in properties) build += ' ' + property + '=\"' + properties[property] + '\"';\n\t\tbuild += '>';\n\t\tfor (var param in params){\n\t\t\tif (params[param]) build += '<param name=\"' + param + '\" value=\"' + params[param] + '\" />';\n\t\t}\n\t\tbuild += '</object>';\n\t\tthis.object = ((container) ? container.empty() : new Element('div')).set('html', build).firstChild;\n\t},\n\n\treplaces: function(element){\n\t\telement = document.id(element, true);\n\t\telement.parentNode.replaceChild(this.toElement(), element);\n\t\treturn this;\n\t},\n\n\tinject: function(element){\n\t\tdocument.id(element, true).appendChild(this.toElement());\n\t\treturn this;\n\t},\n\n\tremote: function(){\n\t\treturn Swiff.remote.apply(Swiff, [this.toElement()].extend(arguments));\n\t}\n\n});\n\nSwiff.CallBacks = {};\n\nSwiff.remote = function(obj, fn){\n\tvar rs = obj.CallFunction('<invoke name=\"' + fn + '\" returntype=\"javascript\">' + __flash__argumentsToXML(arguments, 2) + '</invoke>');\n\treturn eval(rs);\n};\n\n\n/*\n---\n\nscript: Fx.js\n\ndescription: Contains the basic animation logic to be extended by all other Fx Classes.\n\nlicense: MIT-style license.\n\nrequires:\n- /Chain\n- /Events\n- /Options\n\nprovides: [Fx]\n\n...\n*/\n\nvar Fx = new Class({\n\n\tImplements: [Chain, Events, Options],\n\n\toptions: {\n\t\t/*\n\t\tonStart: $empty,\n\t\tonCancel: $empty,\n\t\tonComplete: $empty,\n\t\t*/\n\t\tfps: 50,\n\t\tunit: false,\n\t\tduration: 500,\n\t\tlink: 'ignore'\n\t},\n\n\tinitialize: function(options){\n\t\tthis.subject = this.subject || this;\n\t\tthis.setOptions(options);\n\t\tthis.options.duration = Fx.Durations[this.options.duration] || this.options.duration.toInt();\n\t\tvar wait = this.options.wait;\n\t\tif (wait === false) this.options.link = 'cancel';\n\t},\n\n\tgetTransition: function(){\n\t\treturn function(p){\n\t\t\treturn -(Math.cos(Math.PI * p) - 1) / 2;\n\t\t};\n\t},\n\n\tstep: function(){\n\t\tvar time = $time();\n\t\tif (time < this.time + this.options.duration){\n\t\t\tvar delta = this.transition((time - this.time) / this.options.duration);\n\t\t\tthis.set(this.compute(this.from, this.to, delta));\n\t\t} else {\n\t\t\tthis.set(this.compute(this.from, this.to, 1));\n\t\t\tthis.complete();\n\t\t}\n\t},\n\n\tset: function(now){\n\t\treturn now;\n\t},\n\n\tcompute: function(from, to, delta){\n\t\treturn Fx.compute(from, to, delta);\n\t},\n\n\tcheck: function(){\n\t\tif (!this.timer) return true;\n\t\tswitch (this.options.link){\n\t\t\tcase 'cancel': this.cancel(); return true;\n\t\t\tcase 'chain': this.chain(this.caller.bind(this, arguments)); return false;\n\t\t}\n\t\treturn false;\n\t},\n\n\tstart: function(from, to){\n\t\tif (!this.check(from, to)) return this;\n\t\tthis.from = from;\n\t\tthis.to = to;\n\t\tthis.time = 0;\n\t\tthis.transition = this.getTransition();\n\t\tthis.startTimer();\n\t\tthis.onStart();\n\t\treturn this;\n\t},\n\n\tcomplete: function(){\n\t\tif (this.stopTimer()) this.onComplete();\n\t\treturn this;\n\t},\n\n\tcancel: function(){\n\t\tif (this.stopTimer()) this.onCancel();\n\t\treturn this;\n\t},\n\n\tonStart: function(){\n\t\tthis.fireEvent('start', this.subject);\n\t},\n\n\tonComplete: function(){\n\t\tthis.fireEvent('complete', this.subject);\n\t\tif (!this.callChain()) this.fireEvent('chainComplete', this.subject);\n\t},\n\n\tonCancel: function(){\n\t\tthis.fireEvent('cancel', this.subject).clearChain();\n\t},\n\n\tpause: function(){\n\t\tthis.stopTimer();\n\t\treturn this;\n\t},\n\n\tresume: function(){\n\t\tthis.startTimer();\n\t\treturn this;\n\t},\n\n\tstopTimer: function(){\n\t\tif (!this.timer) return false;\n\t\tthis.time = $time() - this.time;\n\t\tthis.timer = $clear(this.timer);\n\t\treturn true;\n\t},\n\n\tstartTimer: function(){\n\t\tif (this.timer) return false;\n\t\tthis.time = $time() - this.time;\n\t\tthis.timer = this.step.periodical(Math.round(1000 / this.options.fps), this);\n\t\treturn true;\n\t}\n\n});\n\nFx.compute = function(from, to, delta){\n\treturn (to - from) * delta + from;\n};\n\nFx.Durations = {'short': 250, 'normal': 500, 'long': 1000};\n\n\n/*\n---\n\nscript: Fx.CSS.js\n\ndescription: Contains the CSS animation logic. Used by Fx.Tween, Fx.Morph, Fx.Elements.\n\nlicense: MIT-style license.\n\nrequires:\n- /Fx\n- /Element.Style\n\nprovides: [Fx.CSS]\n\n...\n*/\n\nFx.CSS = new Class({\n\n\tExtends: Fx,\n\n\t//prepares the base from/to object\n\n\tprepare: function(element, property, values){\n\t\tvalues = $splat(values);\n\t\tvar values1 = values[1];\n\t\tif (!$chk(values1)){\n\t\t\tvalues[1] = values[0];\n\t\t\tvalues[0] = element.getStyle(property);\n\t\t}\n\t\tvar parsed = values.map(this.parse);\n\t\treturn {from: parsed[0], to: parsed[1]};\n\t},\n\n\t//parses a value into an array\n\n\tparse: function(value){\n\t\tvalue = $lambda(value)();\n\t\tvalue = (typeof value == 'string') ? value.split(' ') : $splat(value);\n\t\treturn value.map(function(val){\n\t\t\tval = String(val);\n\t\t\tvar found = false;\n\t\t\tFx.CSS.Parsers.each(function(parser, key){\n\t\t\t\tif (found) return;\n\t\t\t\tvar parsed = parser.parse(val);\n\t\t\t\tif ($chk(parsed)) found = {value: parsed, parser: parser};\n\t\t\t});\n\t\t\tfound = found || {value: val, parser: Fx.CSS.Parsers.String};\n\t\t\treturn found;\n\t\t});\n\t},\n\n\t//computes by a from and to prepared objects, using their parsers.\n\n\tcompute: function(from, to, delta){\n\t\tvar computed = [];\n\t\t(Math.min(from.length, to.length)).times(function(i){\n\t\t\tcomputed.push({value: from[i].parser.compute(from[i].value, to[i].value, delta), parser: from[i].parser});\n\t\t});\n\t\tcomputed.$family = {name: 'fx:css:value'};\n\t\treturn computed;\n\t},\n\n\t//serves the value as settable\n\n\tserve: function(value, unit){\n\t\tif ($type(value) != 'fx:css:value') value = this.parse(value);\n\t\tvar returned = [];\n\t\tvalue.each(function(bit){\n\t\t\treturned = returned.concat(bit.parser.serve(bit.value, unit));\n\t\t});\n\t\treturn returned;\n\t},\n\n\t//renders the change to an element\n\n\trender: function(element, property, value, unit){\n\t\telement.setStyle(property, this.serve(value, unit));\n\t},\n\n\t//searches inside the page css to find the values for a selector\n\n\tsearch: function(selector){\n\t\tif (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector];\n\t\tvar to = {};\n\t\tArray.each(document.styleSheets, function(sheet, j){\n\t\t\tvar href = sheet.href;\n\t\t\tif (href && href.contains('://') && !href.contains(document.domain)) return;\n\t\t\tvar rules = sheet.rules || sheet.cssRules;\n\t\t\tArray.each(rules, function(rule, i){\n\t\t\t\tif (!rule.style) return;\n\t\t\t\tvar selectorText = (rule.selectorText) ? rule.selectorText.replace(/^\\w+/, function(m){\n\t\t\t\t\treturn m.toLowerCase();\n\t\t\t\t}) : null;\n\t\t\t\tif (!selectorText || !selectorText.test('^' + selector + '$')) return;\n\t\t\t\tElement.Styles.each(function(value, style){\n\t\t\t\t\tif (!rule.style[style] || Element.ShortStyles[style]) return;\n\t\t\t\t\tvalue = String(rule.style[style]);\n\t\t\t\t\tto[style] = (value.test(/^rgb/)) ? value.rgbToHex() : value;\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\treturn Fx.CSS.Cache[selector] = to;\n\t}\n\n});\n\nFx.CSS.Cache = {};\n\nFx.CSS.Parsers = new Hash({\n\n\tColor: {\n\t\tparse: function(value){\n\t\t\tif (value.match(/^#[0-9a-f]{3,6}$/i)) return value.hexToRgb(true);\n\t\t\treturn ((value = value.match(/(\\d+),\\s*(\\d+),\\s*(\\d+)/))) ? [value[1], value[2], value[3]] : false;\n\t\t},\n\t\tcompute: function(from, to, delta){\n\t\t\treturn from.map(function(value, i){\n\t\t\t\treturn Math.round(Fx.compute(from[i], to[i], delta));\n\t\t\t});\n\t\t},\n\t\tserve: function(value){\n\t\t\treturn value.map(Number);\n\t\t}\n\t},\n\n\tNumber: {\n\t\tparse: parseFloat,\n\t\tcompute: Fx.compute,\n\t\tserve: function(value, unit){\n\t\t\treturn (unit) ? value + unit : value;\n\t\t}\n\t},\n\n\tString: {\n\t\tparse: $lambda(false),\n\t\tcompute: $arguments(1),\n\t\tserve: $arguments(0)\n\t}\n\n});\n\n\n/*\n---\n\nscript: Fx.Tween.js\n\ndescription: Formerly Fx.Style, effect to transition any CSS property for an element.\n\nlicense: MIT-style license.\n\nrequires: \n- /Fx.CSS\n\nprovides: [Fx.Tween, Element.fade, Element.highlight]\n\n...\n*/\n\nFx.Tween = new Class({\n\n\tExtends: Fx.CSS,\n\n\tinitialize: function(element, options){\n\t\tthis.element = this.subject = document.id(element);\n\t\tthis.parent(options);\n\t},\n\n\tset: function(property, now){\n\t\tif (arguments.length == 1){\n\t\t\tnow = property;\n\t\t\tproperty = this.property || this.options.property;\n\t\t}\n\t\tthis.render(this.element, property, now, this.options.unit);\n\t\treturn this;\n\t},\n\n\tstart: function(property, from, to){\n\t\tif (!this.check(property, from, to)) return this;\n\t\tvar args = Array.flatten(arguments);\n\t\tthis.property = this.options.property || args.shift();\n\t\tvar parsed = this.prepare(this.element, this.property, args);\n\t\treturn this.parent(parsed.from, parsed.to);\n\t}\n\n});\n\nElement.Properties.tween = {\n\n\tset: function(options){\n\t\tvar tween = this.retrieve('tween');\n\t\tif (tween) tween.cancel();\n\t\treturn this.eliminate('tween').store('tween:options', $extend({link: 'cancel'}, options));\n\t},\n\n\tget: function(options){\n\t\tif (options || !this.retrieve('tween')){\n\t\t\tif (options || !this.retrieve('tween:options')) this.set('tween', options);\n\t\t\tthis.store('tween', new Fx.Tween(this, this.retrieve('tween:options')));\n\t\t}\n\t\treturn this.retrieve('tween');\n\t}\n\n};\n\nElement.implement({\n\n\ttween: function(property, from, to){\n\t\tthis.get('tween').start(arguments);\n\t\treturn this;\n\t},\n\n\tfade: function(how){\n\t\tvar fade = this.get('tween'), o = 'opacity', toggle;\n\t\thow = $pick(how, 'toggle');\n\t\tswitch (how){\n\t\t\tcase 'in': fade.start(o, 1); break;\n\t\t\tcase 'out': fade.start(o, 0); break;\n\t\t\tcase 'show': fade.set(o, 1); break;\n\t\t\tcase 'hide': fade.set(o, 0); break;\n\t\t\tcase 'toggle':\n\t\t\t\tvar flag = this.retrieve('fade:flag', this.get('opacity') == 1);\n\t\t\t\tfade.start(o, (flag) ? 0 : 1);\n\t\t\t\tthis.store('fade:flag', !flag);\n\t\t\t\ttoggle = true;\n\t\t\tbreak;\n\t\t\tdefault: fade.start(o, arguments);\n\t\t}\n\t\tif (!toggle) this.eliminate('fade:flag');\n\t\treturn this;\n\t},\n\n\thighlight: function(start, end){\n\t\tif (!end){\n\t\t\tend = this.retrieve('highlight:original', this.getStyle('background-color'));\n\t\t\tend = (end == 'transparent') ? '#fff' : end;\n\t\t}\n\t\tvar tween = this.get('tween');\n\t\ttween.start('background-color', start || '#ffff88', end).chain(function(){\n\t\t\tthis.setStyle('background-color', this.retrieve('highlight:original'));\n\t\t\ttween.callChain();\n\t\t}.bind(this));\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Fx.Morph.js\n\ndescription: Formerly Fx.Styles, effect to transition any number of CSS properties for an element using an object of rules, or CSS based selector rules.\n\nlicense: MIT-style license.\n\nrequires:\n- /Fx.CSS\n\nprovides: [Fx.Morph]\n\n...\n*/\n\nFx.Morph = new Class({\n\n\tExtends: Fx.CSS,\n\n\tinitialize: function(element, options){\n\t\tthis.element = this.subject = document.id(element);\n\t\tthis.parent(options);\n\t},\n\n\tset: function(now){\n\t\tif (typeof now == 'string') now = this.search(now);\n\t\tfor (var p in now) this.render(this.element, p, now[p], this.options.unit);\n\t\treturn this;\n\t},\n\n\tcompute: function(from, to, delta){\n\t\tvar now = {};\n\t\tfor (var p in from) now[p] = this.parent(from[p], to[p], delta);\n\t\treturn now;\n\t},\n\n\tstart: function(properties){\n\t\tif (!this.check(properties)) return this;\n\t\tif (typeof properties == 'string') properties = this.search(properties);\n\t\tvar from = {}, to = {};\n\t\tfor (var p in properties){\n\t\t\tvar parsed = this.prepare(this.element, p, properties[p]);\n\t\t\tfrom[p] = parsed.from;\n\t\t\tto[p] = parsed.to;\n\t\t}\n\t\treturn this.parent(from, to);\n\t}\n\n});\n\nElement.Properties.morph = {\n\n\tset: function(options){\n\t\tvar morph = this.retrieve('morph');\n\t\tif (morph) morph.cancel();\n\t\treturn this.eliminate('morph').store('morph:options', $extend({link: 'cancel'}, options));\n\t},\n\n\tget: function(options){\n\t\tif (options || !this.retrieve('morph')){\n\t\t\tif (options || !this.retrieve('morph:options')) this.set('morph', options);\n\t\t\tthis.store('morph', new Fx.Morph(this, this.retrieve('morph:options')));\n\t\t}\n\t\treturn this.retrieve('morph');\n\t}\n\n};\n\nElement.implement({\n\n\tmorph: function(props){\n\t\tthis.get('morph').start(props);\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Fx.Transitions.js\n\ndescription: Contains a set of advanced transitions to be used with any of the Fx Classes.\n\nlicense: MIT-style license.\n\ncredits:\n- Easing Equations by Robert Penner, <http://www.robertpenner.com/easing/>, modified and optimized to be used with MooTools.\n\nrequires:\n- /Fx\n\nprovides: [Fx.Transitions]\n\n...\n*/\n\nFx.implement({\n\n\tgetTransition: function(){\n\t\tvar trans = this.options.transition || Fx.Transitions.Sine.easeInOut;\n\t\tif (typeof trans == 'string'){\n\t\t\tvar data = trans.split(':');\n\t\t\ttrans = Fx.Transitions;\n\t\t\ttrans = trans[data[0]] || trans[data[0].capitalize()];\n\t\t\tif (data[1]) trans = trans['ease' + data[1].capitalize() + (data[2] ? data[2].capitalize() : '')];\n\t\t}\n\t\treturn trans;\n\t}\n\n});\n\nFx.Transition = function(transition, params){\n\tparams = $splat(params);\n\treturn $extend(transition, {\n\t\teaseIn: function(pos){\n\t\t\treturn transition(pos, params);\n\t\t},\n\t\teaseOut: function(pos){\n\t\t\treturn 1 - transition(1 - pos, params);\n\t\t},\n\t\teaseInOut: function(pos){\n\t\t\treturn (pos <= 0.5) ? transition(2 * pos, params) / 2 : (2 - transition(2 * (1 - pos), params)) / 2;\n\t\t}\n\t});\n};\n\nFx.Transitions = new Hash({\n\n\tlinear: $arguments(0)\n\n});\n\nFx.Transitions.extend = function(transitions){\n\tfor (var transition in transitions) Fx.Transitions[transition] = new Fx.Transition(transitions[transition]);\n};\n\nFx.Transitions.extend({\n\n\tPow: function(p, x){\n\t\treturn Math.pow(p, x[0] || 6);\n\t},\n\n\tExpo: function(p){\n\t\treturn Math.pow(2, 8 * (p - 1));\n\t},\n\n\tCirc: function(p){\n\t\treturn 1 - Math.sin(Math.acos(p));\n\t},\n\n\tSine: function(p){\n\t\treturn 1 - Math.sin((1 - p) * Math.PI / 2);\n\t},\n\n\tBack: function(p, x){\n\t\tx = x[0] || 1.618;\n\t\treturn Math.pow(p, 2) * ((x + 1) * p - x);\n\t},\n\n\tBounce: function(p){\n\t\tvar value;\n\t\tfor (var a = 0, b = 1; 1; a += b, b /= 2){\n\t\t\tif (p >= (7 - 4 * a) / 11){\n\t\t\t\tvalue = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t},\n\n\tElastic: function(p, x){\n\t\treturn Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3);\n\t}\n\n});\n\n['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){\n\tFx.Transitions[transition] = new Fx.Transition(function(p){\n\t\treturn Math.pow(p, [i + 2]);\n\t});\n});\n\n\n/*\n---\n\nscript: Request.js\n\ndescription: Powerful all purpose Request Class. Uses XMLHTTPRequest.\n\nlicense: MIT-style license.\n\nrequires:\n- /Element\n- /Chain\n- /Events\n- /Options\n- /Browser\n\nprovides: [Request]\n\n...\n*/\n\nvar Request = new Class({\n\n\tImplements: [Chain, Events, Options],\n\n\toptions: {/*\n\t\tonRequest: $empty,\n\t\tonComplete: $empty,\n\t\tonCancel: $empty,\n\t\tonSuccess: $empty,\n\t\tonFailure: $empty,\n\t\tonException: $empty,*/\n\t\turl: '',\n\t\tdata: '',\n\t\theaders: {\n\t\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t\t'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\n\t\t},\n\t\tasync: true,\n\t\tformat: false,\n\t\tmethod: 'post',\n\t\tlink: 'ignore',\n\t\tisSuccess: null,\n\t\temulation: true,\n\t\turlEncoded: true,\n\t\tencoding: 'utf-8',\n\t\tevalScripts: false,\n\t\tevalResponse: false,\n\t\tnoCache: false\n\t},\n\n\tinitialize: function(options){\n\t\tthis.xhr = new Browser.Request();\n\t\tthis.setOptions(options);\n\t\tthis.options.isSuccess = this.options.isSuccess || this.isSuccess;\n\t\tthis.headers = new Hash(this.options.headers);\n\t},\n\n\tonStateChange: function(){\n\t\tif (this.xhr.readyState != 4 || !this.running) return;\n\t\tthis.running = false;\n\t\tthis.status = 0;\n\t\t$try(function(){\n\t\t\tthis.status = this.xhr.status;\n\t\t}.bind(this));\n\t\tthis.xhr.onreadystatechange = $empty;\n\t\tif (this.options.isSuccess.call(this, this.status)){\n\t\t\tthis.response = {text: this.xhr.responseText, xml: this.xhr.responseXML};\n\t\t\tthis.success(this.response.text, this.response.xml);\n\t\t} else {\n\t\t\tthis.response = {text: null, xml: null};\n\t\t\tthis.failure();\n\t\t}\n\t},\n\n\tisSuccess: function(){\n\t\treturn ((this.status >= 200) && (this.status < 300));\n\t},\n\n\tprocessScripts: function(text){\n\t\tif (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text);\n\t\treturn text.stripScripts(this.options.evalScripts);\n\t},\n\n\tsuccess: function(text, xml){\n\t\tthis.onSuccess(this.processScripts(text), xml);\n\t},\n\n\tonSuccess: function(){\n\t\tthis.fireEvent('complete', arguments).fireEvent('success', arguments).callChain();\n\t},\n\n\tfailure: function(){\n\t\tthis.onFailure();\n\t},\n\n\tonFailure: function(){\n\t\tthis.fireEvent('complete').fireEvent('failure', this.xhr);\n\t},\n\n\tsetHeader: function(name, value){\n\t\tthis.headers.set(name, value);\n\t\treturn this;\n\t},\n\n\tgetHeader: function(name){\n\t\treturn $try(function(){\n\t\t\treturn this.xhr.getResponseHeader(name);\n\t\t}.bind(this));\n\t},\n\n\tcheck: function(){\n\t\tif (!this.running) return true;\n\t\tswitch (this.options.link){\n\t\t\tcase 'cancel': this.cancel(); return true;\n\t\t\tcase 'chain': this.chain(this.caller.bind(this, arguments)); return false;\n\t\t}\n\t\treturn false;\n\t},\n\n\tsend: function(options){\n\t\tif (!this.check(options)) return this;\n\t\tthis.running = true;\n\n\t\tvar type = $type(options);\n\t\tif (type == 'string' || type == 'element') options = {data: options};\n\n\t\tvar old = this.options;\n\t\toptions = $extend({data: old.data, url: old.url, method: old.method}, options);\n\t\tvar data = options.data, url = String(options.url), method = options.method.toLowerCase();\n\n\t\tswitch ($type(data)){\n\t\t\tcase 'element': data = document.id(data).toQueryString(); break;\n\t\t\tcase 'object': case 'hash': data = Hash.toQueryString(data);\n\t\t}\n\n\t\tif (this.options.format){\n\t\t\tvar format = 'format=' + this.options.format;\n\t\t\tdata = (data) ? format + '&' + data : format;\n\t\t}\n\n\t\tif (this.options.emulation && !['get', 'post'].contains(method)){\n\t\t\tvar _method = '_method=' + method;\n\t\t\tdata = (data) ? _method + '&' + data : _method;\n\t\t\tmethod = 'post';\n\t\t}\n\n\t\tif (this.options.urlEncoded && method == 'post'){\n\t\t\tvar encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : '';\n\t\t\tthis.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding);\n\t\t}\n\n\t\tif (this.options.noCache){\n\t\t\tvar noCache = 'noCache=' + new Date().getTime();\n\t\t\tdata = (data) ? noCache + '&' + data : noCache;\n\t\t}\n\n\t\tvar trimPosition = url.lastIndexOf('/');\n\t\tif (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition);\n\n\t\tif (data && method == 'get'){\n\t\t\turl = url + (url.contains('?') ? '&' : '?') + data;\n\t\t\tdata = null;\n\t\t}\n\n\t\tthis.xhr.open(method.toUpperCase(), url, this.options.async);\n\n\t\tthis.xhr.onreadystatechange = this.onStateChange.bind(this);\n\n\t\tthis.headers.each(function(value, key){\n\t\t\ttry {\n\t\t\t\tthis.xhr.setRequestHeader(key, value);\n\t\t\t} catch (e){\n\t\t\t\tthis.fireEvent('exception', [key, value]);\n\t\t\t}\n\t\t}, this);\n\n\t\tthis.fireEvent('request');\n\t\tthis.xhr.send(data);\n\t\tif (!this.options.async) this.onStateChange();\n\t\treturn this;\n\t},\n\n\tcancel: function(){\n\t\tif (!this.running) return this;\n\t\tthis.running = false;\n\t\tthis.xhr.abort();\n\t\tthis.xhr.onreadystatechange = $empty;\n\t\tthis.xhr = new Browser.Request();\n\t\tthis.fireEvent('cancel');\n\t\treturn this;\n\t}\n\n});\n\n(function(){\n\nvar methods = {};\n['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){\n\tmethods[method] = function(){\n\t\tvar params = Array.link(arguments, {url: String.type, data: $defined});\n\t\treturn this.send($extend(params, {method: method}));\n\t};\n});\n\nRequest.implement(methods);\n\n})();\n\nElement.Properties.send = {\n\n\tset: function(options){\n\t\tvar send = this.retrieve('send');\n\t\tif (send) send.cancel();\n\t\treturn this.eliminate('send').store('send:options', $extend({\n\t\t\tdata: this, link: 'cancel', method: this.get('method') || 'post', url: this.get('action')\n\t\t}, options));\n\t},\n\n\tget: function(options){\n\t\tif (options || !this.retrieve('send')){\n\t\t\tif (options || !this.retrieve('send:options')) this.set('send', options);\n\t\t\tthis.store('send', new Request(this.retrieve('send:options')));\n\t\t}\n\t\treturn this.retrieve('send');\n\t}\n\n};\n\nElement.implement({\n\n\tsend: function(url){\n\t\tvar sender = this.get('send');\n\t\tsender.send({data: this, url: url || sender.options.url});\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Request.HTML.js\n\ndescription: Extends the basic Request Class with additional methods for interacting with HTML responses.\n\nlicense: MIT-style license.\n\nrequires:\n- /Request\n- /Element\n\nprovides: [Request.HTML]\n\n...\n*/\n\nRequest.HTML = new Class({\n\n\tExtends: Request,\n\n\toptions: {\n\t\tupdate: false,\n\t\tappend: false,\n\t\tevalScripts: true,\n\t\tfilter: false\n\t},\n\n\tprocessHTML: function(text){\n\t\tvar match = text.match(/<body[^>]*>([\\s\\S]*?)<\\/body>/i);\n\t\ttext = (match) ? match[1] : text;\n\n\t\tvar container = new Element('div');\n\n\t\treturn $try(function(){\n\t\t\tvar root = '<root>' + text + '</root>', doc;\n\t\t\tif (Browser.Engine.trident){\n\t\t\t\tdoc = new ActiveXObject('Microsoft.XMLDOM');\n\t\t\t\tdoc.async = false;\n\t\t\t\tdoc.loadXML(root);\n\t\t\t} else {\n\t\t\t\tdoc = new DOMParser().parseFromString(root, 'text/xml');\n\t\t\t}\n\t\t\troot = doc.getElementsByTagName('root')[0];\n\t\t\tif (!root) return null;\n\t\t\tfor (var i = 0, k = root.childNodes.length; i < k; i++){\n\t\t\t\tvar child = Element.clone(root.childNodes[i], true, true);\n\t\t\t\tif (child) container.grab(child);\n\t\t\t}\n\t\t\treturn container;\n\t\t}) || container.set('html', text);\n\t},\n\n\tsuccess: function(text){\n\t\tvar options = this.options, response = this.response;\n\n\t\tresponse.html = text.stripScripts(function(script){\n\t\t\tresponse.javascript = script;\n\t\t});\n\n\t\tvar temp = this.processHTML(response.html);\n\n\t\tresponse.tree = temp.childNodes;\n\t\tresponse.elements = temp.getElements('*');\n\n\t\tif (options.filter) response.tree = response.elements.filter(options.filter);\n\t\tif (options.update) document.id(options.update).empty().set('html', response.html);\n\t\telse if (options.append) document.id(options.append).adopt(temp.getChildren());\n\t\tif (options.evalScripts) $exec(response.javascript);\n\n\t\tthis.onSuccess(response.tree, response.elements, response.html, response.javascript);\n\t}\n\n});\n\nElement.Properties.load = {\n\n\tset: function(options){\n\t\tvar load = this.retrieve('load');\n\t\tif (load) load.cancel();\n\t\treturn this.eliminate('load').store('load:options', $extend({data: this, link: 'cancel', update: this, method: 'get'}, options));\n\t},\n\n\tget: function(options){\n\t\tif (options || ! this.retrieve('load')){\n\t\t\tif (options || !this.retrieve('load:options')) this.set('load', options);\n\t\t\tthis.store('load', new Request.HTML(this.retrieve('load:options')));\n\t\t}\n\t\treturn this.retrieve('load');\n\t}\n\n};\n\nElement.implement({\n\n\tload: function(){\n\t\tthis.get('load').send(Array.link(arguments, {data: Object.type, url: String.type}));\n\t\treturn this;\n\t}\n\n});\n\n\n/*\n---\n\nscript: Request.JSON.js\n\ndescription: Extends the basic Request Class with additional methods for sending and receiving JSON data.\n\nlicense: MIT-style license.\n\nrequires:\n- /Request JSON\n\nprovides: [Request.HTML]\n\n...\n*/\n\nRequest.JSON = new Class({\n\n\tExtends: Request,\n\n\toptions: {\n\t\tsecure: true\n\t},\n\n\tinitialize: function(options){\n\t\tthis.parent(options);\n\t\tthis.headers.extend({'Accept': 'application/json', 'X-Request': 'JSON'});\n\t},\n\n\tsuccess: function(text){\n\t\tthis.response.json = JSON.decode(text, this.options.secure);\n\t\tthis.onSuccess(this.response.json, text);\n\t}\n\n});\n"
  },
  {
    "path": "example/media/js/prototype.js",
    "content": "/*  Prototype JavaScript framework, version 1.6.1\n *  (c) 2005-2009 Sam Stephenson\n *\n *  Prototype is freely distributable under the terms of an MIT-style license.\n *  For details, see the Prototype web site: http://www.prototypejs.org/\n *\n *--------------------------------------------------------------------------*/\n\nvar Prototype = {\n  Version: '1.6.1',\n\n  Browser: (function(){\n    var ua = navigator.userAgent;\n    var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';\n    return {\n      IE:             !!window.attachEvent && !isOpera,\n      Opera:          isOpera,\n      WebKit:         ua.indexOf('AppleWebKit/') > -1,\n      Gecko:          ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,\n      MobileSafari:   /Apple.*Mobile.*Safari/.test(ua)\n    }\n  })(),\n\n  BrowserFeatures: {\n    XPath: !!document.evaluate,\n    SelectorsAPI: !!document.querySelector,\n    ElementExtensions: (function() {\n      var constructor = window.Element || window.HTMLElement;\n      return !!(constructor && constructor.prototype);\n    })(),\n    SpecificElementExtensions: (function() {\n      if (typeof window.HTMLDivElement !== 'undefined')\n        return true;\n\n      var div = document.createElement('div');\n      var form = document.createElement('form');\n      var isSupported = false;\n\n      if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {\n        isSupported = true;\n      }\n\n      div = form = null;\n\n      return isSupported;\n    })()\n  },\n\n  ScriptFragment: '<script[^>]*>([\\\\S\\\\s]*?)<\\/script>',\n  JSONFilter: /^\\/\\*-secure-([\\s\\S]*)\\*\\/\\s*$/,\n\n  emptyFunction: function() { },\n  K: function(x) { return x }\n};\n\nif (Prototype.Browser.MobileSafari)\n  Prototype.BrowserFeatures.SpecificElementExtensions = false;\n\n\nvar Abstract = { };\n\n\nvar Try = {\n  these: function() {\n    var returnValue;\n\n    for (var i = 0, length = arguments.length; i < length; i++) {\n      var lambda = arguments[i];\n      try {\n        returnValue = lambda();\n        break;\n      } catch (e) { }\n    }\n\n    return returnValue;\n  }\n};\n\n/* Based on Alex Arnell's inheritance implementation. */\n\nvar Class = (function() {\n  function subclass() {};\n  function create() {\n    var parent = null, properties = $A(arguments);\n    if (Object.isFunction(properties[0]))\n      parent = properties.shift();\n\n    function klass() {\n      this.initialize.apply(this, arguments);\n    }\n\n    Object.extend(klass, Class.Methods);\n    klass.superclass = parent;\n    klass.subclasses = [];\n\n    if (parent) {\n      subclass.prototype = parent.prototype;\n      klass.prototype = new subclass;\n      parent.subclasses.push(klass);\n    }\n\n    for (var i = 0; i < properties.length; i++)\n      klass.addMethods(properties[i]);\n\n    if (!klass.prototype.initialize)\n      klass.prototype.initialize = Prototype.emptyFunction;\n\n    klass.prototype.constructor = klass;\n    return klass;\n  }\n\n  function addMethods(source) {\n    var ancestor   = this.superclass && this.superclass.prototype;\n    var properties = Object.keys(source);\n\n    if (!Object.keys({ toString: true }).length) {\n      if (source.toString != Object.prototype.toString)\n        properties.push(\"toString\");\n      if (source.valueOf != Object.prototype.valueOf)\n        properties.push(\"valueOf\");\n    }\n\n    for (var i = 0, length = properties.length; i < length; i++) {\n      var property = properties[i], value = source[property];\n      if (ancestor && Object.isFunction(value) &&\n          value.argumentNames().first() == \"$super\") {\n        var method = value;\n        value = (function(m) {\n          return function() { return ancestor[m].apply(this, arguments); };\n        })(property).wrap(method);\n\n        value.valueOf = method.valueOf.bind(method);\n        value.toString = method.toString.bind(method);\n      }\n      this.prototype[property] = value;\n    }\n\n    return this;\n  }\n\n  return {\n    create: create,\n    Methods: {\n      addMethods: addMethods\n    }\n  };\n})();\n(function() {\n\n  var _toString = Object.prototype.toString;\n\n  function extend(destination, source) {\n    for (var property in source)\n      destination[property] = source[property];\n    return destination;\n  }\n\n  function inspect(object) {\n    try {\n      if (isUndefined(object)) return 'undefined';\n      if (object === null) return 'null';\n      return object.inspect ? object.inspect() : String(object);\n    } catch (e) {\n      if (e instanceof RangeError) return '...';\n      throw e;\n    }\n  }\n\n  function toJSON(object) {\n    var type = typeof object;\n    switch (type) {\n      case 'undefined':\n      case 'function':\n      case 'unknown': return;\n      case 'boolean': return object.toString();\n    }\n\n    if (object === null) return 'null';\n    if (object.toJSON) return object.toJSON();\n    if (isElement(object)) return;\n\n    var results = [];\n    for (var property in object) {\n      var value = toJSON(object[property]);\n      if (!isUndefined(value))\n        results.push(property.toJSON() + ': ' + value);\n    }\n\n    return '{' + results.join(', ') + '}';\n  }\n\n  function toQueryString(object) {\n    return $H(object).toQueryString();\n  }\n\n  function toHTML(object) {\n    return object && object.toHTML ? object.toHTML() : String.interpret(object);\n  }\n\n  function keys(object) {\n    var results = [];\n    for (var property in object)\n      results.push(property);\n    return results;\n  }\n\n  function values(object) {\n    var results = [];\n    for (var property in object)\n      results.push(object[property]);\n    return results;\n  }\n\n  function clone(object) {\n    return extend({ }, object);\n  }\n\n  function isElement(object) {\n    return !!(object && object.nodeType == 1);\n  }\n\n  function isArray(object) {\n    return _toString.call(object) == \"[object Array]\";\n  }\n\n\n  function isHash(object) {\n    return object instanceof Hash;\n  }\n\n  function isFunction(object) {\n    return typeof object === \"function\";\n  }\n\n  function isString(object) {\n    return _toString.call(object) == \"[object String]\";\n  }\n\n  function isNumber(object) {\n    return _toString.call(object) == \"[object Number]\";\n  }\n\n  function isUndefined(object) {\n    return typeof object === \"undefined\";\n  }\n\n  extend(Object, {\n    extend:        extend,\n    inspect:       inspect,\n    toJSON:        toJSON,\n    toQueryString: toQueryString,\n    toHTML:        toHTML,\n    keys:          keys,\n    values:        values,\n    clone:         clone,\n    isElement:     isElement,\n    isArray:       isArray,\n    isHash:        isHash,\n    isFunction:    isFunction,\n    isString:      isString,\n    isNumber:      isNumber,\n    isUndefined:   isUndefined\n  });\n})();\nObject.extend(Function.prototype, (function() {\n  var slice = Array.prototype.slice;\n\n  function update(array, args) {\n    var arrayLength = array.length, length = args.length;\n    while (length--) array[arrayLength + length] = args[length];\n    return array;\n  }\n\n  function merge(array, args) {\n    array = slice.call(array, 0);\n    return update(array, args);\n  }\n\n  function argumentNames() {\n    var names = this.toString().match(/^[\\s\\(]*function[^(]*\\(([^)]*)\\)/)[1]\n      .replace(/\\/\\/.*?[\\r\\n]|\\/\\*(?:.|[\\r\\n])*?\\*\\//g, '')\n      .replace(/\\s+/g, '').split(',');\n    return names.length == 1 && !names[0] ? [] : names;\n  }\n\n  function bind(context) {\n    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;\n    var __method = this, args = slice.call(arguments, 1);\n    return function() {\n      var a = merge(args, arguments);\n      return __method.apply(context, a);\n    }\n  }\n\n  function bindAsEventListener(context) {\n    var __method = this, args = slice.call(arguments, 1);\n    return function(event) {\n      var a = update([event || window.event], args);\n      return __method.apply(context, a);\n    }\n  }\n\n  function curry() {\n    if (!arguments.length) return this;\n    var __method = this, args = slice.call(arguments, 0);\n    return function() {\n      var a = merge(args, arguments);\n      return __method.apply(this, a);\n    }\n  }\n\n  function delay(timeout) {\n    var __method = this, args = slice.call(arguments, 1);\n    timeout = timeout * 1000\n    return window.setTimeout(function() {\n      return __method.apply(__method, args);\n    }, timeout);\n  }\n\n  function defer() {\n    var args = update([0.01], arguments);\n    return this.delay.apply(this, args);\n  }\n\n  function wrap(wrapper) {\n    var __method = this;\n    return function() {\n      var a = update([__method.bind(this)], arguments);\n      return wrapper.apply(this, a);\n    }\n  }\n\n  function methodize() {\n    if (this._methodized) return this._methodized;\n    var __method = this;\n    return this._methodized = function() {\n      var a = update([this], arguments);\n      return __method.apply(null, a);\n    };\n  }\n\n  return {\n    argumentNames:       argumentNames,\n    bind:                bind,\n    bindAsEventListener: bindAsEventListener,\n    curry:               curry,\n    delay:               delay,\n    defer:               defer,\n    wrap:                wrap,\n    methodize:           methodize\n  }\n})());\n\n\nDate.prototype.toJSON = function() {\n  return '\"' + this.getUTCFullYear() + '-' +\n    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +\n    this.getUTCDate().toPaddedString(2) + 'T' +\n    this.getUTCHours().toPaddedString(2) + ':' +\n    this.getUTCMinutes().toPaddedString(2) + ':' +\n    this.getUTCSeconds().toPaddedString(2) + 'Z\"';\n};\n\n\nRegExp.prototype.match = RegExp.prototype.test;\n\nRegExp.escape = function(str) {\n  return String(str).replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n};\nvar PeriodicalExecuter = Class.create({\n  initialize: function(callback, frequency) {\n    this.callback = callback;\n    this.frequency = frequency;\n    this.currentlyExecuting = false;\n\n    this.registerCallback();\n  },\n\n  registerCallback: function() {\n    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n  },\n\n  execute: function() {\n    this.callback(this);\n  },\n\n  stop: function() {\n    if (!this.timer) return;\n    clearInterval(this.timer);\n    this.timer = null;\n  },\n\n  onTimerEvent: function() {\n    if (!this.currentlyExecuting) {\n      try {\n        this.currentlyExecuting = true;\n        this.execute();\n        this.currentlyExecuting = false;\n      } catch(e) {\n        this.currentlyExecuting = false;\n        throw e;\n      }\n    }\n  }\n});\nObject.extend(String, {\n  interpret: function(value) {\n    return value == null ? '' : String(value);\n  },\n  specialChar: {\n    '\\b': '\\\\b',\n    '\\t': '\\\\t',\n    '\\n': '\\\\n',\n    '\\f': '\\\\f',\n    '\\r': '\\\\r',\n    '\\\\': '\\\\\\\\'\n  }\n});\n\nObject.extend(String.prototype, (function() {\n\n  function prepareReplacement(replacement) {\n    if (Object.isFunction(replacement)) return replacement;\n    var template = new Template(replacement);\n    return function(match) { return template.evaluate(match) };\n  }\n\n  function gsub(pattern, replacement) {\n    var result = '', source = this, match;\n    replacement = prepareReplacement(replacement);\n\n    if (Object.isString(pattern))\n      pattern = RegExp.escape(pattern);\n\n    if (!(pattern.length || pattern.source)) {\n      replacement = replacement('');\n      return replacement + source.split('').join(replacement) + replacement;\n    }\n\n    while (source.length > 0) {\n      if (match = source.match(pattern)) {\n        result += source.slice(0, match.index);\n        result += String.interpret(replacement(match));\n        source  = source.slice(match.index + match[0].length);\n      } else {\n        result += source, source = '';\n      }\n    }\n    return result;\n  }\n\n  function sub(pattern, replacement, count) {\n    replacement = prepareReplacement(replacement);\n    count = Object.isUndefined(count) ? 1 : count;\n\n    return this.gsub(pattern, function(match) {\n      if (--count < 0) return match[0];\n      return replacement(match);\n    });\n  }\n\n  function scan(pattern, iterator) {\n    this.gsub(pattern, iterator);\n    return String(this);\n  }\n\n  function truncate(length, truncation) {\n    length = length || 30;\n    truncation = Object.isUndefined(truncation) ? '...' : truncation;\n    return this.length > length ?\n      this.slice(0, length - truncation.length) + truncation : String(this);\n  }\n\n  function strip() {\n    return this.replace(/^\\s+/, '').replace(/\\s+$/, '');\n  }\n\n  function stripTags() {\n    return this.replace(/<\\w+(\\s+(\"[^\"]*\"|'[^']*'|[^>])+)?>|<\\/\\w+>/gi, '');\n  }\n\n  function stripScripts() {\n    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');\n  }\n\n  function extractScripts() {\n    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');\n    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');\n    return (this.match(matchAll) || []).map(function(scriptTag) {\n      return (scriptTag.match(matchOne) || ['', ''])[1];\n    });\n  }\n\n  function evalScripts() {\n    return this.extractScripts().map(function(script) { return eval(script) });\n  }\n\n  function escapeHTML() {\n    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');\n  }\n\n  function unescapeHTML() {\n    return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');\n  }\n\n\n  function toQueryParams(separator) {\n    var match = this.strip().match(/([^?#]*)(#.*)?$/);\n    if (!match) return { };\n\n    return match[1].split(separator || '&').inject({ }, function(hash, pair) {\n      if ((pair = pair.split('='))[0]) {\n        var key = decodeURIComponent(pair.shift());\n        var value = pair.length > 1 ? pair.join('=') : pair[0];\n        if (value != undefined) value = decodeURIComponent(value);\n\n        if (key in hash) {\n          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];\n          hash[key].push(value);\n        }\n        else hash[key] = value;\n      }\n      return hash;\n    });\n  }\n\n  function toArray() {\n    return this.split('');\n  }\n\n  function succ() {\n    return this.slice(0, this.length - 1) +\n      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);\n  }\n\n  function times(count) {\n    return count < 1 ? '' : new Array(count + 1).join(this);\n  }\n\n  function camelize() {\n    var parts = this.split('-'), len = parts.length;\n    if (len == 1) return parts[0];\n\n    var camelized = this.charAt(0) == '-'\n      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)\n      : parts[0];\n\n    for (var i = 1; i < len; i++)\n      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);\n\n    return camelized;\n  }\n\n  function capitalize() {\n    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();\n  }\n\n  function underscore() {\n    return this.replace(/::/g, '/')\n               .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n               .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n               .replace(/-/g, '_')\n               .toLowerCase();\n  }\n\n  function dasherize() {\n    return this.replace(/_/g, '-');\n  }\n\n  function inspect(useDoubleQuotes) {\n    var escapedString = this.replace(/[\\x00-\\x1f\\\\]/g, function(character) {\n      if (character in String.specialChar) {\n        return String.specialChar[character];\n      }\n      return '\\\\u00' + character.charCodeAt().toPaddedString(2, 16);\n    });\n    if (useDoubleQuotes) return '\"' + escapedString.replace(/\"/g, '\\\\\"') + '\"';\n    return \"'\" + escapedString.replace(/'/g, '\\\\\\'') + \"'\";\n  }\n\n  function toJSON() {\n    return this.inspect(true);\n  }\n\n  function unfilterJSON(filter) {\n    return this.replace(filter || Prototype.JSONFilter, '$1');\n  }\n\n  function isJSON() {\n    var str = this;\n    if (str.blank()) return false;\n    str = this.replace(/\\\\./g, '@').replace(/\"[^\"\\\\\\n\\r]*\"/g, '');\n    return (/^[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]*$/).test(str);\n  }\n\n  function evalJSON(sanitize) {\n    var json = this.unfilterJSON();\n    try {\n      if (!sanitize || json.isJSON()) return eval('(' + json + ')');\n    } catch (e) { }\n    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());\n  }\n\n  function include(pattern) {\n    return this.indexOf(pattern) > -1;\n  }\n\n  function startsWith(pattern) {\n    return this.indexOf(pattern) === 0;\n  }\n\n  function endsWith(pattern) {\n    var d = this.length - pattern.length;\n    return d >= 0 && this.lastIndexOf(pattern) === d;\n  }\n\n  function empty() {\n    return this == '';\n  }\n\n  function blank() {\n    return /^\\s*$/.test(this);\n  }\n\n  function interpolate(object, pattern) {\n    return new Template(this, pattern).evaluate(object);\n  }\n\n  return {\n    gsub:           gsub,\n    sub:            sub,\n    scan:           scan,\n    truncate:       truncate,\n    strip:          String.prototype.trim ? String.prototype.trim : strip,\n    stripTags:      stripTags,\n    stripScripts:   stripScripts,\n    extractScripts: extractScripts,\n    evalScripts:    evalScripts,\n    escapeHTML:     escapeHTML,\n    unescapeHTML:   unescapeHTML,\n    toQueryParams:  toQueryParams,\n    parseQuery:     toQueryParams,\n    toArray:        toArray,\n    succ:           succ,\n    times:          times,\n    camelize:       camelize,\n    capitalize:     capitalize,\n    underscore:     underscore,\n    dasherize:      dasherize,\n    inspect:        inspect,\n    toJSON:         toJSON,\n    unfilterJSON:   unfilterJSON,\n    isJSON:         isJSON,\n    evalJSON:       evalJSON,\n    include:        include,\n    startsWith:     startsWith,\n    endsWith:       endsWith,\n    empty:          empty,\n    blank:          blank,\n    interpolate:    interpolate\n  };\n})());\n\nvar Template = Class.create({\n  initialize: function(template, pattern) {\n    this.template = template.toString();\n    this.pattern = pattern || Template.Pattern;\n  },\n\n  evaluate: function(object) {\n    if (object && Object.isFunction(object.toTemplateReplacements))\n      object = object.toTemplateReplacements();\n\n    return this.template.gsub(this.pattern, function(match) {\n      if (object == null) return (match[1] + '');\n\n      var before = match[1] || '';\n      if (before == '\\\\') return match[2];\n\n      var ctx = object, expr = match[3];\n      var pattern = /^([^.[]+|\\[((?:.*?[^\\\\])?)\\])(\\.|\\[|$)/;\n      match = pattern.exec(expr);\n      if (match == null) return before;\n\n      while (match != null) {\n        var comp = match[1].startsWith('[') ? match[2].replace(/\\\\\\\\]/g, ']') : match[1];\n        ctx = ctx[comp];\n        if (null == ctx || '' == match[3]) break;\n        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);\n        match = pattern.exec(expr);\n      }\n\n      return before + String.interpret(ctx);\n    });\n  }\n});\nTemplate.Pattern = /(^|.|\\r|\\n)(#\\{(.*?)\\})/;\n\nvar $break = { };\n\nvar Enumerable = (function() {\n  function each(iterator, context) {\n    var index = 0;\n    try {\n      this._each(function(value) {\n        iterator.call(context, value, index++);\n      });\n    } catch (e) {\n      if (e != $break) throw e;\n    }\n    return this;\n  }\n\n  function eachSlice(number, iterator, context) {\n    var index = -number, slices = [], array = this.toArray();\n    if (number < 1) return array;\n    while ((index += number) < array.length)\n      slices.push(array.slice(index, index+number));\n    return slices.collect(iterator, context);\n  }\n\n  function all(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var result = true;\n    this.each(function(value, index) {\n      result = result && !!iterator.call(context, value, index);\n      if (!result) throw $break;\n    });\n    return result;\n  }\n\n  function any(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var result = false;\n    this.each(function(value, index) {\n      if (result = !!iterator.call(context, value, index))\n        throw $break;\n    });\n    return result;\n  }\n\n  function collect(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var results = [];\n    this.each(function(value, index) {\n      results.push(iterator.call(context, value, index));\n    });\n    return results;\n  }\n\n  function detect(iterator, context) {\n    var result;\n    this.each(function(value, index) {\n      if (iterator.call(context, value, index)) {\n        result = value;\n        throw $break;\n      }\n    });\n    return result;\n  }\n\n  function findAll(iterator, context) {\n    var results = [];\n    this.each(function(value, index) {\n      if (iterator.call(context, value, index))\n        results.push(value);\n    });\n    return results;\n  }\n\n  function grep(filter, iterator, context) {\n    iterator = iterator || Prototype.K;\n    var results = [];\n\n    if (Object.isString(filter))\n      filter = new RegExp(RegExp.escape(filter));\n\n    this.each(function(value, index) {\n      if (filter.match(value))\n        results.push(iterator.call(context, value, index));\n    });\n    return results;\n  }\n\n  function include(object) {\n    if (Object.isFunction(this.indexOf))\n      if (this.indexOf(object) != -1) return true;\n\n    var found = false;\n    this.each(function(value) {\n      if (value == object) {\n        found = true;\n        throw $break;\n      }\n    });\n    return found;\n  }\n\n  function inGroupsOf(number, fillWith) {\n    fillWith = Object.isUndefined(fillWith) ? null : fillWith;\n    return this.eachSlice(number, function(slice) {\n      while(slice.length < number) slice.push(fillWith);\n      return slice;\n    });\n  }\n\n  function inject(memo, iterator, context) {\n    this.each(function(value, index) {\n      memo = iterator.call(context, memo, value, index);\n    });\n    return memo;\n  }\n\n  function invoke(method) {\n    var args = $A(arguments).slice(1);\n    return this.map(function(value) {\n      return value[method].apply(value, args);\n    });\n  }\n\n  function max(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var result;\n    this.each(function(value, index) {\n      value = iterator.call(context, value, index);\n      if (result == null || value >= result)\n        result = value;\n    });\n    return result;\n  }\n\n  function min(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var result;\n    this.each(function(value, index) {\n      value = iterator.call(context, value, index);\n      if (result == null || value < result)\n        result = value;\n    });\n    return result;\n  }\n\n  function partition(iterator, context) {\n    iterator = iterator || Prototype.K;\n    var trues = [], falses = [];\n    this.each(function(value, index) {\n      (iterator.call(context, value, index) ?\n        trues : falses).push(value);\n    });\n    return [trues, falses];\n  }\n\n  function pluck(property) {\n    var results = [];\n    this.each(function(value) {\n      results.push(value[property]);\n    });\n    return results;\n  }\n\n  function reject(iterator, context) {\n    var results = [];\n    this.each(function(value, index) {\n      if (!iterator.call(context, value, index))\n        results.push(value);\n    });\n    return results;\n  }\n\n  function sortBy(iterator, context) {\n    return this.map(function(value, index) {\n      return {\n        value: value,\n        criteria: iterator.call(context, value, index)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria, b = right.criteria;\n      return a < b ? -1 : a > b ? 1 : 0;\n    }).pluck('value');\n  }\n\n  function toArray() {\n    return this.map();\n  }\n\n  function zip() {\n    var iterator = Prototype.K, args = $A(arguments);\n    if (Object.isFunction(args.last()))\n      iterator = args.pop();\n\n    var collections = [this].concat(args).map($A);\n    return this.map(function(value, index) {\n      return iterator(collections.pluck(index));\n    });\n  }\n\n  function size() {\n    return this.toArray().length;\n  }\n\n  function inspect() {\n    return '#<Enumerable:' + this.toArray().inspect() + '>';\n  }\n\n\n\n\n\n\n\n\n\n  return {\n    each:       each,\n    eachSlice:  eachSlice,\n    all:        all,\n    every:      all,\n    any:        any,\n    some:       any,\n    collect:    collect,\n    map:        collect,\n    detect:     detect,\n    findAll:    findAll,\n    select:     findAll,\n    filter:     findAll,\n    grep:       grep,\n    include:    include,\n    member:     include,\n    inGroupsOf: inGroupsOf,\n    inject:     inject,\n    invoke:     invoke,\n    max:        max,\n    min:        min,\n    partition:  partition,\n    pluck:      pluck,\n    reject:     reject,\n    sortBy:     sortBy,\n    toArray:    toArray,\n    entries:    toArray,\n    zip:        zip,\n    size:       size,\n    inspect:    inspect,\n    find:       detect\n  };\n})();\nfunction $A(iterable) {\n  if (!iterable) return [];\n  if ('toArray' in Object(iterable)) return iterable.toArray();\n  var length = iterable.length || 0, results = new Array(length);\n  while (length--) results[length] = iterable[length];\n  return results;\n}\n\nfunction $w(string) {\n  if (!Object.isString(string)) return [];\n  string = string.strip();\n  return string ? string.split(/\\s+/) : [];\n}\n\nArray.from = $A;\n\n\n(function() {\n  var arrayProto = Array.prototype,\n      slice = arrayProto.slice,\n      _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available\n\n  function each(iterator) {\n    for (var i = 0, length = this.length; i < length; i++)\n      iterator(this[i]);\n  }\n  if (!_each) _each = each;\n\n  function clear() {\n    this.length = 0;\n    return this;\n  }\n\n  function first() {\n    return this[0];\n  }\n\n  function last() {\n    return this[this.length - 1];\n  }\n\n  function compact() {\n    return this.select(function(value) {\n      return value != null;\n    });\n  }\n\n  function flatten() {\n    return this.inject([], function(array, value) {\n      if (Object.isArray(value))\n        return array.concat(value.flatten());\n      array.push(value);\n      return array;\n    });\n  }\n\n  function without() {\n    var values = slice.call(arguments, 0);\n    return this.select(function(value) {\n      return !values.include(value);\n    });\n  }\n\n  function reverse(inline) {\n    return (inline !== false ? this : this.toArray())._reverse();\n  }\n\n  function uniq(sorted) {\n    return this.inject([], function(array, value, index) {\n      if (0 == index || (sorted ? array.last() != value : !array.include(value)))\n        array.push(value);\n      return array;\n    });\n  }\n\n  function intersect(array) {\n    return this.uniq().findAll(function(item) {\n      return array.detect(function(value) { return item === value });\n    });\n  }\n\n\n  function clone() {\n    return slice.call(this, 0);\n  }\n\n  function size() {\n    return this.length;\n  }\n\n  function inspect() {\n    return '[' + this.map(Object.inspect).join(', ') + ']';\n  }\n\n  function toJSON() {\n    var results = [];\n    this.each(function(object) {\n      var value = Object.toJSON(object);\n      if (!Object.isUndefined(value)) results.push(value);\n    });\n    return '[' + results.join(', ') + ']';\n  }\n\n  function indexOf(item, i) {\n    i || (i = 0);\n    var length = this.length;\n    if (i < 0) i = length + i;\n    for (; i < length; i++)\n      if (this[i] === item) return i;\n    return -1;\n  }\n\n  function lastIndexOf(item, i) {\n    i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;\n    var n = this.slice(0, i).reverse().indexOf(item);\n    return (n < 0) ? n : i - n - 1;\n  }\n\n  function concat() {\n    var array = slice.call(this, 0), item;\n    for (var i = 0, length = arguments.length; i < length; i++) {\n      item = arguments[i];\n      if (Object.isArray(item) && !('callee' in item)) {\n        for (var j = 0, arrayLength = item.length; j < arrayLength; j++)\n          array.push(item[j]);\n      } else {\n        array.push(item);\n      }\n    }\n    return array;\n  }\n\n  Object.extend(arrayProto, Enumerable);\n\n  if (!arrayProto._reverse)\n    arrayProto._reverse = arrayProto.reverse;\n\n  Object.extend(arrayProto, {\n    _each:     _each,\n    clear:     clear,\n    first:     first,\n    last:      last,\n    compact:   compact,\n    flatten:   flatten,\n    without:   without,\n    reverse:   reverse,\n    uniq:      uniq,\n    intersect: intersect,\n    clone:     clone,\n    toArray:   clone,\n    size:      size,\n    inspect:   inspect,\n    toJSON:    toJSON\n  });\n\n  var CONCAT_ARGUMENTS_BUGGY = (function() {\n    return [].concat(arguments)[0][0] !== 1;\n  })(1,2)\n\n  if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;\n\n  if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;\n  if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;\n})();\nfunction $H(object) {\n  return new Hash(object);\n};\n\nvar Hash = Class.create(Enumerable, (function() {\n  function initialize(object) {\n    this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);\n  }\n\n  function _each(iterator) {\n    for (var key in this._object) {\n      var value = this._object[key], pair = [key, value];\n      pair.key = key;\n      pair.value = value;\n      iterator(pair);\n    }\n  }\n\n  function set(key, value) {\n    return this._object[key] = value;\n  }\n\n  function get(key) {\n    if (this._object[key] !== Object.prototype[key])\n      return this._object[key];\n  }\n\n  function unset(key) {\n    var value = this._object[key];\n    delete this._object[key];\n    return value;\n  }\n\n  function toObject() {\n    return Object.clone(this._object);\n  }\n\n  function keys() {\n    return this.pluck('key');\n  }\n\n  function values() {\n    return this.pluck('value');\n  }\n\n  function index(value) {\n    var match = this.detect(function(pair) {\n      return pair.value === value;\n    });\n    return match && match.key;\n  }\n\n  function merge(object) {\n    return this.clone().update(object);\n  }\n\n  function update(object) {\n    return new Hash(object).inject(this, function(result, pair) {\n      result.set(pair.key, pair.value);\n      return result;\n    });\n  }\n\n  function toQueryPair(key, value) {\n    if (Object.isUndefined(value)) return key;\n    return key + '=' + encodeURIComponent(String.interpret(value));\n  }\n\n  function toQueryString() {\n    return this.inject([], function(results, pair) {\n      var key = encodeURIComponent(pair.key), values = pair.value;\n\n      if (values && typeof values == 'object') {\n        if (Object.isArray(values))\n          return results.concat(values.map(toQueryPair.curry(key)));\n      } else results.push(toQueryPair(key, values));\n      return results;\n    }).join('&');\n  }\n\n  function inspect() {\n    return '#<Hash:{' + this.map(function(pair) {\n      return pair.map(Object.inspect).join(': ');\n    }).join(', ') + '}>';\n  }\n\n  function toJSON() {\n    return Object.toJSON(this.toObject());\n  }\n\n  function clone() {\n    return new Hash(this);\n  }\n\n  return {\n    initialize:             initialize,\n    _each:                  _each,\n    set:                    set,\n    get:                    get,\n    unset:                  unset,\n    toObject:               toObject,\n    toTemplateReplacements: toObject,\n    keys:                   keys,\n    values:                 values,\n    index:                  index,\n    merge:                  merge,\n    update:                 update,\n    toQueryString:          toQueryString,\n    inspect:                inspect,\n    toJSON:                 toJSON,\n    clone:                  clone\n  };\n})());\n\nHash.from = $H;\nObject.extend(Number.prototype, (function() {\n  function toColorPart() {\n    return this.toPaddedString(2, 16);\n  }\n\n  function succ() {\n    return this + 1;\n  }\n\n  function times(iterator, context) {\n    $R(0, this, true).each(iterator, context);\n    return this;\n  }\n\n  function toPaddedString(length, radix) {\n    var string = this.toString(radix || 10);\n    return '0'.times(length - string.length) + string;\n  }\n\n  function toJSON() {\n    return isFinite(this) ? this.toString() : 'null';\n  }\n\n  function abs() {\n    return Math.abs(this);\n  }\n\n  function round() {\n    return Math.round(this);\n  }\n\n  function ceil() {\n    return Math.ceil(this);\n  }\n\n  function floor() {\n    return Math.floor(this);\n  }\n\n  return {\n    toColorPart:    toColorPart,\n    succ:           succ,\n    times:          times,\n    toPaddedString: toPaddedString,\n    toJSON:         toJSON,\n    abs:            abs,\n    round:          round,\n    ceil:           ceil,\n    floor:          floor\n  };\n})());\n\nfunction $R(start, end, exclusive) {\n  return new ObjectRange(start, end, exclusive);\n}\n\nvar ObjectRange = Class.create(Enumerable, (function() {\n  function initialize(start, end, exclusive) {\n    this.start = start;\n    this.end = end;\n    this.exclusive = exclusive;\n  }\n\n  function _each(iterator) {\n    var value = this.start;\n    while (this.include(value)) {\n      iterator(value);\n      value = value.succ();\n    }\n  }\n\n  function include(value) {\n    if (value < this.start)\n      return false;\n    if (this.exclusive)\n      return value < this.end;\n    return value <= this.end;\n  }\n\n  return {\n    initialize: initialize,\n    _each:      _each,\n    include:    include\n  };\n})());\n\n\n\nvar Ajax = {\n  getTransport: function() {\n    return Try.these(\n      function() {return new XMLHttpRequest()},\n      function() {return new ActiveXObject('Msxml2.XMLHTTP')},\n      function() {return new ActiveXObject('Microsoft.XMLHTTP')}\n    ) || false;\n  },\n\n  activeRequestCount: 0\n};\n\nAjax.Responders = {\n  responders: [],\n\n  _each: function(iterator) {\n    this.responders._each(iterator);\n  },\n\n  register: function(responder) {\n    if (!this.include(responder))\n      this.responders.push(responder);\n  },\n\n  unregister: function(responder) {\n    this.responders = this.responders.without(responder);\n  },\n\n  dispatch: function(callback, request, transport, json) {\n    this.each(function(responder) {\n      if (Object.isFunction(responder[callback])) {\n        try {\n          responder[callback].apply(responder, [request, transport, json]);\n        } catch (e) { }\n      }\n    });\n  }\n};\n\nObject.extend(Ajax.Responders, Enumerable);\n\nAjax.Responders.register({\n  onCreate:   function() { Ajax.activeRequestCount++ },\n  onComplete: function() { Ajax.activeRequestCount-- }\n});\nAjax.Base = Class.create({\n  initialize: function(options) {\n    this.options = {\n      method:       'post',\n      asynchronous: true,\n      contentType:  'application/x-www-form-urlencoded',\n      encoding:     'UTF-8',\n      parameters:   '',\n      evalJSON:     true,\n      evalJS:       true\n    };\n    Object.extend(this.options, options || { });\n\n    this.options.method = this.options.method.toLowerCase();\n\n    if (Object.isString(this.options.parameters))\n      this.options.parameters = this.options.parameters.toQueryParams();\n    else if (Object.isHash(this.options.parameters))\n      this.options.parameters = this.options.parameters.toObject();\n  }\n});\nAjax.Request = Class.create(Ajax.Base, {\n  _complete: false,\n\n  initialize: function($super, url, options) {\n    $super(options);\n    this.transport = Ajax.getTransport();\n    this.request(url);\n  },\n\n  request: function(url) {\n    this.url = url;\n    this.method = this.options.method;\n    var params = Object.clone(this.options.parameters);\n\n    if (!['get', 'post'].include(this.method)) {\n      params['_method'] = this.method;\n      this.method = 'post';\n    }\n\n    this.parameters = params;\n\n    if (params = Object.toQueryString(params)) {\n      if (this.method == 'get')\n        this.url += (this.url.include('?') ? '&' : '?') + params;\n      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))\n        params += '&_=';\n    }\n\n    try {\n      var response = new Ajax.Response(this);\n      if (this.options.onCreate) this.options.onCreate(response);\n      Ajax.Responders.dispatch('onCreate', this, response);\n\n      this.transport.open(this.method.toUpperCase(), this.url,\n        this.options.asynchronous);\n\n      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);\n\n      this.transport.onreadystatechange = this.onStateChange.bind(this);\n      this.setRequestHeaders();\n\n      this.body = this.method == 'post' ? (this.options.postBody || params) : null;\n      this.transport.send(this.body);\n\n      /* Force Firefox to handle ready state 4 for synchronous requests */\n      if (!this.options.asynchronous && this.transport.overrideMimeType)\n        this.onStateChange();\n\n    }\n    catch (e) {\n      this.dispatchException(e);\n    }\n  },\n\n  onStateChange: function() {\n    var readyState = this.transport.readyState;\n    if (readyState > 1 && !((readyState == 4) && this._complete))\n      this.respondToReadyState(this.transport.readyState);\n  },\n\n  setRequestHeaders: function() {\n    var headers = {\n      'X-Requested-With': 'XMLHttpRequest',\n      'X-Prototype-Version': Prototype.Version,\n      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\n    };\n\n    if (this.method == 'post') {\n      headers['Content-type'] = this.options.contentType +\n        (this.options.encoding ? '; charset=' + this.options.encoding : '');\n\n      /* Force \"Connection: close\" for older Mozilla browsers to work\n       * around a bug where XMLHttpRequest sends an incorrect\n       * Content-length header. See Mozilla Bugzilla #246651.\n       */\n      if (this.transport.overrideMimeType &&\n          (navigator.userAgent.match(/Gecko\\/(\\d{4})/) || [0,2005])[1] < 2005)\n            headers['Connection'] = 'close';\n    }\n\n    if (typeof this.options.requestHeaders == 'object') {\n      var extras = this.options.requestHeaders;\n\n      if (Object.isFunction(extras.push))\n        for (var i = 0, length = extras.length; i < length; i += 2)\n          headers[extras[i]] = extras[i+1];\n      else\n        $H(extras).each(function(pair) { headers[pair.key] = pair.value });\n    }\n\n    for (var name in headers)\n      this.transport.setRequestHeader(name, headers[name]);\n  },\n\n  success: function() {\n    var status = this.getStatus();\n    return !status || (status >= 200 && status < 300);\n  },\n\n  getStatus: function() {\n    try {\n      return this.transport.status || 0;\n    } catch (e) { return 0 }\n  },\n\n  respondToReadyState: function(readyState) {\n    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);\n\n    if (state == 'Complete') {\n      try {\n        this._complete = true;\n        (this.options['on' + response.status]\n         || this.options['on' + (this.success() ? 'Success' : 'Failure')]\n         || Prototype.emptyFunction)(response, response.headerJSON);\n      } catch (e) {\n        this.dispatchException(e);\n      }\n\n      var contentType = response.getHeader('Content-type');\n      if (this.options.evalJS == 'force'\n          || (this.options.evalJS && this.isSameOrigin() && contentType\n          && contentType.match(/^\\s*(text|application)\\/(x-)?(java|ecma)script(;.*)?\\s*$/i)))\n        this.evalResponse();\n    }\n\n    try {\n      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);\n      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);\n    } catch (e) {\n      this.dispatchException(e);\n    }\n\n    if (state == 'Complete') {\n      this.transport.onreadystatechange = Prototype.emptyFunction;\n    }\n  },\n\n  isSameOrigin: function() {\n    var m = this.url.match(/^\\s*https?:\\/\\/[^\\/]*/);\n    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({\n      protocol: location.protocol,\n      domain: document.domain,\n      port: location.port ? ':' + location.port : ''\n    }));\n  },\n\n  getHeader: function(name) {\n    try {\n      return this.transport.getResponseHeader(name) || null;\n    } catch (e) { return null; }\n  },\n\n  evalResponse: function() {\n    try {\n      return eval((this.transport.responseText || '').unfilterJSON());\n    } catch (e) {\n      this.dispatchException(e);\n    }\n  },\n\n  dispatchException: function(exception) {\n    (this.options.onException || Prototype.emptyFunction)(this, exception);\n    Ajax.Responders.dispatch('onException', this, exception);\n  }\n});\n\nAjax.Request.Events =\n  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];\n\n\n\n\n\n\n\n\nAjax.Response = Class.create({\n  initialize: function(request){\n    this.request = request;\n    var transport  = this.transport  = request.transport,\n        readyState = this.readyState = transport.readyState;\n\n    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {\n      this.status       = this.getStatus();\n      this.statusText   = this.getStatusText();\n      this.responseText = String.interpret(transport.responseText);\n      this.headerJSON   = this._getHeaderJSON();\n    }\n\n    if(readyState == 4) {\n      var xml = transport.responseXML;\n      this.responseXML  = Object.isUndefined(xml) ? null : xml;\n      this.responseJSON = this._getResponseJSON();\n    }\n  },\n\n  status:      0,\n\n  statusText: '',\n\n  getStatus: Ajax.Request.prototype.getStatus,\n\n  getStatusText: function() {\n    try {\n      return this.transport.statusText || '';\n    } catch (e) { return '' }\n  },\n\n  getHeader: Ajax.Request.prototype.getHeader,\n\n  getAllHeaders: function() {\n    try {\n      return this.getAllResponseHeaders();\n    } catch (e) { return null }\n  },\n\n  getResponseHeader: function(name) {\n    return this.transport.getResponseHeader(name);\n  },\n\n  getAllResponseHeaders: function() {\n    return this.transport.getAllResponseHeaders();\n  },\n\n  _getHeaderJSON: function() {\n    var json = this.getHeader('X-JSON');\n    if (!json) return null;\n    json = decodeURIComponent(escape(json));\n    try {\n      return json.evalJSON(this.request.options.sanitizeJSON ||\n        !this.request.isSameOrigin());\n    } catch (e) {\n      this.request.dispatchException(e);\n    }\n  },\n\n  _getResponseJSON: function() {\n    var options = this.request.options;\n    if (!options.evalJSON || (options.evalJSON != 'force' &&\n      !(this.getHeader('Content-type') || '').include('application/json')) ||\n        this.responseText.blank())\n          return null;\n    try {\n      return this.responseText.evalJSON(options.sanitizeJSON ||\n        !this.request.isSameOrigin());\n    } catch (e) {\n      this.request.dispatchException(e);\n    }\n  }\n});\n\nAjax.Updater = Class.create(Ajax.Request, {\n  initialize: function($super, container, url, options) {\n    this.container = {\n      success: (container.success || container),\n      failure: (container.failure || (container.success ? null : container))\n    };\n\n    options = Object.clone(options);\n    var onComplete = options.onComplete;\n    options.onComplete = (function(response, json) {\n      this.updateContent(response.responseText);\n      if (Object.isFunction(onComplete)) onComplete(response, json);\n    }).bind(this);\n\n    $super(url, options);\n  },\n\n  updateContent: function(responseText) {\n    var receiver = this.container[this.success() ? 'success' : 'failure'],\n        options = this.options;\n\n    if (!options.evalScripts) responseText = responseText.stripScripts();\n\n    if (receiver = $(receiver)) {\n      if (options.insertion) {\n        if (Object.isString(options.insertion)) {\n          var insertion = { }; insertion[options.insertion] = responseText;\n          receiver.insert(insertion);\n        }\n        else options.insertion(receiver, responseText);\n      }\n      else receiver.update(responseText);\n    }\n  }\n});\n\nAjax.PeriodicalUpdater = Class.create(Ajax.Base, {\n  initialize: function($super, container, url, options) {\n    $super(options);\n    this.onComplete = this.options.onComplete;\n\n    this.frequency = (this.options.frequency || 2);\n    this.decay = (this.options.decay || 1);\n\n    this.updater = { };\n    this.container = container;\n    this.url = url;\n\n    this.start();\n  },\n\n  start: function() {\n    this.options.onComplete = this.updateComplete.bind(this);\n    this.onTimerEvent();\n  },\n\n  stop: function() {\n    this.updater.options.onComplete = undefined;\n    clearTimeout(this.timer);\n    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);\n  },\n\n  updateComplete: function(response) {\n    if (this.options.decay) {\n      this.decay = (response.responseText == this.lastText ?\n        this.decay * this.options.decay : 1);\n\n      this.lastText = response.responseText;\n    }\n    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);\n  },\n\n  onTimerEvent: function() {\n    this.updater = new Ajax.Updater(this.container, this.url, this.options);\n  }\n});\n\n\n\nfunction $(element) {\n  if (arguments.length > 1) {\n    for (var i = 0, elements = [], length = arguments.length; i < length; i++)\n      elements.push($(arguments[i]));\n    return elements;\n  }\n  if (Object.isString(element))\n    element = document.getElementById(element);\n  return Element.extend(element);\n}\n\nif (Prototype.BrowserFeatures.XPath) {\n  document._getElementsByXPath = function(expression, parentElement) {\n    var results = [];\n    var query = document.evaluate(expression, $(parentElement) || document,\n      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n    for (var i = 0, length = query.snapshotLength; i < length; i++)\n      results.push(Element.extend(query.snapshotItem(i)));\n    return results;\n  };\n}\n\n/*--------------------------------------------------------------------------*/\n\nif (!window.Node) var Node = { };\n\nif (!Node.ELEMENT_NODE) {\n  Object.extend(Node, {\n    ELEMENT_NODE: 1,\n    ATTRIBUTE_NODE: 2,\n    TEXT_NODE: 3,\n    CDATA_SECTION_NODE: 4,\n    ENTITY_REFERENCE_NODE: 5,\n    ENTITY_NODE: 6,\n    PROCESSING_INSTRUCTION_NODE: 7,\n    COMMENT_NODE: 8,\n    DOCUMENT_NODE: 9,\n    DOCUMENT_TYPE_NODE: 10,\n    DOCUMENT_FRAGMENT_NODE: 11,\n    NOTATION_NODE: 12\n  });\n}\n\n\n(function(global) {\n\n  var SETATTRIBUTE_IGNORES_NAME = (function(){\n    var elForm = document.createElement(\"form\");\n    var elInput = document.createElement(\"input\");\n    var root = document.documentElement;\n    elInput.setAttribute(\"name\", \"test\");\n    elForm.appendChild(elInput);\n    root.appendChild(elForm);\n    var isBuggy = elForm.elements\n      ? (typeof elForm.elements.test == \"undefined\")\n      : null;\n    root.removeChild(elForm);\n    elForm = elInput = null;\n    return isBuggy;\n  })();\n\n  var element = global.Element;\n  global.Element = function(tagName, attributes) {\n    attributes = attributes || { };\n    tagName = tagName.toLowerCase();\n    var cache = Element.cache;\n    if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {\n      tagName = '<' + tagName + ' name=\"' + attributes.name + '\">';\n      delete attributes.name;\n      return Element.writeAttribute(document.createElement(tagName), attributes);\n    }\n    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));\n    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);\n  };\n  Object.extend(global.Element, element || { });\n  if (element) global.Element.prototype = element.prototype;\n})(this);\n\nElement.cache = { };\nElement.idCounter = 1;\n\nElement.Methods = {\n  visible: function(element) {\n    return $(element).style.display != 'none';\n  },\n\n  toggle: function(element) {\n    element = $(element);\n    Element[Element.visible(element) ? 'hide' : 'show'](element);\n    return element;\n  },\n\n\n  hide: function(element) {\n    element = $(element);\n    element.style.display = 'none';\n    return element;\n  },\n\n  show: function(element) {\n    element = $(element);\n    element.style.display = '';\n    return element;\n  },\n\n  remove: function(element) {\n    element = $(element);\n    element.parentNode.removeChild(element);\n    return element;\n  },\n\n  update: (function(){\n\n    var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){\n      var el = document.createElement(\"select\"),\n          isBuggy = true;\n      el.innerHTML = \"<option value=\\\"test\\\">test</option>\";\n      if (el.options && el.options[0]) {\n        isBuggy = el.options[0].nodeName.toUpperCase() !== \"OPTION\";\n      }\n      el = null;\n      return isBuggy;\n    })();\n\n    var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){\n      try {\n        var el = document.createElement(\"table\");\n        if (el && el.tBodies) {\n          el.innerHTML = \"<tbody><tr><td>test</td></tr></tbody>\";\n          var isBuggy = typeof el.tBodies[0] == \"undefined\";\n          el = null;\n          return isBuggy;\n        }\n      } catch (e) {\n        return true;\n      }\n    })();\n\n    var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {\n      var s = document.createElement(\"script\"),\n          isBuggy = false;\n      try {\n        s.appendChild(document.createTextNode(\"\"));\n        isBuggy = !s.firstChild ||\n          s.firstChild && s.firstChild.nodeType !== 3;\n      } catch (e) {\n        isBuggy = true;\n      }\n      s = null;\n      return isBuggy;\n    })();\n\n    function update(element, content) {\n      element = $(element);\n\n      if (content && content.toElement)\n        content = content.toElement();\n\n      if (Object.isElement(content))\n        return element.update().insert(content);\n\n      content = Object.toHTML(content);\n\n      var tagName = element.tagName.toUpperCase();\n\n      if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {\n        element.text = content;\n        return element;\n      }\n\n      if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {\n        if (tagName in Element._insertionTranslations.tags) {\n          while (element.firstChild) {\n            element.removeChild(element.firstChild);\n          }\n          Element._getContentFromAnonymousElement(tagName, content.stripScripts())\n            .each(function(node) {\n              element.appendChild(node)\n            });\n        }\n        else {\n          element.innerHTML = content.stripScripts();\n        }\n      }\n      else {\n        element.innerHTML = content.stripScripts();\n      }\n\n      content.evalScripts.bind(content).defer();\n      return element;\n    }\n\n    return update;\n  })(),\n\n  replace: function(element, content) {\n    element = $(element);\n    if (content && content.toElement) content = content.toElement();\n    else if (!Object.isElement(content)) {\n      content = Object.toHTML(content);\n      var range = element.ownerDocument.createRange();\n      range.selectNode(element);\n      content.evalScripts.bind(content).defer();\n      content = range.createContextualFragment(content.stripScripts());\n    }\n    element.parentNode.replaceChild(content, element);\n    return element;\n  },\n\n  insert: function(element, insertions) {\n    element = $(element);\n\n    if (Object.isString(insertions) || Object.isNumber(insertions) ||\n        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))\n          insertions = {bottom:insertions};\n\n    var content, insert, tagName, childNodes;\n\n    for (var position in insertions) {\n      content  = insertions[position];\n      position = position.toLowerCase();\n      insert = Element._insertionTranslations[position];\n\n      if (content && content.toElement) content = content.toElement();\n      if (Object.isElement(content)) {\n        insert(element, content);\n        continue;\n      }\n\n      content = Object.toHTML(content);\n\n      tagName = ((position == 'before' || position == 'after')\n        ? element.parentNode : element).tagName.toUpperCase();\n\n      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());\n\n      if (position == 'top' || position == 'after') childNodes.reverse();\n      childNodes.each(insert.curry(element));\n\n      content.evalScripts.bind(content).defer();\n    }\n\n    return element;\n  },\n\n  wrap: function(element, wrapper, attributes) {\n    element = $(element);\n    if (Object.isElement(wrapper))\n      $(wrapper).writeAttribute(attributes || { });\n    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);\n    else wrapper = new Element('div', wrapper);\n    if (element.parentNode)\n      element.parentNode.replaceChild(wrapper, element);\n    wrapper.appendChild(element);\n    return wrapper;\n  },\n\n  inspect: function(element) {\n    element = $(element);\n    var result = '<' + element.tagName.toLowerCase();\n    $H({'id': 'id', 'className': 'class'}).each(function(pair) {\n      var property = pair.first(), attribute = pair.last();\n      var value = (element[property] || '').toString();\n      if (value) result += ' ' + attribute + '=' + value.inspect(true);\n    });\n    return result + '>';\n  },\n\n  recursivelyCollect: function(element, property) {\n    element = $(element);\n    var elements = [];\n    while (element = element[property])\n      if (element.nodeType == 1)\n        elements.push(Element.extend(element));\n    return elements;\n  },\n\n  ancestors: function(element) {\n    return Element.recursivelyCollect(element, 'parentNode');\n  },\n\n  descendants: function(element) {\n    return Element.select(element, \"*\");\n  },\n\n  firstDescendant: function(element) {\n    element = $(element).firstChild;\n    while (element && element.nodeType != 1) element = element.nextSibling;\n    return $(element);\n  },\n\n  immediateDescendants: function(element) {\n    if (!(element = $(element).firstChild)) return [];\n    while (element && element.nodeType != 1) element = element.nextSibling;\n    if (element) return [element].concat($(element).nextSiblings());\n    return [];\n  },\n\n  previousSiblings: function(element) {\n    return Element.recursivelyCollect(element, 'previousSibling');\n  },\n\n  nextSiblings: function(element) {\n    return Element.recursivelyCollect(element, 'nextSibling');\n  },\n\n  siblings: function(element) {\n    element = $(element);\n    return Element.previousSiblings(element).reverse()\n      .concat(Element.nextSiblings(element));\n  },\n\n  match: function(element, selector) {\n    if (Object.isString(selector))\n      selector = new Selector(selector);\n    return selector.match($(element));\n  },\n\n  up: function(element, expression, index) {\n    element = $(element);\n    if (arguments.length == 1) return $(element.parentNode);\n    var ancestors = Element.ancestors(element);\n    return Object.isNumber(expression) ? ancestors[expression] :\n      Selector.findElement(ancestors, expression, index);\n  },\n\n  down: function(element, expression, index) {\n    element = $(element);\n    if (arguments.length == 1) return Element.firstDescendant(element);\n    return Object.isNumber(expression) ? Element.descendants(element)[expression] :\n      Element.select(element, expression)[index || 0];\n  },\n\n  previous: function(element, expression, index) {\n    element = $(element);\n    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));\n    var previousSiblings = Element.previousSiblings(element);\n    return Object.isNumber(expression) ? previousSiblings[expression] :\n      Selector.findElement(previousSiblings, expression, index);\n  },\n\n  next: function(element, expression, index) {\n    element = $(element);\n    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));\n    var nextSiblings = Element.nextSiblings(element);\n    return Object.isNumber(expression) ? nextSiblings[expression] :\n      Selector.findElement(nextSiblings, expression, index);\n  },\n\n\n  select: function(element) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return Selector.findChildElements(element, args);\n  },\n\n  adjacent: function(element) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return Selector.findChildElements(element.parentNode, args).without(element);\n  },\n\n  identify: function(element) {\n    element = $(element);\n    var id = Element.readAttribute(element, 'id');\n    if (id) return id;\n    do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));\n    Element.writeAttribute(element, 'id', id);\n    return id;\n  },\n\n  readAttribute: function(element, name) {\n    element = $(element);\n    if (Prototype.Browser.IE) {\n      var t = Element._attributeTranslations.read;\n      if (t.values[name]) return t.values[name](element, name);\n      if (t.names[name]) name = t.names[name];\n      if (name.include(':')) {\n        return (!element.attributes || !element.attributes[name]) ? null :\n         element.attributes[name].value;\n      }\n    }\n    return element.getAttribute(name);\n  },\n\n  writeAttribute: function(element, name, value) {\n    element = $(element);\n    var attributes = { }, t = Element._attributeTranslations.write;\n\n    if (typeof name == 'object') attributes = name;\n    else attributes[name] = Object.isUndefined(value) ? true : value;\n\n    for (var attr in attributes) {\n      name = t.names[attr] || attr;\n      value = attributes[attr];\n      if (t.values[attr]) name = t.values[attr](element, value);\n      if (value === false || value === null)\n        element.removeAttribute(name);\n      else if (value === true)\n        element.setAttribute(name, name);\n      else element.setAttribute(name, value);\n    }\n    return element;\n  },\n\n  getHeight: function(element) {\n    return Element.getDimensions(element).height;\n  },\n\n  getWidth: function(element) {\n    return Element.getDimensions(element).width;\n  },\n\n  classNames: function(element) {\n    return new Element.ClassNames(element);\n  },\n\n  hasClassName: function(element, className) {\n    if (!(element = $(element))) return;\n    var elementClassName = element.className;\n    return (elementClassName.length > 0 && (elementClassName == className ||\n      new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n  },\n\n  addClassName: function(element, className) {\n    if (!(element = $(element))) return;\n    if (!Element.hasClassName(element, className))\n      element.className += (element.className ? ' ' : '') + className;\n    return element;\n  },\n\n  removeClassName: function(element, className) {\n    if (!(element = $(element))) return;\n    element.className = element.className.replace(\n      new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' ').strip();\n    return element;\n  },\n\n  toggleClassName: function(element, className) {\n    if (!(element = $(element))) return;\n    return Element[Element.hasClassName(element, className) ?\n      'removeClassName' : 'addClassName'](element, className);\n  },\n\n  cleanWhitespace: function(element) {\n    element = $(element);\n    var node = element.firstChild;\n    while (node) {\n      var nextNode = node.nextSibling;\n      if (node.nodeType == 3 && !/\\S/.test(node.nodeValue))\n        element.removeChild(node);\n      node = nextNode;\n    }\n    return element;\n  },\n\n  empty: function(element) {\n    return $(element).innerHTML.blank();\n  },\n\n  descendantOf: function(element, ancestor) {\n    element = $(element), ancestor = $(ancestor);\n\n    if (element.compareDocumentPosition)\n      return (element.compareDocumentPosition(ancestor) & 8) === 8;\n\n    if (ancestor.contains)\n      return ancestor.contains(element) && ancestor !== element;\n\n    while (element = element.parentNode)\n      if (element == ancestor) return true;\n\n    return false;\n  },\n\n  scrollTo: function(element) {\n    element = $(element);\n    var pos = Element.cumulativeOffset(element);\n    window.scrollTo(pos[0], pos[1]);\n    return element;\n  },\n\n  getStyle: function(element, style) {\n    element = $(element);\n    style = style == 'float' ? 'cssFloat' : style.camelize();\n    var value = element.style[style];\n    if (!value || value == 'auto') {\n      var css = document.defaultView.getComputedStyle(element, null);\n      value = css ? css[style] : null;\n    }\n    if (style == 'opacity') return value ? parseFloat(value) : 1.0;\n    return value == 'auto' ? null : value;\n  },\n\n  getOpacity: function(element) {\n    return $(element).getStyle('opacity');\n  },\n\n  setStyle: function(element, styles) {\n    element = $(element);\n    var elementStyle = element.style, match;\n    if (Object.isString(styles)) {\n      element.style.cssText += ';' + styles;\n      return styles.include('opacity') ?\n        element.setOpacity(styles.match(/opacity:\\s*(\\d?\\.?\\d*)/)[1]) : element;\n    }\n    for (var property in styles)\n      if (property == 'opacity') element.setOpacity(styles[property]);\n      else\n        elementStyle[(property == 'float' || property == 'cssFloat') ?\n          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :\n            property] = styles[property];\n\n    return element;\n  },\n\n  setOpacity: function(element, value) {\n    element = $(element);\n    element.style.opacity = (value == 1 || value === '') ? '' :\n      (value < 0.00001) ? 0 : value;\n    return element;\n  },\n\n  getDimensions: function(element) {\n    element = $(element);\n    var display = Element.getStyle(element, 'display');\n    if (display != 'none' && display != null) // Safari bug\n      return {width: element.offsetWidth, height: element.offsetHeight};\n\n    var els = element.style;\n    var originalVisibility = els.visibility;\n    var originalPosition = els.position;\n    var originalDisplay = els.display;\n    els.visibility = 'hidden';\n    if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari\n      els.position = 'absolute';\n    els.display = 'block';\n    var originalWidth = element.clientWidth;\n    var originalHeight = element.clientHeight;\n    els.display = originalDisplay;\n    els.position = originalPosition;\n    els.visibility = originalVisibility;\n    return {width: originalWidth, height: originalHeight};\n  },\n\n  makePositioned: function(element) {\n    element = $(element);\n    var pos = Element.getStyle(element, 'position');\n    if (pos == 'static' || !pos) {\n      element._madePositioned = true;\n      element.style.position = 'relative';\n      if (Prototype.Browser.Opera) {\n        element.style.top = 0;\n        element.style.left = 0;\n      }\n    }\n    return element;\n  },\n\n  undoPositioned: function(element) {\n    element = $(element);\n    if (element._madePositioned) {\n      element._madePositioned = undefined;\n      element.style.position =\n        element.style.top =\n        element.style.left =\n        element.style.bottom =\n        element.style.right = '';\n    }\n    return element;\n  },\n\n  makeClipping: function(element) {\n    element = $(element);\n    if (element._overflow) return element;\n    element._overflow = Element.getStyle(element, 'overflow') || 'auto';\n    if (element._overflow !== 'hidden')\n      element.style.overflow = 'hidden';\n    return element;\n  },\n\n  undoClipping: function(element) {\n    element = $(element);\n    if (!element._overflow) return element;\n    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;\n    element._overflow = null;\n    return element;\n  },\n\n  cumulativeOffset: function(element) {\n    var valueT = 0, valueL = 0;\n    do {\n      valueT += element.offsetTop  || 0;\n      valueL += element.offsetLeft || 0;\n      element = element.offsetParent;\n    } while (element);\n    return Element._returnOffset(valueL, valueT);\n  },\n\n  positionedOffset: function(element) {\n    var valueT = 0, valueL = 0;\n    do {\n      valueT += element.offsetTop  || 0;\n      valueL += element.offsetLeft || 0;\n      element = element.offsetParent;\n      if (element) {\n        if (element.tagName.toUpperCase() == 'BODY') break;\n        var p = Element.getStyle(element, 'position');\n        if (p !== 'static') break;\n      }\n    } while (element);\n    return Element._returnOffset(valueL, valueT);\n  },\n\n  absolutize: function(element) {\n    element = $(element);\n    if (Element.getStyle(element, 'position') == 'absolute') return element;\n\n    var offsets = Element.positionedOffset(element);\n    var top     = offsets[1];\n    var left    = offsets[0];\n    var width   = element.clientWidth;\n    var height  = element.clientHeight;\n\n    element._originalLeft   = left - parseFloat(element.style.left  || 0);\n    element._originalTop    = top  - parseFloat(element.style.top || 0);\n    element._originalWidth  = element.style.width;\n    element._originalHeight = element.style.height;\n\n    element.style.position = 'absolute';\n    element.style.top    = top + 'px';\n    element.style.left   = left + 'px';\n    element.style.width  = width + 'px';\n    element.style.height = height + 'px';\n    return element;\n  },\n\n  relativize: function(element) {\n    element = $(element);\n    if (Element.getStyle(element, 'position') == 'relative') return element;\n\n    element.style.position = 'relative';\n    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);\n    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);\n\n    element.style.top    = top + 'px';\n    element.style.left   = left + 'px';\n    element.style.height = element._originalHeight;\n    element.style.width  = element._originalWidth;\n    return element;\n  },\n\n  cumulativeScrollOffset: function(element) {\n    var valueT = 0, valueL = 0;\n    do {\n      valueT += element.scrollTop  || 0;\n      valueL += element.scrollLeft || 0;\n      element = element.parentNode;\n    } while (element);\n    return Element._returnOffset(valueL, valueT);\n  },\n\n  getOffsetParent: function(element) {\n    if (element.offsetParent) return $(element.offsetParent);\n    if (element == document.body) return $(element);\n\n    while ((element = element.parentNode) && element != document.body)\n      if (Element.getStyle(element, 'position') != 'static')\n        return $(element);\n\n    return $(document.body);\n  },\n\n  viewportOffset: function(forElement) {\n    var valueT = 0, valueL = 0;\n\n    var element = forElement;\n    do {\n      valueT += element.offsetTop  || 0;\n      valueL += element.offsetLeft || 0;\n\n      if (element.offsetParent == document.body &&\n        Element.getStyle(element, 'position') == 'absolute') break;\n\n    } while (element = element.offsetParent);\n\n    element = forElement;\n    do {\n      if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {\n        valueT -= element.scrollTop  || 0;\n        valueL -= element.scrollLeft || 0;\n      }\n    } while (element = element.parentNode);\n\n    return Element._returnOffset(valueL, valueT);\n  },\n\n  clonePosition: function(element, source) {\n    var options = Object.extend({\n      setLeft:    true,\n      setTop:     true,\n      setWidth:   true,\n      setHeight:  true,\n      offsetTop:  0,\n      offsetLeft: 0\n    }, arguments[2] || { });\n\n    source = $(source);\n    var p = Element.viewportOffset(source);\n\n    element = $(element);\n    var delta = [0, 0];\n    var parent = null;\n    if (Element.getStyle(element, 'position') == 'absolute') {\n      parent = Element.getOffsetParent(element);\n      delta = Element.viewportOffset(parent);\n    }\n\n    if (parent == document.body) {\n      delta[0] -= document.body.offsetLeft;\n      delta[1] -= document.body.offsetTop;\n    }\n\n    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';\n    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';\n    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';\n    if (options.setHeight) element.style.height = source.offsetHeight + 'px';\n    return element;\n  }\n};\n\nObject.extend(Element.Methods, {\n  getElementsBySelector: Element.Methods.select,\n\n  childElements: Element.Methods.immediateDescendants\n});\n\nElement._attributeTranslations = {\n  write: {\n    names: {\n      className: 'class',\n      htmlFor:   'for'\n    },\n    values: { }\n  }\n};\n\nif (Prototype.Browser.Opera) {\n  Element.Methods.getStyle = Element.Methods.getStyle.wrap(\n    function(proceed, element, style) {\n      switch (style) {\n        case 'left': case 'top': case 'right': case 'bottom':\n          if (proceed(element, 'position') === 'static') return null;\n        case 'height': case 'width':\n          if (!Element.visible(element)) return null;\n\n          var dim = parseInt(proceed(element, style), 10);\n\n          if (dim !== element['offset' + style.capitalize()])\n            return dim + 'px';\n\n          var properties;\n          if (style === 'height') {\n            properties = ['border-top-width', 'padding-top',\n             'padding-bottom', 'border-bottom-width'];\n          }\n          else {\n            properties = ['border-left-width', 'padding-left',\n             'padding-right', 'border-right-width'];\n          }\n          return properties.inject(dim, function(memo, property) {\n            var val = proceed(element, property);\n            return val === null ? memo : memo - parseInt(val, 10);\n          }) + 'px';\n        default: return proceed(element, style);\n      }\n    }\n  );\n\n  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(\n    function(proceed, element, attribute) {\n      if (attribute === 'title') return element.title;\n      return proceed(element, attribute);\n    }\n  );\n}\n\nelse if (Prototype.Browser.IE) {\n  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(\n    function(proceed, element) {\n      element = $(element);\n      try { element.offsetParent }\n      catch(e) { return $(document.body) }\n      var position = element.getStyle('position');\n      if (position !== 'static') return proceed(element);\n      element.setStyle({ position: 'relative' });\n      var value = proceed(element);\n      element.setStyle({ position: position });\n      return value;\n    }\n  );\n\n  $w('positionedOffset viewportOffset').each(function(method) {\n    Element.Methods[method] = Element.Methods[method].wrap(\n      function(proceed, element) {\n        element = $(element);\n        try { element.offsetParent }\n        catch(e) { return Element._returnOffset(0,0) }\n        var position = element.getStyle('position');\n        if (position !== 'static') return proceed(element);\n        var offsetParent = element.getOffsetParent();\n        if (offsetParent && offsetParent.getStyle('position') === 'fixed')\n          offsetParent.setStyle({ zoom: 1 });\n        element.setStyle({ position: 'relative' });\n        var value = proceed(element);\n        element.setStyle({ position: position });\n        return value;\n      }\n    );\n  });\n\n  Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(\n    function(proceed, element) {\n      try { element.offsetParent }\n      catch(e) { return Element._returnOffset(0,0) }\n      return proceed(element);\n    }\n  );\n\n  Element.Methods.getStyle = function(element, style) {\n    element = $(element);\n    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();\n    var value = element.style[style];\n    if (!value && element.currentStyle) value = element.currentStyle[style];\n\n    if (style == 'opacity') {\n      if (value = (element.getStyle('filter') || '').match(/alpha\\(opacity=(.*)\\)/))\n        if (value[1]) return parseFloat(value[1]) / 100;\n      return 1.0;\n    }\n\n    if (value == 'auto') {\n      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))\n        return element['offset' + style.capitalize()] + 'px';\n      return null;\n    }\n    return value;\n  };\n\n  Element.Methods.setOpacity = function(element, value) {\n    function stripAlpha(filter){\n      return filter.replace(/alpha\\([^\\)]*\\)/gi,'');\n    }\n    element = $(element);\n    var currentStyle = element.currentStyle;\n    if ((currentStyle && !currentStyle.hasLayout) ||\n      (!currentStyle && element.style.zoom == 'normal'))\n        element.style.zoom = 1;\n\n    var filter = element.getStyle('filter'), style = element.style;\n    if (value == 1 || value === '') {\n      (filter = stripAlpha(filter)) ?\n        style.filter = filter : style.removeAttribute('filter');\n      return element;\n    } else if (value < 0.00001) value = 0;\n    style.filter = stripAlpha(filter) +\n      'alpha(opacity=' + (value * 100) + ')';\n    return element;\n  };\n\n  Element._attributeTranslations = (function(){\n\n    var classProp = 'className';\n    var forProp = 'for';\n\n    var el = document.createElement('div');\n\n    el.setAttribute(classProp, 'x');\n\n    if (el.className !== 'x') {\n      el.setAttribute('class', 'x');\n      if (el.className === 'x') {\n        classProp = 'class';\n      }\n    }\n    el = null;\n\n    el = document.createElement('label');\n    el.setAttribute(forProp, 'x');\n    if (el.htmlFor !== 'x') {\n      el.setAttribute('htmlFor', 'x');\n      if (el.htmlFor === 'x') {\n        forProp = 'htmlFor';\n      }\n    }\n    el = null;\n\n    return {\n      read: {\n        names: {\n          'class':      classProp,\n          'className':  classProp,\n          'for':        forProp,\n          'htmlFor':    forProp\n        },\n        values: {\n          _getAttr: function(element, attribute) {\n            return element.getAttribute(attribute);\n          },\n          _getAttr2: function(element, attribute) {\n            return element.getAttribute(attribute, 2);\n          },\n          _getAttrNode: function(element, attribute) {\n            var node = element.getAttributeNode(attribute);\n            return node ? node.value : \"\";\n          },\n          _getEv: (function(){\n\n            var el = document.createElement('div');\n            el.onclick = Prototype.emptyFunction;\n            var value = el.getAttribute('onclick');\n            var f;\n\n            if (String(value).indexOf('{') > -1) {\n              f = function(element, attribute) {\n                attribute = element.getAttribute(attribute);\n                if (!attribute) return null;\n                attribute = attribute.toString();\n                attribute = attribute.split('{')[1];\n                attribute = attribute.split('}')[0];\n                return attribute.strip();\n              };\n            }\n            else if (value === '') {\n              f = function(element, attribute) {\n                attribute = element.getAttribute(attribute);\n                if (!attribute) return null;\n                return attribute.strip();\n              };\n            }\n            el = null;\n            return f;\n          })(),\n          _flag: function(element, attribute) {\n            return $(element).hasAttribute(attribute) ? attribute : null;\n          },\n          style: function(element) {\n            return element.style.cssText.toLowerCase();\n          },\n          title: function(element) {\n            return element.title;\n          }\n        }\n      }\n    }\n  })();\n\n  Element._attributeTranslations.write = {\n    names: Object.extend({\n      cellpadding: 'cellPadding',\n      cellspacing: 'cellSpacing'\n    }, Element._attributeTranslations.read.names),\n    values: {\n      checked: function(element, value) {\n        element.checked = !!value;\n      },\n\n      style: function(element, value) {\n        element.style.cssText = value ? value : '';\n      }\n    }\n  };\n\n  Element._attributeTranslations.has = {};\n\n  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +\n      'encType maxLength readOnly longDesc frameBorder').each(function(attr) {\n    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;\n    Element._attributeTranslations.has[attr.toLowerCase()] = attr;\n  });\n\n  (function(v) {\n    Object.extend(v, {\n      href:        v._getAttr2,\n      src:         v._getAttr2,\n      type:        v._getAttr,\n      action:      v._getAttrNode,\n      disabled:    v._flag,\n      checked:     v._flag,\n      readonly:    v._flag,\n      multiple:    v._flag,\n      onload:      v._getEv,\n      onunload:    v._getEv,\n      onclick:     v._getEv,\n      ondblclick:  v._getEv,\n      onmousedown: v._getEv,\n      onmouseup:   v._getEv,\n      onmouseover: v._getEv,\n      onmousemove: v._getEv,\n      onmouseout:  v._getEv,\n      onfocus:     v._getEv,\n      onblur:      v._getEv,\n      onkeypress:  v._getEv,\n      onkeydown:   v._getEv,\n      onkeyup:     v._getEv,\n      onsubmit:    v._getEv,\n      onreset:     v._getEv,\n      onselect:    v._getEv,\n      onchange:    v._getEv\n    });\n  })(Element._attributeTranslations.read.values);\n\n  if (Prototype.BrowserFeatures.ElementExtensions) {\n    (function() {\n      function _descendants(element) {\n        var nodes = element.getElementsByTagName('*'), results = [];\n        for (var i = 0, node; node = nodes[i]; i++)\n          if (node.tagName !== \"!\") // Filter out comment nodes.\n            results.push(node);\n        return results;\n      }\n\n      Element.Methods.down = function(element, expression, index) {\n        element = $(element);\n        if (arguments.length == 1) return element.firstDescendant();\n        return Object.isNumber(expression) ? _descendants(element)[expression] :\n          Element.select(element, expression)[index || 0];\n      }\n    })();\n  }\n\n}\n\nelse if (Prototype.Browser.Gecko && /rv:1\\.8\\.0/.test(navigator.userAgent)) {\n  Element.Methods.setOpacity = function(element, value) {\n    element = $(element);\n    element.style.opacity = (value == 1) ? 0.999999 :\n      (value === '') ? '' : (value < 0.00001) ? 0 : value;\n    return element;\n  };\n}\n\nelse if (Prototype.Browser.WebKit) {\n  Element.Methods.setOpacity = function(element, value) {\n    element = $(element);\n    element.style.opacity = (value == 1 || value === '') ? '' :\n      (value < 0.00001) ? 0 : value;\n\n    if (value == 1)\n      if(element.tagName.toUpperCase() == 'IMG' && element.width) {\n        element.width++; element.width--;\n      } else try {\n        var n = document.createTextNode(' ');\n        element.appendChild(n);\n        element.removeChild(n);\n      } catch (e) { }\n\n    return element;\n  };\n\n  Element.Methods.cumulativeOffset = function(element) {\n    var valueT = 0, valueL = 0;\n    do {\n      valueT += element.offsetTop  || 0;\n      valueL += element.offsetLeft || 0;\n      if (element.offsetParent == document.body)\n        if (Element.getStyle(element, 'position') == 'absolute') break;\n\n      element = element.offsetParent;\n    } while (element);\n\n    return Element._returnOffset(valueL, valueT);\n  };\n}\n\nif ('outerHTML' in document.documentElement) {\n  Element.Methods.replace = function(element, content) {\n    element = $(element);\n\n    if (content && content.toElement) content = content.toElement();\n    if (Object.isElement(content)) {\n      element.parentNode.replaceChild(content, element);\n      return element;\n    }\n\n    content = Object.toHTML(content);\n    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();\n\n    if (Element._insertionTranslations.tags[tagName]) {\n      var nextSibling = element.next();\n      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());\n      parent.removeChild(element);\n      if (nextSibling)\n        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });\n      else\n        fragments.each(function(node) { parent.appendChild(node) });\n    }\n    else element.outerHTML = content.stripScripts();\n\n    content.evalScripts.bind(content).defer();\n    return element;\n  };\n}\n\nElement._returnOffset = function(l, t) {\n  var result = [l, t];\n  result.left = l;\n  result.top = t;\n  return result;\n};\n\nElement._getContentFromAnonymousElement = function(tagName, html) {\n  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];\n  if (t) {\n    div.innerHTML = t[0] + html + t[1];\n    t[2].times(function() { div = div.firstChild });\n  } else div.innerHTML = html;\n  return $A(div.childNodes);\n};\n\nElement._insertionTranslations = {\n  before: function(element, node) {\n    element.parentNode.insertBefore(node, element);\n  },\n  top: function(element, node) {\n    element.insertBefore(node, element.firstChild);\n  },\n  bottom: function(element, node) {\n    element.appendChild(node);\n  },\n  after: function(element, node) {\n    element.parentNode.insertBefore(node, element.nextSibling);\n  },\n  tags: {\n    TABLE:  ['<table>',                '</table>',                   1],\n    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],\n    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],\n    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],\n    SELECT: ['<select>',               '</select>',                  1]\n  }\n};\n\n(function() {\n  var tags = Element._insertionTranslations.tags;\n  Object.extend(tags, {\n    THEAD: tags.TBODY,\n    TFOOT: tags.TBODY,\n    TH:    tags.TD\n  });\n})();\n\nElement.Methods.Simulated = {\n  hasAttribute: function(element, attribute) {\n    attribute = Element._attributeTranslations.has[attribute] || attribute;\n    var node = $(element).getAttributeNode(attribute);\n    return !!(node && node.specified);\n  }\n};\n\nElement.Methods.ByTag = { };\n\nObject.extend(Element, Element.Methods);\n\n(function(div) {\n\n  if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {\n    window.HTMLElement = { };\n    window.HTMLElement.prototype = div['__proto__'];\n    Prototype.BrowserFeatures.ElementExtensions = true;\n  }\n\n  div = null;\n\n})(document.createElement('div'))\n\nElement.extend = (function() {\n\n  function checkDeficiency(tagName) {\n    if (typeof window.Element != 'undefined') {\n      var proto = window.Element.prototype;\n      if (proto) {\n        var id = '_' + (Math.random()+'').slice(2);\n        var el = document.createElement(tagName);\n        proto[id] = 'x';\n        var isBuggy = (el[id] !== 'x');\n        delete proto[id];\n        el = null;\n        return isBuggy;\n      }\n    }\n    return false;\n  }\n\n  function extendElementWith(element, methods) {\n    for (var property in methods) {\n      var value = methods[property];\n      if (Object.isFunction(value) && !(property in element))\n        element[property] = value.methodize();\n    }\n  }\n\n  var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');\n\n  if (Prototype.BrowserFeatures.SpecificElementExtensions) {\n    if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {\n      return function(element) {\n        if (element && typeof element._extendedByPrototype == 'undefined') {\n          var t = element.tagName;\n          if (t && (/^(?:object|applet|embed)$/i.test(t))) {\n            extendElementWith(element, Element.Methods);\n            extendElementWith(element, Element.Methods.Simulated);\n            extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);\n          }\n        }\n        return element;\n      }\n    }\n    return Prototype.K;\n  }\n\n  var Methods = { }, ByTag = Element.Methods.ByTag;\n\n  var extend = Object.extend(function(element) {\n    if (!element || typeof element._extendedByPrototype != 'undefined' ||\n        element.nodeType != 1 || element == window) return element;\n\n    var methods = Object.clone(Methods),\n        tagName = element.tagName.toUpperCase();\n\n    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);\n\n    extendElementWith(element, methods);\n\n    element._extendedByPrototype = Prototype.emptyFunction;\n    return element;\n\n  }, {\n    refresh: function() {\n      if (!Prototype.BrowserFeatures.ElementExtensions) {\n        Object.extend(Methods, Element.Methods);\n        Object.extend(Methods, Element.Methods.Simulated);\n      }\n    }\n  });\n\n  extend.refresh();\n  return extend;\n})();\n\nElement.hasAttribute = function(element, attribute) {\n  if (element.hasAttribute) return element.hasAttribute(attribute);\n  return Element.Methods.Simulated.hasAttribute(element, attribute);\n};\n\nElement.addMethods = function(methods) {\n  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;\n\n  if (!methods) {\n    Object.extend(Form, Form.Methods);\n    Object.extend(Form.Element, Form.Element.Methods);\n    Object.extend(Element.Methods.ByTag, {\n      \"FORM\":     Object.clone(Form.Methods),\n      \"INPUT\":    Object.clone(Form.Element.Methods),\n      \"SELECT\":   Object.clone(Form.Element.Methods),\n      \"TEXTAREA\": Object.clone(Form.Element.Methods)\n    });\n  }\n\n  if (arguments.length == 2) {\n    var tagName = methods;\n    methods = arguments[1];\n  }\n\n  if (!tagName) Object.extend(Element.Methods, methods || { });\n  else {\n    if (Object.isArray(tagName)) tagName.each(extend);\n    else extend(tagName);\n  }\n\n  function extend(tagName) {\n    tagName = tagName.toUpperCase();\n    if (!Element.Methods.ByTag[tagName])\n      Element.Methods.ByTag[tagName] = { };\n    Object.extend(Element.Methods.ByTag[tagName], methods);\n  }\n\n  function copy(methods, destination, onlyIfAbsent) {\n    onlyIfAbsent = onlyIfAbsent || false;\n    for (var property in methods) {\n      var value = methods[property];\n      if (!Object.isFunction(value)) continue;\n      if (!onlyIfAbsent || !(property in destination))\n        destination[property] = value.methodize();\n    }\n  }\n\n  function findDOMClass(tagName) {\n    var klass;\n    var trans = {\n      \"OPTGROUP\": \"OptGroup\", \"TEXTAREA\": \"TextArea\", \"P\": \"Paragraph\",\n      \"FIELDSET\": \"FieldSet\", \"UL\": \"UList\", \"OL\": \"OList\", \"DL\": \"DList\",\n      \"DIR\": \"Directory\", \"H1\": \"Heading\", \"H2\": \"Heading\", \"H3\": \"Heading\",\n      \"H4\": \"Heading\", \"H5\": \"Heading\", \"H6\": \"Heading\", \"Q\": \"Quote\",\n      \"INS\": \"Mod\", \"DEL\": \"Mod\", \"A\": \"Anchor\", \"IMG\": \"Image\", \"CAPTION\":\n      \"TableCaption\", \"COL\": \"TableCol\", \"COLGROUP\": \"TableCol\", \"THEAD\":\n      \"TableSection\", \"TFOOT\": \"TableSection\", \"TBODY\": \"TableSection\", \"TR\":\n      \"TableRow\", \"TH\": \"TableCell\", \"TD\": \"TableCell\", \"FRAMESET\":\n      \"FrameSet\", \"IFRAME\": \"IFrame\"\n    };\n    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';\n    if (window[klass]) return window[klass];\n    klass = 'HTML' + tagName + 'Element';\n    if (window[klass]) return window[klass];\n    klass = 'HTML' + tagName.capitalize() + 'Element';\n    if (window[klass]) return window[klass];\n\n    var element = document.createElement(tagName);\n    var proto = element['__proto__'] || element.constructor.prototype;\n    element = null;\n    return proto;\n  }\n\n  var elementPrototype = window.HTMLElement ? HTMLElement.prototype :\n   Element.prototype;\n\n  if (F.ElementExtensions) {\n    copy(Element.Methods, elementPrototype);\n    copy(Element.Methods.Simulated, elementPrototype, true);\n  }\n\n  if (F.SpecificElementExtensions) {\n    for (var tag in Element.Methods.ByTag) {\n      var klass = findDOMClass(tag);\n      if (Object.isUndefined(klass)) continue;\n      copy(T[tag], klass.prototype);\n    }\n  }\n\n  Object.extend(Element, Element.Methods);\n  delete Element.ByTag;\n\n  if (Element.extend.refresh) Element.extend.refresh();\n  Element.cache = { };\n};\n\n\ndocument.viewport = {\n\n  getDimensions: function() {\n    return { width: this.getWidth(), height: this.getHeight() };\n  },\n\n  getScrollOffsets: function() {\n    return Element._returnOffset(\n      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,\n      window.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop);\n  }\n};\n\n(function(viewport) {\n  var B = Prototype.Browser, doc = document, element, property = {};\n\n  function getRootElement() {\n    if (B.WebKit && !doc.evaluate)\n      return document;\n\n    if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)\n      return document.body;\n\n    return document.documentElement;\n  }\n\n  function define(D) {\n    if (!element) element = getRootElement();\n\n    property[D] = 'client' + D;\n\n    viewport['get' + D] = function() { return element[property[D]] };\n    return viewport['get' + D]();\n  }\n\n  viewport.getWidth  = define.curry('Width');\n\n  viewport.getHeight = define.curry('Height');\n})(document.viewport);\n\n\nElement.Storage = {\n  UID: 1\n};\n\nElement.addMethods({\n  getStorage: function(element) {\n    if (!(element = $(element))) return;\n\n    var uid;\n    if (element === window) {\n      uid = 0;\n    } else {\n      if (typeof element._prototypeUID === \"undefined\")\n        element._prototypeUID = [Element.Storage.UID++];\n      uid = element._prototypeUID[0];\n    }\n\n    if (!Element.Storage[uid])\n      Element.Storage[uid] = $H();\n\n    return Element.Storage[uid];\n  },\n\n  store: function(element, key, value) {\n    if (!(element = $(element))) return;\n\n    if (arguments.length === 2) {\n      Element.getStorage(element).update(key);\n    } else {\n      Element.getStorage(element).set(key, value);\n    }\n\n    return element;\n  },\n\n  retrieve: function(element, key, defaultValue) {\n    if (!(element = $(element))) return;\n    var hash = Element.getStorage(element), value = hash.get(key);\n\n    if (Object.isUndefined(value)) {\n      hash.set(key, defaultValue);\n      value = defaultValue;\n    }\n\n    return value;\n  },\n\n  clone: function(element, deep) {\n    if (!(element = $(element))) return;\n    var clone = element.cloneNode(deep);\n    clone._prototypeUID = void 0;\n    if (deep) {\n      var descendants = Element.select(clone, '*'),\n          i = descendants.length;\n      while (i--) {\n        descendants[i]._prototypeUID = void 0;\n      }\n    }\n    return Element.extend(clone);\n  }\n});\n/* Portions of the Selector class are derived from Jack Slocum's DomQuery,\n * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style\n * license.  Please see http://www.yui-ext.com/ for more information. */\n\nvar Selector = Class.create({\n  initialize: function(expression) {\n    this.expression = expression.strip();\n\n    if (this.shouldUseSelectorsAPI()) {\n      this.mode = 'selectorsAPI';\n    } else if (this.shouldUseXPath()) {\n      this.mode = 'xpath';\n      this.compileXPathMatcher();\n    } else {\n      this.mode = \"normal\";\n      this.compileMatcher();\n    }\n\n  },\n\n  shouldUseXPath: (function() {\n\n    var IS_DESCENDANT_SELECTOR_BUGGY = (function(){\n      var isBuggy = false;\n      if (document.evaluate && window.XPathResult) {\n        var el = document.createElement('div');\n        el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';\n\n        var xpath = \".//*[local-name()='ul' or local-name()='UL']\" +\n          \"//*[local-name()='li' or local-name()='LI']\";\n\n        var result = document.evaluate(xpath, el, null,\n          XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n\n        isBuggy = (result.snapshotLength !== 2);\n        el = null;\n      }\n      return isBuggy;\n    })();\n\n    return function() {\n      if (!Prototype.BrowserFeatures.XPath) return false;\n\n      var e = this.expression;\n\n      if (Prototype.Browser.WebKit &&\n       (e.include(\"-of-type\") || e.include(\":empty\")))\n        return false;\n\n      if ((/(\\[[\\w-]*?:|:checked)/).test(e))\n        return false;\n\n      if (IS_DESCENDANT_SELECTOR_BUGGY) return false;\n\n      return true;\n    }\n\n  })(),\n\n  shouldUseSelectorsAPI: function() {\n    if (!Prototype.BrowserFeatures.SelectorsAPI) return false;\n\n    if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;\n\n    if (!Selector._div) Selector._div = new Element('div');\n\n    try {\n      Selector._div.querySelector(this.expression);\n    } catch(e) {\n      return false;\n    }\n\n    return true;\n  },\n\n  compileMatcher: function() {\n    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,\n        c = Selector.criteria, le, p, m, len = ps.length, name;\n\n    if (Selector._cache[e]) {\n      this.matcher = Selector._cache[e];\n      return;\n    }\n\n    this.matcher = [\"this.matcher = function(root) {\",\n                    \"var r = root, h = Selector.handlers, c = false, n;\"];\n\n    while (e && le != e && (/\\S/).test(e)) {\n      le = e;\n      for (var i = 0; i<len; i++) {\n        p = ps[i].re;\n        name = ps[i].name;\n        if (m = e.match(p)) {\n          this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :\n            new Template(c[name]).evaluate(m));\n          e = e.replace(m[0], '');\n          break;\n        }\n      }\n    }\n\n    this.matcher.push(\"return h.unique(n);\\n}\");\n    eval(this.matcher.join('\\n'));\n    Selector._cache[this.expression] = this.matcher;\n  },\n\n  compileXPathMatcher: function() {\n    var e = this.expression, ps = Selector.patterns,\n        x = Selector.xpath, le, m, len = ps.length, name;\n\n    if (Selector._cache[e]) {\n      this.xpath = Selector._cache[e]; return;\n    }\n\n    this.matcher = ['.//*'];\n    while (e && le != e && (/\\S/).test(e)) {\n      le = e;\n      for (var i = 0; i<len; i++) {\n        name = ps[i].name;\n        if (m = e.match(ps[i].re)) {\n          this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :\n            new Template(x[name]).evaluate(m));\n          e = e.replace(m[0], '');\n          break;\n        }\n      }\n    }\n\n    this.xpath = this.matcher.join('');\n    Selector._cache[this.expression] = this.xpath;\n  },\n\n  findElements: function(root) {\n    root = root || document;\n    var e = this.expression, results;\n\n    switch (this.mode) {\n      case 'selectorsAPI':\n        if (root !== document) {\n          var oldId = root.id, id = $(root).identify();\n          id = id.replace(/([\\.:])/g, \"\\\\$1\");\n          e = \"#\" + id + \" \" + e;\n        }\n\n        results = $A(root.querySelectorAll(e)).map(Element.extend);\n        root.id = oldId;\n\n        return results;\n      case 'xpath':\n        return document._getElementsByXPath(this.xpath, root);\n      default:\n       return this.matcher(root);\n    }\n  },\n\n  match: function(element) {\n    this.tokens = [];\n\n    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;\n    var le, p, m, len = ps.length, name;\n\n    while (e && le !== e && (/\\S/).test(e)) {\n      le = e;\n      for (var i = 0; i<len; i++) {\n        p = ps[i].re;\n        name = ps[i].name;\n        if (m = e.match(p)) {\n          if (as[name]) {\n            this.tokens.push([name, Object.clone(m)]);\n            e = e.replace(m[0], '');\n          } else {\n            return this.findElements(document).include(element);\n          }\n        }\n      }\n    }\n\n    var match = true, name, matches;\n    for (var i = 0, token; token = this.tokens[i]; i++) {\n      name = token[0], matches = token[1];\n      if (!Selector.assertions[name](element, matches)) {\n        match = false; break;\n      }\n    }\n\n    return match;\n  },\n\n  toString: function() {\n    return this.expression;\n  },\n\n  inspect: function() {\n    return \"#<Selector:\" + this.expression.inspect() + \">\";\n  }\n});\n\nif (Prototype.BrowserFeatures.SelectorsAPI &&\n document.compatMode === 'BackCompat') {\n  Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){\n    var div = document.createElement('div'),\n     span = document.createElement('span');\n\n    div.id = \"prototype_test_id\";\n    span.className = 'Test';\n    div.appendChild(span);\n    var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);\n    div = span = null;\n    return isIgnored;\n  })();\n}\n\nObject.extend(Selector, {\n  _cache: { },\n\n  xpath: {\n    descendant:   \"//*\",\n    child:        \"/*\",\n    adjacent:     \"/following-sibling::*[1]\",\n    laterSibling: '/following-sibling::*',\n    tagName:      function(m) {\n      if (m[1] == '*') return '';\n      return \"[local-name()='\" + m[1].toLowerCase() +\n             \"' or local-name()='\" + m[1].toUpperCase() + \"']\";\n    },\n    className:    \"[contains(concat(' ', @class, ' '), ' #{1} ')]\",\n    id:           \"[@id='#{1}']\",\n    attrPresence: function(m) {\n      m[1] = m[1].toLowerCase();\n      return new Template(\"[@#{1}]\").evaluate(m);\n    },\n    attr: function(m) {\n      m[1] = m[1].toLowerCase();\n      m[3] = m[5] || m[6];\n      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);\n    },\n    pseudo: function(m) {\n      var h = Selector.xpath.pseudos[m[1]];\n      if (!h) return '';\n      if (Object.isFunction(h)) return h(m);\n      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);\n    },\n    operators: {\n      '=':  \"[@#{1}='#{3}']\",\n      '!=': \"[@#{1}!='#{3}']\",\n      '^=': \"[starts-with(@#{1}, '#{3}')]\",\n      '$=': \"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']\",\n      '*=': \"[contains(@#{1}, '#{3}')]\",\n      '~=': \"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]\",\n      '|=': \"[contains(concat('-', @#{1}, '-'), '-#{3}-')]\"\n    },\n    pseudos: {\n      'first-child': '[not(preceding-sibling::*)]',\n      'last-child':  '[not(following-sibling::*)]',\n      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',\n      'empty':       \"[count(*) = 0 and (count(text()) = 0)]\",\n      'checked':     \"[@checked]\",\n      'disabled':    \"[(@disabled) and (@type!='hidden')]\",\n      'enabled':     \"[not(@disabled) and (@type!='hidden')]\",\n      'not': function(m) {\n        var e = m[6], p = Selector.patterns,\n            x = Selector.xpath, le, v, len = p.length, name;\n\n        var exclusion = [];\n        while (e && le != e && (/\\S/).test(e)) {\n          le = e;\n          for (var i = 0; i<len; i++) {\n            name = p[i].name\n            if (m = e.match(p[i].re)) {\n              v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);\n              exclusion.push(\"(\" + v.substring(1, v.length - 1) + \")\");\n              e = e.replace(m[0], '');\n              break;\n            }\n          }\n        }\n        return \"[not(\" + exclusion.join(\" and \") + \")]\";\n      },\n      'nth-child':      function(m) {\n        return Selector.xpath.pseudos.nth(\"(count(./preceding-sibling::*) + 1) \", m);\n      },\n      'nth-last-child': function(m) {\n        return Selector.xpath.pseudos.nth(\"(count(./following-sibling::*) + 1) \", m);\n      },\n      'nth-of-type':    function(m) {\n        return Selector.xpath.pseudos.nth(\"position() \", m);\n      },\n      'nth-last-of-type': function(m) {\n        return Selector.xpath.pseudos.nth(\"(last() + 1 - position()) \", m);\n      },\n      'first-of-type':  function(m) {\n        m[6] = \"1\"; return Selector.xpath.pseudos['nth-of-type'](m);\n      },\n      'last-of-type':   function(m) {\n        m[6] = \"1\"; return Selector.xpath.pseudos['nth-last-of-type'](m);\n      },\n      'only-of-type':   function(m) {\n        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);\n      },\n      nth: function(fragment, m) {\n        var mm, formula = m[6], predicate;\n        if (formula == 'even') formula = '2n+0';\n        if (formula == 'odd')  formula = '2n+1';\n        if (mm = formula.match(/^(\\d+)$/)) // digit only\n          return '[' + fragment + \"= \" + mm[1] + ']';\n        if (mm = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n          if (mm[1] == \"-\") mm[1] = -1;\n          var a = mm[1] ? Number(mm[1]) : 1;\n          var b = mm[2] ? Number(mm[2]) : 0;\n          predicate = \"[((#{fragment} - #{b}) mod #{a} = 0) and \" +\n          \"((#{fragment} - #{b}) div #{a} >= 0)]\";\n          return new Template(predicate).evaluate({\n            fragment: fragment, a: a, b: b });\n        }\n      }\n    }\n  },\n\n  criteria: {\n    tagName:      'n = h.tagName(n, r, \"#{1}\", c);      c = false;',\n    className:    'n = h.className(n, r, \"#{1}\", c);    c = false;',\n    id:           'n = h.id(n, r, \"#{1}\", c);           c = false;',\n    attrPresence: 'n = h.attrPresence(n, r, \"#{1}\", c); c = false;',\n    attr: function(m) {\n      m[3] = (m[5] || m[6]);\n      return new Template('n = h.attr(n, r, \"#{1}\", \"#{3}\", \"#{2}\", c); c = false;').evaluate(m);\n    },\n    pseudo: function(m) {\n      if (m[6]) m[6] = m[6].replace(/\"/g, '\\\\\"');\n      return new Template('n = h.pseudo(n, \"#{1}\", \"#{6}\", r, c); c = false;').evaluate(m);\n    },\n    descendant:   'c = \"descendant\";',\n    child:        'c = \"child\";',\n    adjacent:     'c = \"adjacent\";',\n    laterSibling: 'c = \"laterSibling\";'\n  },\n\n  patterns: [\n    { name: 'laterSibling', re: /^\\s*~\\s*/ },\n    { name: 'child',        re: /^\\s*>\\s*/ },\n    { name: 'adjacent',     re: /^\\s*\\+\\s*/ },\n    { name: 'descendant',   re: /^\\s/ },\n\n    { name: 'tagName',      re: /^\\s*(\\*|[\\w\\-]+)(\\b|$)?/ },\n    { name: 'id',           re: /^#([\\w\\-\\*]+)(\\b|$)/ },\n    { name: 'className',    re: /^\\.([\\w\\-\\*]+)(\\b|$)/ },\n    { name: 'pseudo',       re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|(?=\\s|[:+~>]))/ },\n    { name: 'attrPresence', re: /^\\[((?:[\\w-]+:)?[\\w-]+)\\]/ },\n    { name: 'attr',         re: /\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*((['\"])([^\\4]*?)\\4|([^'\"][^\\]]*?)))?\\]/ }\n  ],\n\n  assertions: {\n    tagName: function(element, matches) {\n      return matches[1].toUpperCase() == element.tagName.toUpperCase();\n    },\n\n    className: function(element, matches) {\n      return Element.hasClassName(element, matches[1]);\n    },\n\n    id: function(element, matches) {\n      return element.id === matches[1];\n    },\n\n    attrPresence: function(element, matches) {\n      return Element.hasAttribute(element, matches[1]);\n    },\n\n    attr: function(element, matches) {\n      var nodeValue = Element.readAttribute(element, matches[1]);\n      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);\n    }\n  },\n\n  handlers: {\n    concat: function(a, b) {\n      for (var i = 0, node; node = b[i]; i++)\n        a.push(node);\n      return a;\n    },\n\n    mark: function(nodes) {\n      var _true = Prototype.emptyFunction;\n      for (var i = 0, node; node = nodes[i]; i++)\n        node._countedByPrototype = _true;\n      return nodes;\n    },\n\n    unmark: (function(){\n\n      var PROPERTIES_ATTRIBUTES_MAP = (function(){\n        var el = document.createElement('div'),\n            isBuggy = false,\n            propName = '_countedByPrototype',\n            value = 'x'\n        el[propName] = value;\n        isBuggy = (el.getAttribute(propName) === value);\n        el = null;\n        return isBuggy;\n      })();\n\n      return PROPERTIES_ATTRIBUTES_MAP ?\n        function(nodes) {\n          for (var i = 0, node; node = nodes[i]; i++)\n            node.removeAttribute('_countedByPrototype');\n          return nodes;\n        } :\n        function(nodes) {\n          for (var i = 0, node; node = nodes[i]; i++)\n            node._countedByPrototype = void 0;\n          return nodes;\n        }\n    })(),\n\n    index: function(parentNode, reverse, ofType) {\n      parentNode._countedByPrototype = Prototype.emptyFunction;\n      if (reverse) {\n        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {\n          var node = nodes[i];\n          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;\n        }\n      } else {\n        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)\n          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;\n      }\n    },\n\n    unique: function(nodes) {\n      if (nodes.length == 0) return nodes;\n      var results = [], n;\n      for (var i = 0, l = nodes.length; i < l; i++)\n        if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {\n          n._countedByPrototype = Prototype.emptyFunction;\n          results.push(Element.extend(n));\n        }\n      return Selector.handlers.unmark(results);\n    },\n\n    descendant: function(nodes) {\n      var h = Selector.handlers;\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        h.concat(results, node.getElementsByTagName('*'));\n      return results;\n    },\n\n    child: function(nodes) {\n      var h = Selector.handlers;\n      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n        for (var j = 0, child; child = node.childNodes[j]; j++)\n          if (child.nodeType == 1 && child.tagName != '!') results.push(child);\n      }\n      return results;\n    },\n\n    adjacent: function(nodes) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n        var next = this.nextElementSibling(node);\n        if (next) results.push(next);\n      }\n      return results;\n    },\n\n    laterSibling: function(nodes) {\n      var h = Selector.handlers;\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        h.concat(results, Element.nextSiblings(node));\n      return results;\n    },\n\n    nextElementSibling: function(node) {\n      while (node = node.nextSibling)\n        if (node.nodeType == 1) return node;\n      return null;\n    },\n\n    previousElementSibling: function(node) {\n      while (node = node.previousSibling)\n        if (node.nodeType == 1) return node;\n      return null;\n    },\n\n    tagName: function(nodes, root, tagName, combinator) {\n      var uTagName = tagName.toUpperCase();\n      var results = [], h = Selector.handlers;\n      if (nodes) {\n        if (combinator) {\n          if (combinator == \"descendant\") {\n            for (var i = 0, node; node = nodes[i]; i++)\n              h.concat(results, node.getElementsByTagName(tagName));\n            return results;\n          } else nodes = this[combinator](nodes);\n          if (tagName == \"*\") return nodes;\n        }\n        for (var i = 0, node; node = nodes[i]; i++)\n          if (node.tagName.toUpperCase() === uTagName) results.push(node);\n        return results;\n      } else return root.getElementsByTagName(tagName);\n    },\n\n    id: function(nodes, root, id, combinator) {\n      var targetNode = $(id), h = Selector.handlers;\n\n      if (root == document) {\n        if (!targetNode) return [];\n        if (!nodes) return [targetNode];\n      } else {\n        if (!root.sourceIndex || root.sourceIndex < 1) {\n          var nodes = root.getElementsByTagName('*');\n          for (var j = 0, node; node = nodes[j]; j++) {\n            if (node.id === id) return [node];\n          }\n        }\n      }\n\n      if (nodes) {\n        if (combinator) {\n          if (combinator == 'child') {\n            for (var i = 0, node; node = nodes[i]; i++)\n              if (targetNode.parentNode == node) return [targetNode];\n          } else if (combinator == 'descendant') {\n            for (var i = 0, node; node = nodes[i]; i++)\n              if (Element.descendantOf(targetNode, node)) return [targetNode];\n          } else if (combinator == 'adjacent') {\n            for (var i = 0, node; node = nodes[i]; i++)\n              if (Selector.handlers.previousElementSibling(targetNode) == node)\n                return [targetNode];\n          } else nodes = h[combinator](nodes);\n        }\n        for (var i = 0, node; node = nodes[i]; i++)\n          if (node == targetNode) return [targetNode];\n        return [];\n      }\n      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];\n    },\n\n    className: function(nodes, root, className, combinator) {\n      if (nodes && combinator) nodes = this[combinator](nodes);\n      return Selector.handlers.byClassName(nodes, root, className);\n    },\n\n    byClassName: function(nodes, root, className) {\n      if (!nodes) nodes = Selector.handlers.descendant([root]);\n      var needle = ' ' + className + ' ';\n      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {\n        nodeClassName = node.className;\n        if (nodeClassName.length == 0) continue;\n        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))\n          results.push(node);\n      }\n      return results;\n    },\n\n    attrPresence: function(nodes, root, attr, combinator) {\n      if (!nodes) nodes = root.getElementsByTagName(\"*\");\n      if (nodes && combinator) nodes = this[combinator](nodes);\n      var results = [];\n      for (var i = 0, node; node = nodes[i]; i++)\n        if (Element.hasAttribute(node, attr)) results.push(node);\n      return results;\n    },\n\n    attr: function(nodes, root, attr, value, operator, combinator) {\n      if (!nodes) nodes = root.getElementsByTagName(\"*\");\n      if (nodes && combinator) nodes = this[combinator](nodes);\n      var handler = Selector.operators[operator], results = [];\n      for (var i = 0, node; node = nodes[i]; i++) {\n        var nodeValue = Element.readAttribute(node, attr);\n        if (nodeValue === null) continue;\n        if (handler(nodeValue, value)) results.push(node);\n      }\n      return results;\n    },\n\n    pseudo: function(nodes, name, value, root, combinator) {\n      if (nodes && combinator) nodes = this[combinator](nodes);\n      if (!nodes) nodes = root.getElementsByTagName(\"*\");\n      return Selector.pseudos[name](nodes, value, root);\n    }\n  },\n\n  pseudos: {\n    'first-child': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n        if (Selector.handlers.previousElementSibling(node)) continue;\n          results.push(node);\n      }\n      return results;\n    },\n    'last-child': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n        if (Selector.handlers.nextElementSibling(node)) continue;\n          results.push(node);\n      }\n      return results;\n    },\n    'only-child': function(nodes, value, root) {\n      var h = Selector.handlers;\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))\n          results.push(node);\n      return results;\n    },\n    'nth-child':        function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, formula, root);\n    },\n    'nth-last-child':   function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, formula, root, true);\n    },\n    'nth-of-type':      function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, formula, root, false, true);\n    },\n    'nth-last-of-type': function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, formula, root, true, true);\n    },\n    'first-of-type':    function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, \"1\", root, false, true);\n    },\n    'last-of-type':     function(nodes, formula, root) {\n      return Selector.pseudos.nth(nodes, \"1\", root, true, true);\n    },\n    'only-of-type':     function(nodes, formula, root) {\n      var p = Selector.pseudos;\n      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);\n    },\n\n    getIndices: function(a, b, total) {\n      if (a == 0) return b > 0 ? [b] : [];\n      return $R(1, total).inject([], function(memo, i) {\n        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);\n        return memo;\n      });\n    },\n\n    nth: function(nodes, formula, root, reverse, ofType) {\n      if (nodes.length == 0) return [];\n      if (formula == 'even') formula = '2n+0';\n      if (formula == 'odd')  formula = '2n+1';\n      var h = Selector.handlers, results = [], indexed = [], m;\n      h.mark(nodes);\n      for (var i = 0, node; node = nodes[i]; i++) {\n        if (!node.parentNode._countedByPrototype) {\n          h.index(node.parentNode, reverse, ofType);\n          indexed.push(node.parentNode);\n        }\n      }\n      if (formula.match(/^\\d+$/)) { // just a number\n        formula = Number(formula);\n        for (var i = 0, node; node = nodes[i]; i++)\n          if (node.nodeIndex == formula) results.push(node);\n      } else if (m = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n        if (m[1] == \"-\") m[1] = -1;\n        var a = m[1] ? Number(m[1]) : 1;\n        var b = m[2] ? Number(m[2]) : 0;\n        var indices = Selector.pseudos.getIndices(a, b, nodes.length);\n        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {\n          for (var j = 0; j < l; j++)\n            if (node.nodeIndex == indices[j]) results.push(node);\n        }\n      }\n      h.unmark(nodes);\n      h.unmark(indexed);\n      return results;\n    },\n\n    'empty': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n        if (node.tagName == '!' || node.firstChild) continue;\n        results.push(node);\n      }\n      return results;\n    },\n\n    'not': function(nodes, selector, root) {\n      var h = Selector.handlers, selectorType, m;\n      var exclusions = new Selector(selector).findElements(root);\n      h.mark(exclusions);\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        if (!node._countedByPrototype) results.push(node);\n      h.unmark(exclusions);\n      return results;\n    },\n\n    'enabled': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        if (!node.disabled && (!node.type || node.type !== 'hidden'))\n          results.push(node);\n      return results;\n    },\n\n    'disabled': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        if (node.disabled) results.push(node);\n      return results;\n    },\n\n    'checked': function(nodes, value, root) {\n      for (var i = 0, results = [], node; node = nodes[i]; i++)\n        if (node.checked) results.push(node);\n      return results;\n    }\n  },\n\n  operators: {\n    '=':  function(nv, v) { return nv == v; },\n    '!=': function(nv, v) { return nv != v; },\n    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },\n    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },\n    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },\n    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },\n    '|=': function(nv, v) { return ('-' + (nv || \"\").toUpperCase() +\n     '-').include('-' + (v || \"\").toUpperCase() + '-'); }\n  },\n\n  split: function(expression) {\n    var expressions = [];\n    expression.scan(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/, function(m) {\n      expressions.push(m[1].strip());\n    });\n    return expressions;\n  },\n\n  matchElements: function(elements, expression) {\n    var matches = $$(expression), h = Selector.handlers;\n    h.mark(matches);\n    for (var i = 0, results = [], element; element = elements[i]; i++)\n      if (element._countedByPrototype) results.push(element);\n    h.unmark(matches);\n    return results;\n  },\n\n  findElement: function(elements, expression, index) {\n    if (Object.isNumber(expression)) {\n      index = expression; expression = false;\n    }\n    return Selector.matchElements(elements, expression || '*')[index || 0];\n  },\n\n  findChildElements: function(element, expressions) {\n    expressions = Selector.split(expressions.join(','));\n    var results = [], h = Selector.handlers;\n    for (var i = 0, l = expressions.length, selector; i < l; i++) {\n      selector = new Selector(expressions[i].strip());\n      h.concat(results, selector.findElements(element));\n    }\n    return (l > 1) ? h.unique(results) : results;\n  }\n});\n\nif (Prototype.Browser.IE) {\n  Object.extend(Selector.handlers, {\n    concat: function(a, b) {\n      for (var i = 0, node; node = b[i]; i++)\n        if (node.tagName !== \"!\") a.push(node);\n      return a;\n    }\n  });\n}\n\nfunction $$() {\n  return Selector.findChildElements(document, $A(arguments));\n}\n\nvar Form = {\n  reset: function(form) {\n    form = $(form);\n    form.reset();\n    return form;\n  },\n\n  serializeElements: function(elements, options) {\n    if (typeof options != 'object') options = { hash: !!options };\n    else if (Object.isUndefined(options.hash)) options.hash = true;\n    var key, value, submitted = false, submit = options.submit;\n\n    var data = elements.inject({ }, function(result, element) {\n      if (!element.disabled && element.name) {\n        key = element.name; value = $(element).getValue();\n        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&\n            submit !== false && (!submit || key == submit) && (submitted = true)))) {\n          if (key in result) {\n            if (!Object.isArray(result[key])) result[key] = [result[key]];\n            result[key].push(value);\n          }\n          else result[key] = value;\n        }\n      }\n      return result;\n    });\n\n    return options.hash ? data : Object.toQueryString(data);\n  }\n};\n\nForm.Methods = {\n  serialize: function(form, options) {\n    return Form.serializeElements(Form.getElements(form), options);\n  },\n\n  getElements: function(form) {\n    var elements = $(form).getElementsByTagName('*'),\n        element,\n        arr = [ ],\n        serializers = Form.Element.Serializers;\n    for (var i = 0; element = elements[i]; i++) {\n      arr.push(element);\n    }\n    return arr.inject([], function(elements, child) {\n      if (serializers[child.tagName.toLowerCase()])\n        elements.push(Element.extend(child));\n      return elements;\n    })\n  },\n\n  getInputs: function(form, typeName, name) {\n    form = $(form);\n    var inputs = form.getElementsByTagName('input');\n\n    if (!typeName && !name) return $A(inputs).map(Element.extend);\n\n    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {\n      var input = inputs[i];\n      if ((typeName && input.type != typeName) || (name && input.name != name))\n        continue;\n      matchingInputs.push(Element.extend(input));\n    }\n\n    return matchingInputs;\n  },\n\n  disable: function(form) {\n    form = $(form);\n    Form.getElements(form).invoke('disable');\n    return form;\n  },\n\n  enable: function(form) {\n    form = $(form);\n    Form.getElements(form).invoke('enable');\n    return form;\n  },\n\n  findFirstElement: function(form) {\n    var elements = $(form).getElements().findAll(function(element) {\n      return 'hidden' != element.type && !element.disabled;\n    });\n    var firstByIndex = elements.findAll(function(element) {\n      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;\n    }).sortBy(function(element) { return element.tabIndex }).first();\n\n    return firstByIndex ? firstByIndex : elements.find(function(element) {\n      return /^(?:input|select|textarea)$/i.test(element.tagName);\n    });\n  },\n\n  focusFirstElement: function(form) {\n    form = $(form);\n    form.findFirstElement().activate();\n    return form;\n  },\n\n  request: function(form, options) {\n    form = $(form), options = Object.clone(options || { });\n\n    var params = options.parameters, action = form.readAttribute('action') || '';\n    if (action.blank()) action = window.location.href;\n    options.parameters = form.serialize(true);\n\n    if (params) {\n      if (Object.isString(params)) params = params.toQueryParams();\n      Object.extend(options.parameters, params);\n    }\n\n    if (form.hasAttribute('method') && !options.method)\n      options.method = form.method;\n\n    return new Ajax.Request(action, options);\n  }\n};\n\n/*--------------------------------------------------------------------------*/\n\n\nForm.Element = {\n  focus: function(element) {\n    $(element).focus();\n    return element;\n  },\n\n  select: function(element) {\n    $(element).select();\n    return element;\n  }\n};\n\nForm.Element.Methods = {\n\n  serialize: function(element) {\n    element = $(element);\n    if (!element.disabled && element.name) {\n      var value = element.getValue();\n      if (value != undefined) {\n        var pair = { };\n        pair[element.name] = value;\n        return Object.toQueryString(pair);\n      }\n    }\n    return '';\n  },\n\n  getValue: function(element) {\n    element = $(element);\n    var method = element.tagName.toLowerCase();\n    return Form.Element.Serializers[method](element);\n  },\n\n  setValue: function(element, value) {\n    element = $(element);\n    var method = element.tagName.toLowerCase();\n    Form.Element.Serializers[method](element, value);\n    return element;\n  },\n\n  clear: function(element) {\n    $(element).value = '';\n    return element;\n  },\n\n  present: function(element) {\n    return $(element).value != '';\n  },\n\n  activate: function(element) {\n    element = $(element);\n    try {\n      element.focus();\n      if (element.select && (element.tagName.toLowerCase() != 'input' ||\n          !(/^(?:button|reset|submit)$/i.test(element.type))))\n        element.select();\n    } catch (e) { }\n    return element;\n  },\n\n  disable: function(element) {\n    element = $(element);\n    element.disabled = true;\n    return element;\n  },\n\n  enable: function(element) {\n    element = $(element);\n    element.disabled = false;\n    return element;\n  }\n};\n\n/*--------------------------------------------------------------------------*/\n\nvar Field = Form.Element;\n\nvar $F = Form.Element.Methods.getValue;\n\n/*--------------------------------------------------------------------------*/\n\nForm.Element.Serializers = {\n  input: function(element, value) {\n    switch (element.type.toLowerCase()) {\n      case 'checkbox':\n      case 'radio':\n        return Form.Element.Serializers.inputSelector(element, value);\n      default:\n        return Form.Element.Serializers.textarea(element, value);\n    }\n  },\n\n  inputSelector: function(element, value) {\n    if (Object.isUndefined(value)) return element.checked ? element.value : null;\n    else element.checked = !!value;\n  },\n\n  textarea: function(element, value) {\n    if (Object.isUndefined(value)) return element.value;\n    else element.value = value;\n  },\n\n  select: function(element, value) {\n    if (Object.isUndefined(value))\n      return this[element.type == 'select-one' ?\n        'selectOne' : 'selectMany'](element);\n    else {\n      var opt, currentValue, single = !Object.isArray(value);\n      for (var i = 0, length = element.length; i < length; i++) {\n        opt = element.options[i];\n        currentValue = this.optionValue(opt);\n        if (single) {\n          if (currentValue == value) {\n            opt.selected = true;\n            return;\n          }\n        }\n        else opt.selected = value.include(currentValue);\n      }\n    }\n  },\n\n  selectOne: function(element) {\n    var index = element.selectedIndex;\n    return index >= 0 ? this.optionValue(element.options[index]) : null;\n  },\n\n  selectMany: function(element) {\n    var values, length = element.length;\n    if (!length) return null;\n\n    for (var i = 0, values = []; i < length; i++) {\n      var opt = element.options[i];\n      if (opt.selected) values.push(this.optionValue(opt));\n    }\n    return values;\n  },\n\n  optionValue: function(opt) {\n    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;\n  }\n};\n\n/*--------------------------------------------------------------------------*/\n\n\nAbstract.TimedObserver = Class.create(PeriodicalExecuter, {\n  initialize: function($super, element, frequency, callback) {\n    $super(callback, frequency);\n    this.element   = $(element);\n    this.lastValue = this.getValue();\n  },\n\n  execute: function() {\n    var value = this.getValue();\n    if (Object.isString(this.lastValue) && Object.isString(value) ?\n        this.lastValue != value : String(this.lastValue) != String(value)) {\n      this.callback(this.element, value);\n      this.lastValue = value;\n    }\n  }\n});\n\nForm.Element.Observer = Class.create(Abstract.TimedObserver, {\n  getValue: function() {\n    return Form.Element.getValue(this.element);\n  }\n});\n\nForm.Observer = Class.create(Abstract.TimedObserver, {\n  getValue: function() {\n    return Form.serialize(this.element);\n  }\n});\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.EventObserver = Class.create({\n  initialize: function(element, callback) {\n    this.element  = $(element);\n    this.callback = callback;\n\n    this.lastValue = this.getValue();\n    if (this.element.tagName.toLowerCase() == 'form')\n      this.registerFormCallbacks();\n    else\n      this.registerCallback(this.element);\n  },\n\n  onElementEvent: function() {\n    var value = this.getValue();\n    if (this.lastValue != value) {\n      this.callback(this.element, value);\n      this.lastValue = value;\n    }\n  },\n\n  registerFormCallbacks: function() {\n    Form.getElements(this.element).each(this.registerCallback, this);\n  },\n\n  registerCallback: function(element) {\n    if (element.type) {\n      switch (element.type.toLowerCase()) {\n        case 'checkbox':\n        case 'radio':\n          Event.observe(element, 'click', this.onElementEvent.bind(this));\n          break;\n        default:\n          Event.observe(element, 'change', this.onElementEvent.bind(this));\n          break;\n      }\n    }\n  }\n});\n\nForm.Element.EventObserver = Class.create(Abstract.EventObserver, {\n  getValue: function() {\n    return Form.Element.getValue(this.element);\n  }\n});\n\nForm.EventObserver = Class.create(Abstract.EventObserver, {\n  getValue: function() {\n    return Form.serialize(this.element);\n  }\n});\n(function() {\n\n  var Event = {\n    KEY_BACKSPACE: 8,\n    KEY_TAB:       9,\n    KEY_RETURN:   13,\n    KEY_ESC:      27,\n    KEY_LEFT:     37,\n    KEY_UP:       38,\n    KEY_RIGHT:    39,\n    KEY_DOWN:     40,\n    KEY_DELETE:   46,\n    KEY_HOME:     36,\n    KEY_END:      35,\n    KEY_PAGEUP:   33,\n    KEY_PAGEDOWN: 34,\n    KEY_INSERT:   45,\n\n    cache: {}\n  };\n\n  var docEl = document.documentElement;\n  var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl\n    && 'onmouseleave' in docEl;\n\n  var _isButton;\n  if (Prototype.Browser.IE) {\n    var buttonMap = { 0: 1, 1: 4, 2: 2 };\n    _isButton = function(event, code) {\n      return event.button === buttonMap[code];\n    };\n  } else if (Prototype.Browser.WebKit) {\n    _isButton = function(event, code) {\n      switch (code) {\n        case 0: return event.which == 1 && !event.metaKey;\n        case 1: return event.which == 1 && event.metaKey;\n        default: return false;\n      }\n    };\n  } else {\n    _isButton = function(event, code) {\n      return event.which ? (event.which === code + 1) : (event.button === code);\n    };\n  }\n\n  function isLeftClick(event)   { return _isButton(event, 0) }\n\n  function isMiddleClick(event) { return _isButton(event, 1) }\n\n  function isRightClick(event)  { return _isButton(event, 2) }\n\n  function element(event) {\n    event = Event.extend(event);\n\n    var node = event.target, type = event.type,\n     currentTarget = event.currentTarget;\n\n    if (currentTarget && currentTarget.tagName) {\n      if (type === 'load' || type === 'error' ||\n        (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'\n          && currentTarget.type === 'radio'))\n            node = currentTarget;\n    }\n\n    if (node.nodeType == Node.TEXT_NODE)\n      node = node.parentNode;\n\n    return Element.extend(node);\n  }\n\n  function findElement(event, expression) {\n    var element = Event.element(event);\n    if (!expression) return element;\n    var elements = [element].concat(element.ancestors());\n    return Selector.findElement(elements, expression, 0);\n  }\n\n  function pointer(event) {\n    return { x: pointerX(event), y: pointerY(event) };\n  }\n\n  function pointerX(event) {\n    var docElement = document.documentElement,\n     body = document.body || { scrollLeft: 0 };\n\n    return event.pageX || (event.clientX +\n      (docElement.scrollLeft || body.scrollLeft) -\n      (docElement.clientLeft || 0));\n  }\n\n  function pointerY(event) {\n    var docElement = document.documentElement,\n     body = document.body || { scrollTop: 0 };\n\n    return  event.pageY || (event.clientY +\n       (docElement.scrollTop || body.scrollTop) -\n       (docElement.clientTop || 0));\n  }\n\n\n  function stop(event) {\n    Event.extend(event);\n    event.preventDefault();\n    event.stopPropagation();\n\n    event.stopped = true;\n  }\n\n  Event.Methods = {\n    isLeftClick: isLeftClick,\n    isMiddleClick: isMiddleClick,\n    isRightClick: isRightClick,\n\n    element: element,\n    findElement: findElement,\n\n    pointer: pointer,\n    pointerX: pointerX,\n    pointerY: pointerY,\n\n    stop: stop\n  };\n\n\n  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {\n    m[name] = Event.Methods[name].methodize();\n    return m;\n  });\n\n  if (Prototype.Browser.IE) {\n    function _relatedTarget(event) {\n      var element;\n      switch (event.type) {\n        case 'mouseover': element = event.fromElement; break;\n        case 'mouseout':  element = event.toElement;   break;\n        default: return null;\n      }\n      return Element.extend(element);\n    }\n\n    Object.extend(methods, {\n      stopPropagation: function() { this.cancelBubble = true },\n      preventDefault:  function() { this.returnValue = false },\n      inspect: function() { return '[object Event]' }\n    });\n\n    Event.extend = function(event, element) {\n      if (!event) return false;\n      if (event._extendedByPrototype) return event;\n\n      event._extendedByPrototype = Prototype.emptyFunction;\n      var pointer = Event.pointer(event);\n\n      Object.extend(event, {\n        target: event.srcElement || element,\n        relatedTarget: _relatedTarget(event),\n        pageX:  pointer.x,\n        pageY:  pointer.y\n      });\n\n      return Object.extend(event, methods);\n    };\n  } else {\n    Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;\n    Object.extend(Event.prototype, methods);\n    Event.extend = Prototype.K;\n  }\n\n  function _createResponder(element, eventName, handler) {\n    var registry = Element.retrieve(element, 'prototype_event_registry');\n\n    if (Object.isUndefined(registry)) {\n      CACHE.push(element);\n      registry = Element.retrieve(element, 'prototype_event_registry', $H());\n    }\n\n    var respondersForEvent = registry.get(eventName);\n    if (Object.isUndefined(respondersForEvent)) {\n      respondersForEvent = [];\n      registry.set(eventName, respondersForEvent);\n    }\n\n    if (respondersForEvent.pluck('handler').include(handler)) return false;\n\n    var responder;\n    if (eventName.include(\":\")) {\n      responder = function(event) {\n        if (Object.isUndefined(event.eventName))\n          return false;\n\n        if (event.eventName !== eventName)\n          return false;\n\n        Event.extend(event, element);\n        handler.call(element, event);\n      };\n    } else {\n      if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&\n       (eventName === \"mouseenter\" || eventName === \"mouseleave\")) {\n        if (eventName === \"mouseenter\" || eventName === \"mouseleave\") {\n          responder = function(event) {\n            Event.extend(event, element);\n\n            var parent = event.relatedTarget;\n            while (parent && parent !== element) {\n              try { parent = parent.parentNode; }\n              catch(e) { parent = element; }\n            }\n\n            if (parent === element) return;\n\n            handler.call(element, event);\n          };\n        }\n      } else {\n        responder = function(event) {\n          Event.extend(event, element);\n          handler.call(element, event);\n        };\n      }\n    }\n\n    responder.handler = handler;\n    respondersForEvent.push(responder);\n    return responder;\n  }\n\n  function _destroyCache() {\n    for (var i = 0, length = CACHE.length; i < length; i++) {\n      Event.stopObserving(CACHE[i]);\n      CACHE[i] = null;\n    }\n  }\n\n  var CACHE = [];\n\n  if (Prototype.Browser.IE)\n    window.attachEvent('onunload', _destroyCache);\n\n  if (Prototype.Browser.WebKit)\n    window.addEventListener('unload', Prototype.emptyFunction, false);\n\n\n  var _getDOMEventName = Prototype.K;\n\n  if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {\n    _getDOMEventName = function(eventName) {\n      var translations = { mouseenter: \"mouseover\", mouseleave: \"mouseout\" };\n      return eventName in translations ? translations[eventName] : eventName;\n    };\n  }\n\n  function observe(element, eventName, handler) {\n    element = $(element);\n\n    var responder = _createResponder(element, eventName, handler);\n\n    if (!responder) return element;\n\n    if (eventName.include(':')) {\n      if (element.addEventListener)\n        element.addEventListener(\"dataavailable\", responder, false);\n      else {\n        element.attachEvent(\"ondataavailable\", responder);\n        element.attachEvent(\"onfilterchange\", responder);\n      }\n    } else {\n      var actualEventName = _getDOMEventName(eventName);\n\n      if (element.addEventListener)\n        element.addEventListener(actualEventName, responder, false);\n      else\n        element.attachEvent(\"on\" + actualEventName, responder);\n    }\n\n    return element;\n  }\n\n  function stopObserving(element, eventName, handler) {\n    element = $(element);\n\n    var registry = Element.retrieve(element, 'prototype_event_registry');\n\n    if (Object.isUndefined(registry)) return element;\n\n    if (eventName && !handler) {\n      var responders = registry.get(eventName);\n\n      if (Object.isUndefined(responders)) return element;\n\n      responders.each( function(r) {\n        Element.stopObserving(element, eventName, r.handler);\n      });\n      return element;\n    } else if (!eventName) {\n      registry.each( function(pair) {\n        var eventName = pair.key, responders = pair.value;\n\n        responders.each( function(r) {\n          Element.stopObserving(element, eventName, r.handler);\n        });\n      });\n      return element;\n    }\n\n    var responders = registry.get(eventName);\n\n    if (!responders) return;\n\n    var responder = responders.find( function(r) { return r.handler === handler; });\n    if (!responder) return element;\n\n    var actualEventName = _getDOMEventName(eventName);\n\n    if (eventName.include(':')) {\n      if (element.removeEventListener)\n        element.removeEventListener(\"dataavailable\", responder, false);\n      else {\n        element.detachEvent(\"ondataavailable\", responder);\n        element.detachEvent(\"onfilterchange\",  responder);\n      }\n    } else {\n      if (element.removeEventListener)\n        element.removeEventListener(actualEventName, responder, false);\n      else\n        element.detachEvent('on' + actualEventName, responder);\n    }\n\n    registry.set(eventName, responders.without(responder));\n\n    return element;\n  }\n\n  function fire(element, eventName, memo, bubble) {\n    element = $(element);\n\n    if (Object.isUndefined(bubble))\n      bubble = true;\n\n    if (element == document && document.createEvent && !element.dispatchEvent)\n      element = document.documentElement;\n\n    var event;\n    if (document.createEvent) {\n      event = document.createEvent('HTMLEvents');\n      event.initEvent('dataavailable', true, true);\n    } else {\n      event = document.createEventObject();\n      event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';\n    }\n\n    event.eventName = eventName;\n    event.memo = memo || { };\n\n    if (document.createEvent)\n      element.dispatchEvent(event);\n    else\n      element.fireEvent(event.eventType, event);\n\n    return Event.extend(event);\n  }\n\n\n  Object.extend(Event, Event.Methods);\n\n  Object.extend(Event, {\n    fire:          fire,\n    observe:       observe,\n    stopObserving: stopObserving\n  });\n\n  Element.addMethods({\n    fire:          fire,\n\n    observe:       observe,\n\n    stopObserving: stopObserving\n  });\n\n  Object.extend(document, {\n    fire:          fire.methodize(),\n\n    observe:       observe.methodize(),\n\n    stopObserving: stopObserving.methodize(),\n\n    loaded:        false\n  });\n\n  if (window.Event) Object.extend(window.Event, Event);\n  else window.Event = Event;\n})();\n\n(function() {\n  /* Support for the DOMContentLoaded event is based on work by Dan Webb,\n     Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */\n\n  var timer;\n\n  function fireContentLoadedEvent() {\n    if (document.loaded) return;\n    if (timer) window.clearTimeout(timer);\n    document.loaded = true;\n    document.fire('dom:loaded');\n  }\n\n  function checkReadyState() {\n    if (document.readyState === 'complete') {\n      document.stopObserving('readystatechange', checkReadyState);\n      fireContentLoadedEvent();\n    }\n  }\n\n  function pollDoScroll() {\n    try { document.documentElement.doScroll('left'); }\n    catch(e) {\n      timer = pollDoScroll.defer();\n      return;\n    }\n    fireContentLoadedEvent();\n  }\n\n  if (document.addEventListener) {\n    document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);\n  } else {\n    document.observe('readystatechange', checkReadyState);\n    if (window == top)\n      timer = pollDoScroll.defer();\n  }\n\n  Event.observe(window, 'load', fireContentLoadedEvent);\n})();\n\nElement.addMethods();\n\n/*------------------------------- DEPRECATED -------------------------------*/\n\nHash.toQueryString = Object.toQueryString;\n\nvar Toggle = { display: Element.toggle };\n\nElement.Methods.childOf = Element.Methods.descendantOf;\n\nvar Insertion = {\n  Before: function(element, content) {\n    return Element.insert(element, {before:content});\n  },\n\n  Top: function(element, content) {\n    return Element.insert(element, {top:content});\n  },\n\n  Bottom: function(element, content) {\n    return Element.insert(element, {bottom:content});\n  },\n\n  After: function(element, content) {\n    return Element.insert(element, {after:content});\n  }\n};\n\nvar $continue = new Error('\"throw $continue\" is deprecated, use \"return\" instead');\n\nvar Position = {\n  includeScrollOffsets: false,\n\n  prepare: function() {\n    this.deltaX =  window.pageXOffset\n                || document.documentElement.scrollLeft\n                || document.body.scrollLeft\n                || 0;\n    this.deltaY =  window.pageYOffset\n                || document.documentElement.scrollTop\n                || document.body.scrollTop\n                || 0;\n  },\n\n  within: function(element, x, y) {\n    if (this.includeScrollOffsets)\n      return this.withinIncludingScrolloffsets(element, x, y);\n    this.xcomp = x;\n    this.ycomp = y;\n    this.offset = Element.cumulativeOffset(element);\n\n    return (y >= this.offset[1] &&\n            y <  this.offset[1] + element.offsetHeight &&\n            x >= this.offset[0] &&\n            x <  this.offset[0] + element.offsetWidth);\n  },\n\n  withinIncludingScrolloffsets: function(element, x, y) {\n    var offsetcache = Element.cumulativeScrollOffset(element);\n\n    this.xcomp = x + offsetcache[0] - this.deltaX;\n    this.ycomp = y + offsetcache[1] - this.deltaY;\n    this.offset = Element.cumulativeOffset(element);\n\n    return (this.ycomp >= this.offset[1] &&\n            this.ycomp <  this.offset[1] + element.offsetHeight &&\n            this.xcomp >= this.offset[0] &&\n            this.xcomp <  this.offset[0] + element.offsetWidth);\n  },\n\n  overlap: function(mode, element) {\n    if (!mode) return 0;\n    if (mode == 'vertical')\n      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /\n        element.offsetHeight;\n    if (mode == 'horizontal')\n      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /\n        element.offsetWidth;\n  },\n\n\n  cumulativeOffset: Element.Methods.cumulativeOffset,\n\n  positionedOffset: Element.Methods.positionedOffset,\n\n  absolutize: function(element) {\n    Position.prepare();\n    return Element.absolutize(element);\n  },\n\n  relativize: function(element) {\n    Position.prepare();\n    return Element.relativize(element);\n  },\n\n  realOffset: Element.Methods.cumulativeScrollOffset,\n\n  offsetParent: Element.Methods.getOffsetParent,\n\n  page: Element.Methods.viewportOffset,\n\n  clone: function(source, target, options) {\n    options = options || { };\n    return Element.clonePosition(target, source, options);\n  }\n};\n\n/*--------------------------------------------------------------------------*/\n\nif (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){\n  function iter(name) {\n    return name.blank() ? null : \"[contains(concat(' ', @class, ' '), ' \" + name + \" ')]\";\n  }\n\n  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?\n  function(element, className) {\n    className = className.toString().strip();\n    var cond = /\\s/.test(className) ? $w(className).map(iter).join('') : iter(className);\n    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];\n  } : function(element, className) {\n    className = className.toString().strip();\n    var elements = [], classNames = (/\\s/.test(className) ? $w(className) : null);\n    if (!classNames && !className) return elements;\n\n    var nodes = $(element).getElementsByTagName('*');\n    className = ' ' + className + ' ';\n\n    for (var i = 0, child, cn; child = nodes[i]; i++) {\n      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||\n          (classNames && classNames.all(function(name) {\n            return !name.toString().blank() && cn.include(' ' + name + ' ');\n          }))))\n        elements.push(Element.extend(child));\n    }\n    return elements;\n  };\n\n  return function(className, parentElement) {\n    return $(parentElement || document.body).getElementsByClassName(className);\n  };\n}(Element.Methods);\n\n/*--------------------------------------------------------------------------*/\n\nElement.ClassNames = Class.create();\nElement.ClassNames.prototype = {\n  initialize: function(element) {\n    this.element = $(element);\n  },\n\n  _each: function(iterator) {\n    this.element.className.split(/\\s+/).select(function(name) {\n      return name.length > 0;\n    })._each(iterator);\n  },\n\n  set: function(className) {\n    this.element.className = className;\n  },\n\n  add: function(classNameToAdd) {\n    if (this.include(classNameToAdd)) return;\n    this.set($A(this).concat(classNameToAdd).join(' '));\n  },\n\n  remove: function(classNameToRemove) {\n    if (!this.include(classNameToRemove)) return;\n    this.set($A(this).without(classNameToRemove).join(' '));\n  },\n\n  toString: function() {\n    return $A(this).join(' ');\n  }\n};\n\nObject.extend(Element.ClassNames.prototype, Enumerable);\n\n/*--------------------------------------------------------------------------*/\n"
  },
  {
    "path": "example/settings.py",
    "content": "import os\nPROJECT_PATH = os.path.realpath(os.path.dirname(__file__))\n\nADMIN_MEDIA_PREFIX = '/admin_media/'\nDATABASE_ENGINE = 'sqlite3'\nDATABASE_NAME = 'example.db'\nDEBUG = True\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.admin',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'debug_toolbar',\n)\nINTERNAL_IPS = ('127.0.0.1',)\nMEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')\nMEDIA_URL = '/media'\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'debug_toolbar.middleware.DebugToolbarMiddleware',\n)\nROOT_URLCONF = 'example.urls'\nSECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcd'\nSITE_ID = 1\nTEMPLATE_CONTEXT_PROCESSORS = (\n    'django.core.context_processors.auth',\n    'django.core.context_processors.media',\n    'django.core.context_processors.request',\n)\nTEMPLATE_DEBUG = DEBUG\nTEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates'))\nDEBUG_TOOLBAR_PANELS = (\n    'debug_toolbar.panels.version.VersionDebugPanel',\n    'debug_toolbar.panels.timer.TimerDebugPanel',\n    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',\n    'debug_toolbar.panels.headers.HeaderDebugPanel',\n    'debug_toolbar.panels.profiling.ProfilingDebugPanel',\n    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',\n    'debug_toolbar.panels.sql.SQLDebugPanel',\n    'debug_toolbar.panels.template.TemplateDebugPanel',\n    #'debug_toolbar.panels.cache.CacheDebugPanel',\n    'debug_toolbar.panels.signals.SignalDebugPanel',\n    'debug_toolbar.panels.logger.LoggingPanel',\n)"
  },
  {
    "path": "example/templates/admin/login.html",
    "content": "{% extends \"admin/base_site.html\" %}\n{% load i18n %}\n\n{% block extrastyle %}{% load adminmedia %}{{ block.super }}<link rel=\"stylesheet\" type=\"text/css\" href=\"{% admin_media_prefix %}css/login.css\" />{% endblock %}\n\n{% block bodyclass %}login{% endblock %}\n\n{% block content_title %}{% endblock %}\n\n{% block breadcrumbs %}{% endblock %}\n\n{% block content %}\n{% if error_message %}\n<p class=\"errornote\">{{ error_message }}</p>\n{% endif %}\n<div id=\"content-main\">\n<form action=\"{{ app_path }}\" method=\"post\" id=\"login-form\">\n  <div class=\"form-row\">\n    <label for=\"id_username\">{% trans 'Username:' %}</label> <input type=\"text\" name=\"username\" id=\"id_username\" value=\"example\" />\n  </div>\n  <div class=\"form-row\">\n    <label for=\"id_password\">{% trans 'Password:' %}</label> <input type=\"password\" name=\"password\" id=\"id_password\" value=\"example\" />\n    <input type=\"hidden\" name=\"this_is_the_login_form\" value=\"1\" />\n  </div>\n  <div class=\"submit-row\">\n    <label>&nbsp;</label><input type=\"submit\" value=\"{% trans 'Log in' %}\" />\n  </div>\n</form>\n\n<script type=\"text/javascript\">\ndocument.getElementById('id_username').focus()\n</script>\n</div>\n{% endblock %}\n"
  },
  {
    "path": "example/templates/index.html",
    "content": "<html>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<title>Index of Tests</title>\n</head>\n<body>\n\n\t<h1>Index of Tests</h1>\n\t<ul>\n\t\t<li><a href=\"/jquery/index/\">jQuery 1.2.6</a></li>\n\t\t<li><a href=\"/mootools/index/\">MooTools 1.2.4</a></li>\n\t\t<li><a href=\"/prototype/index/\">Prototype 1.6.1</a></li>\n\t</ul>\n\n</body>\n</html>\n"
  },
  {
    "path": "example/templates/jquery/index.html",
    "content": "<html>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<title>Old jQuery Test</title>\n\t<style>\n\t.hide {display:none;}\n\t#v {font-weight:bold;}\n\t</style>\n\t<script type=\"text/javascript\" charset=\"utf-8\" src=\"{{ MEDIA_URL }}/js/jquery.js\"></script>\n\t<script type=\"text/javascript\">\n\t\t$(document).ready(function() {\n\t\t\t$('p.hide').show();\n\t\t\t$('#v').append($.fn.jquery);\n\t\t});\n\t</script>\n</head>\n<body>\n\t<h1>jQuery Test</h1>\n\t<p class=\"hide\">If you see this, jQuery <span id=\"v\"></span> is working.</p>\n</body>\n</html>\n"
  },
  {
    "path": "example/templates/mootools/index.html",
    "content": "<html>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<title>MooTools Test</title>\n\t<style>\n\t.hide {display:none;}\n\t</style>\n\t<script type=\"text/javascript\" charset=\"utf-8\" src=\"{{ MEDIA_URL }}/js/mootools.js\"></script>\n\t<script type=\"text/javascript\">\n\t\twindow.addEvent('domready', function() {\n\t\t\t$$('p.hide').setStyle('display', 'block');\n\t\t});\n\t</script>\n</head>\n<body>\n\t<h1>MooTools Test</h1>\n\t<p class=\"hide\">If you see this, MooTools is working.</p>\n</body>\n</html>\n"
  },
  {
    "path": "example/templates/prototype/index.html",
    "content": "<html>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<title>Prototype Test</title>\n\t<style>\n\t.hide {display:none;}\n\t</style>\n\t<script type=\"text/javascript\" charset=\"utf-8\" src=\"{{ MEDIA_URL }}/js/prototype.js\"></script>\n\t<script type=\"text/javascript\">\n\t\tdocument.observe('dom:loaded', function() {\n\t\t\t$('showme').removeClassName('hide');\n\t\t});\n\t</script>\n</head>\n<body>\n\t<h1>Prototype Test</h1>\n\t<p class=\"hide\" id=\"showme\">If you see this, Prototype is working.</p>\n</body>\n</html>\n\n"
  },
  {
    "path": "example/urls.py",
    "content": "from django.conf import settings\nfrom django.conf.urls.defaults import *\nfrom django.contrib import admin\nfrom django.views.generic.simple import direct_to_template\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n    (r'^$', direct_to_template, {'template': 'index.html'}),\n    (r'^jquery/index/$', direct_to_template, {'template': 'jquery/index.html'}),\n    (r'^mootools/index/$', direct_to_template, {'template': 'mootools/index.html'}),\n    (r'^prototype/index/$', direct_to_template, {'template': 'prototype/index.html'}),\n    (r'^admin/', include(admin.site.urls)),\n)\n\nif settings.DEBUG:\n    urlpatterns += patterns('',\n        (r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT})\n    )\n\n"
  },
  {
    "path": "setup.cfg",
    "content": "[egg_info]\ntag_svn_revision = false\n"
  },
  {
    "path": "setup.py",
    "content": "from setuptools import setup, find_packages\n\nsetup(\n    name='django-debug-toolbar',\n    version=__import__('debug_toolbar').__version__,\n    description='A configurable set of panels that display various debug information about the current request/response.',\n    long_description=open('README.rst').read(),\n    # Get more strings from http://www.python.org/pypi?:action=list_classifiers\n    author='Rob Hudson',\n    author_email='rob@cogit8.org',\n    url='https://github.com/django-debug-toolbar/django-debug-toolbar',\n    download_url='https://github.com/django-debug-toolbar/django-debug-toolbar/downloads',\n    license='BSD',\n    packages=find_packages(exclude=['ez_setup']),\n    tests_require=[\n        'django',\n        'dingus',\n    ],\n    test_suite='debug_toolbar.runtests.runtests',\n    include_package_data=True,\n    zip_safe=False, # because we're including media that Django needs\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: Web Environment',\n        'Framework :: Django',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n    ],\n)\n"
  }
]