[
  {
    "path": ".gitignore",
    "content": "*.pyc\n*.DS_Store\ndist\n*.egg-info\nbuild\n*.ropeproject\n.python-version\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: python\ndist: xenial\npython:\n  - \"2.7\"\n  - \"3.4\"\n  - \"3.5\"\n  - \"3.6\"\n  - \"3.7\"\nenv:\n  - DJANGO_VERSION=\"django>=1.8,<1.9\"\n  - DJANGO_VERSION=\"django>=1.9,<1.10\"\n  - DJANGO_VERSION=\"django>=1.10,<1.11\"\n  - DJANGO_VERSION=\"django>=1.11,<1.12\"\n  - DJANGO_VERSION=\"django>=2.0,<2.1\"\n  - DJANGO_VERSION=\"django>=2.1,<2.2\"\n  - DJANGO_VERSION=\"django>=2.2,<2.3\"\nmatrix:\n  exclude:\n    - python: \"2.7\"\n      env: DJANGO_VERSION=\"django>=2.0,<2.1\"\n    - python: \"2.7\"\n      env: DJANGO_VERSION=\"django>=2.1,<2.2\"\n    - python: \"2.7\"\n      env: DJANGO_VERSION=\"django>=2.2,<2.3\"\n    - python: \"3.4\"\n      env: DJANGO_VERSION=\"django>=2.1,<2.2\"\n    - python: \"3.4\"\n      env: DJANGO_VERSION=\"django>=2.2,<2.3\"\ninstall:\n  - pip install -r requirements.txt\n  - pip install $DJANGO_VERSION\n  - python setup.py install\nscript: make test\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "#Contributing\n* Let PEP8 be your guide.\n* Please include tests if new code isn't covered by existing tests\n* Please [squash the commits in your Pull request into a single commit](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html). Unless\nthere are some extenuating circumstances why you think you shouldn't.\n* Have fun\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2013-2014 Mike Grouchy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "MANIFEST.in",
    "content": "include *.txt\ninclude *.md\n"
  },
  {
    "path": "Makefile",
    "content": "test:\n\tpython test_project/manage.py test --settings=test_project.settings stronghold.tests\nupdate-pypi:\n\tpython setup.py sdist upload\n\tpython setup.py bdist_wheel upload\n"
  },
  {
    "path": "README.md",
    "content": "[![Build Status](https://travis-ci.org/mgrouchy/django-stronghold.svg?branch=master)](https://travis-ci.org/mgrouchy/django-stronghold)\n\n# Stronghold\n\nGet inside your stronghold and make all your Django views default login_required\n\nStronghold is a very small and easy to use django app that makes all your Django project default to require login for all of your views.\n\nWARNING: still in development, so some of the DEFAULTS and such will be changing without notice.\n\n## Installation\n\nInstall via pip.\n\n```sh\npip install django-stronghold\n```\n\nAdd stronghold to your INSTALLED_APPS in your Django settings file\n\n```python\n\nINSTALLED_APPS = (\n    #...\n    'stronghold',\n)\n```\n\nThen add the stronghold middleware to your MIDDLEWARE_CLASSES in your Django settings file\n\n```python\nMIDDLEWARE_CLASSES = (\n    #...\n    'stronghold.middleware.LoginRequiredMiddleware',\n)\n\n```\n\n## Usage\n\nIf you followed the installation instructions now all your views are defaulting to require a login.\nTo make a view public again you can use the public decorator provided in `stronghold.decorators` like so:\n\n### For function based views\n\n```python\nfrom stronghold.decorators import public\n\n\n@public\ndef someview(request):\n\t# do some work\n\t#...\n\n```\n\n### For class based views (decorator)\n\n```python\nfrom django.utils.decorators import method_decorator\nfrom stronghold.decorators import public\n\n\nclass SomeView(View):\n\tdef get(self, request, *args, **kwargs):\n\t\t# some view logic\n\t\t#...\n\n\t@method_decorator(public)\n\tdef dispatch(self, *args, **kwargs):\n    \t        return super(SomeView, self).dispatch(*args, **kwargs)\n```\n\n### For class based views (mixin)\n\n```python\nfrom stronghold.views import StrongholdPublicMixin\n\n\nclass SomeView(StrongholdPublicMixin, View):\n\tpass\n```\n\n## Configuration (optional)\n\n### STRONGHOLD_DEFAULTS\n\nUse Strongholds defaults in addition to your own settings.\n\n**Default**:\n\n```python\nSTRONGHOLD_DEFAULTS = True\n```\n\nYou can add a tuple of url regexes in your settings file with the\n`STRONGHOLD_PUBLIC_URLS` setting. Any url that matches against these patterns\nwill be made public without using the `@public` decorator.\n\n### STRONGHOLD_PUBLIC_URLS\n\n**Default**:\n\n```python\nSTRONGHOLD_PUBLIC_URLS = ()\n```\n\nIf STRONGHOLD_DEFAULTS is True STRONGHOLD_PUBLIC_URLS contains:\n\n```python\n(\n    r'^%s.+$' % settings.STATIC_URL,\n    r'^%s.+$' % settings.MEDIA_URL,\n)\n\n```\n\nWhen settings.DEBUG = True. This is additive to your settings to support serving\nStatic files and media files from the development server. It does not replace any\nsettings you may have in `STRONGHOLD_PUBLIC_URLS`.\n\n> Note: Public URL regexes are matched against [HttpRequest.path_info](https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.path_info).\n\n### STRONGHOLD_PUBLIC_NAMED_URLS\n\nYou can add a tuple of url names in your settings file with the\n`STRONGHOLD_PUBLIC_NAMED_URLS` setting. Names in this setting will be reversed using\n`django.core.urlresolvers.reverse` and any url matching the output of the reverse\ncall will be made public without using the `@public` decorator:\n\n**Default**:\n\n```python\nSTRONGHOLD_PUBLIC_NAMED_URLS = ()\n```\n\nIf STRONGHOLD_DEFAULTS is True additionally we search for `django.contrib.auth`\nif it exists, we add the login and logout view names to `STRONGHOLD_PUBLIC_NAMED_URLS`\n\n### STRONGHOLD_USER_TEST_FUNC\n\nOptionally, set STRONGHOLD_USER_TEST_FUNC to a callable to limit access to users\nthat pass a custom test. The callback receives a `User` object and should\nreturn `True` if the user is authorized. This is equivalent to decorating a\nview with `user_passes_test`.\n\n**Example**:\n\n```python\nSTRONGHOLD_USER_TEST_FUNC = lambda user: user.is_staff\n```\n\n**Default**:\n\n```python\nSTRONGHOLD_USER_TEST_FUNC = lambda user: user.is_authenticated\n```\n\n## Compatiblity\n\nTested with:\n\n- Django 1.8.x\n- Django 1.9.x\n- Django 1.10.x\n- Django 1.11.x\n- Django 2.0.x\n- Django 2.1.x\n- Django 2.2.x\n\n## Contribute\n\nSee CONTRIBUTING.md\n"
  },
  {
    "path": "README.rst",
    "content": ".. figure:: https://travis-ci.org/mgrouchy/django-stronghold.png?branch=master\n   :alt: travis\n\nStronghold\n==========\n\nGet inside your stronghold and make all your Django views default\nlogin\\_required\n\nStronghold is a very small and easy to use django app that makes all\nyour Django project default to require login for all of your views.\n\nWARNING: still in development, so some of the DEFAULTS and such will be\nchanging without notice.\n\nInstallation\n------------\n\nInstall via pip.\n\n.. code:: sh\n\n    pip install django-stronghold\n\nAdd stronghold to your INSTALLED\\_APPS in your Django settings file\n\n.. code:: python\n\n\n    INSTALLED_APPS = (\n        #...\n        'stronghold',\n    )\n\nThen add the stronghold middleware to your MIDDLEWARE\\_CLASSES in your\nDjango settings file\n\n.. code:: python\n\n    MIDDLEWARE_CLASSES = (\n        #...\n        'stronghold.middleware.LoginRequiredMiddleware',\n    )\n\nUsage\n-----\n\nIf you followed the installation instructions now all your views are\ndefaulting to require a login. To make a view public again you can use\nthe public decorator provided in ``stronghold.decorators`` like so:\n\nFor function based views\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from stronghold.decorators import public\n\n\n    @public\n    def someview(request):\n        # do some work\n        #...\n\nfor class based views (decorator)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from django.utils.decorators import method_decorator\n    from stronghold.decorators import public\n\n\n    class SomeView(View):\n        def get(self, request, *args, **kwargs):\n            # some view logic\n            #...\n\n        @method_decorator(public)\n        def dispatch(self, *args, **kwargs):\n            return super(SomeView, self).dispatch(*args, **kwargs)\n\nfor class based views (mixin)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from stronghold import StrongholdPublicMixin\n\n    class SomeView(StrongholdPublicMixin, View):\n        pass\n\nConfiguration (optional)\n------------------------\n\nSTRONGHOLD\\_DEFAULTS\n~~~~~~~~~~~~~~~~~~~~\n\nUse Strongholds defaults in addition to your own settings.\n\n**Default**:\n\n.. code:: python\n\n    STRONGHOLD_DEFAULTS = True\n\nYou can add a tuple of url regexes in your settings file with the\n``STRONGHOLD_PUBLIC_URLS`` setting. Any url that matches against these\npatterns will be made public without using the ``@public`` decorator.\n\nSTRONGHOLD\\_PUBLIC\\_URLS\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n**Default**:\n\n.. code:: python\n\n    STRONGHOLD_PUBLIC_URLS = ()\n\nIf STRONGHOLD\\_DEFAULTS is True STRONGHOLD\\_PUBLIC\\_URLS contains:\n\n.. code:: python\n\n    (\n        r'^%s.+$' % settings.STATIC_URL,\n        r'^%s.+$' % settings.MEDIA_URL,\n    )\n\nWhen settings.DEBUG = True. This is additive to your settings to support\nserving Static files and media files from the development server. It\ndoes not replace any settings you may have in\n``STRONGHOLD_PUBLIC_URLS``.\n\n    Note: Public URL regexes are matched against\n    `HttpRequest.path\\_info`_.\n\nSTRONGHOLD\\_PUBLIC\\_NAMED\\_URLS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can add a tuple of url names in your settings file with the\n``STRONGHOLD_PUBLIC_NAMED_URLS`` setting. Names in this setting will be\nreversed using ``django.core.urlresolvers.reverse`` and any url matching\nthe output of the reverse call will be made public without using the\n``@public`` decorator:\n\n**Default**:\n\n.. code:: python\n\n    STRONGHOLD_PUBLIC_NAMED_URLS = ()\n\nIf STRONGHOLD\\_DEFAULTS is True additionally we search for\n``django.contrib.auth`` if it exists, we add the login and logout view\nnames to ``STRONGHOLD_PUBLIC_NAMED_URLS``\n\nSTRONGHOLD\\_USER\\_TEST\\_FUNC\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOptionally, set STRONGHOLD_USER_TEST_FUNC to a callable to limit access to users\nthat pass a custom test. The callback receives a ``User`` object and should\nreturn ``True`` if the user is authorized. This is equivalent to decorating a\nview with ``user_passes_test``.\n\n**Example**:\n\n.. code:: python\n    STRONGHOLD_USER_TEST_FUNC = lambda user: user.is_staff\n\n**Default**:\n\n.. code:: python\n    STRONGHOLD_USER_TEST_FUNC = lambda user: user.is_authenticated\n\n\nCompatiblity\n------------\n\nTested with:\n\n- Django 1.8.x\n- Django 1.9.x\n- Django 1.10.x\n- Django 1.11.x\n- Django 2.0.x\n- Django 2.1.x\n- Django 2.2.x\n\nContribute\n----------\n\nSee CONTRIBUTING.md\n\n.. _HttpRequest.path\\_info: https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.path_info\n"
  },
  {
    "path": "changelog.txt",
    "content": ""
  },
  {
    "path": "docs/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         =\nBUILDDIR      = _build\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n# the i18n builder cannot share the environment and doctrees with the others\nI18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext\n\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  text       to make text files\"\n\t@echo \"  man        to make manual pages\"\n\t@echo \"  texinfo    to make Texinfo files\"\n\t@echo \"  info       to make Texinfo files and run them through makeinfo\"\n\t@echo \"  gettext    to make PO message catalogs\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\nclean:\n\t-rm -rf $(BUILDDIR)/*\n\nhtml:\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/html.\"\n\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/django-stronghold.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/django-stronghold.qhc\"\n\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/django-stronghold\"\n\t@echo \"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-stronghold\"\n\t@echo \"# devhelp\"\n\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make' in that directory to run these through (pdf)latex\" \\\n\t      \"(use \\`make latexpdf' here to do that automatically).\"\n\nlatexpdf:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\ntext:\n\t$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\n\t@echo\n\t@echo \"Build finished. The text files are in $(BUILDDIR)/text.\"\n\nman:\n\t$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\n\t@echo\n\t@echo \"Build finished. The manual pages are in $(BUILDDIR)/man.\"\n\ntexinfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo\n\t@echo \"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo.\"\n\t@echo \"Run \\`make' in that directory to run these through makeinfo\" \\\n\t      \"(use \\`make info' here to do that automatically).\"\n\ninfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo \"Running Texinfo files through makeinfo...\"\n\tmake -C $(BUILDDIR)/texinfo info\n\t@echo \"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo.\"\n\ngettext:\n\t$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\n\t@echo\n\t@echo \"Build finished. The message catalogs are in $(BUILDDIR)/locale.\"\n\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n"
  },
  {
    "path": "docs/_build/html/.buildinfo",
    "content": "# Sphinx build info version 1\n# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.\nconfig: 67de63735401dad07cfe6ce3cf96a43f\ntags: fbb0d17656682115ca4d033fb2f83ba1\n"
  },
  {
    "path": "docs/_build/html/_sources/index.txt",
    "content": ".. django-stronghold documentation master file, created by\n   sphinx-quickstart on Fri Mar 22 22:25:59 2013.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nWelcome to django-stronghold's documentation!\n=============================================\n\nContents:\n\n.. toctree::\n   :maxdepth: 2\n\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n\n"
  },
  {
    "path": "docs/_build/html/_static/basic.css",
    "content": "/*\n * basic.css\n * ~~~~~~~~~\n *\n * Sphinx stylesheet -- basic theme.\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/* -- main layout ----------------------------------------------------------- */\n\ndiv.clearer {\n    clear: both;\n}\n\n/* -- relbar ---------------------------------------------------------------- */\n\ndiv.related {\n    width: 100%;\n    font-size: 90%;\n}\n\ndiv.related h3 {\n    display: none;\n}\n\ndiv.related ul {\n    margin: 0;\n    padding: 0 0 0 10px;\n    list-style: none;\n}\n\ndiv.related li {\n    display: inline;\n}\n\ndiv.related li.right {\n    float: right;\n    margin-right: 5px;\n}\n\n/* -- sidebar --------------------------------------------------------------- */\n\ndiv.sphinxsidebarwrapper {\n    padding: 10px 5px 0 10px;\n}\n\ndiv.sphinxsidebar {\n    float: left;\n    width: 230px;\n    margin-left: -100%;\n    font-size: 90%;\n}\n\ndiv.sphinxsidebar ul {\n    list-style: none;\n}\n\ndiv.sphinxsidebar ul ul,\ndiv.sphinxsidebar ul.want-points {\n    margin-left: 20px;\n    list-style: square;\n}\n\ndiv.sphinxsidebar ul ul {\n    margin-top: 0;\n    margin-bottom: 0;\n}\n\ndiv.sphinxsidebar form {\n    margin-top: 10px;\n}\n\ndiv.sphinxsidebar input {\n    border: 1px solid #98dbcc;\n    font-family: sans-serif;\n    font-size: 1em;\n}\n\ndiv.sphinxsidebar #searchbox input[type=\"text\"] {\n    width: 170px;\n}\n\ndiv.sphinxsidebar #searchbox input[type=\"submit\"] {\n    width: 30px;\n}\n\nimg {\n    border: 0;\n}\n\n/* -- search page ----------------------------------------------------------- */\n\nul.search {\n    margin: 10px 0 0 20px;\n    padding: 0;\n}\n\nul.search li {\n    padding: 5px 0 5px 20px;\n    background-image: url(file.png);\n    background-repeat: no-repeat;\n    background-position: 0 7px;\n}\n\nul.search li a {\n    font-weight: bold;\n}\n\nul.search li div.context {\n    color: #888;\n    margin: 2px 0 0 30px;\n    text-align: left;\n}\n\nul.keywordmatches li.goodmatch a {\n    font-weight: bold;\n}\n\n/* -- index page ------------------------------------------------------------ */\n\ntable.contentstable {\n    width: 90%;\n}\n\ntable.contentstable p.biglink {\n    line-height: 150%;\n}\n\na.biglink {\n    font-size: 1.3em;\n}\n\nspan.linkdescr {\n    font-style: italic;\n    padding-top: 5px;\n    font-size: 90%;\n}\n\n/* -- general index --------------------------------------------------------- */\n\ntable.indextable {\n    width: 100%;\n}\n\ntable.indextable td {\n    text-align: left;\n    vertical-align: top;\n}\n\ntable.indextable dl, table.indextable dd {\n    margin-top: 0;\n    margin-bottom: 0;\n}\n\ntable.indextable tr.pcap {\n    height: 10px;\n}\n\ntable.indextable tr.cap {\n    margin-top: 10px;\n    background-color: #f2f2f2;\n}\n\nimg.toggler {\n    margin-right: 3px;\n    margin-top: 3px;\n    cursor: pointer;\n}\n\ndiv.modindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\ndiv.genindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\n/* -- general body styles --------------------------------------------------- */\n\na.headerlink {\n    visibility: hidden;\n}\n\nh1:hover > a.headerlink,\nh2:hover > a.headerlink,\nh3:hover > a.headerlink,\nh4:hover > a.headerlink,\nh5:hover > a.headerlink,\nh6:hover > a.headerlink,\ndt:hover > a.headerlink {\n    visibility: visible;\n}\n\ndiv.body p.caption {\n    text-align: inherit;\n}\n\ndiv.body td {\n    text-align: left;\n}\n\n.field-list ul {\n    padding-left: 1em;\n}\n\n.first {\n    margin-top: 0 !important;\n}\n\np.rubric {\n    margin-top: 30px;\n    font-weight: bold;\n}\n\nimg.align-left, .figure.align-left, object.align-left {\n    clear: left;\n    float: left;\n    margin-right: 1em;\n}\n\nimg.align-right, .figure.align-right, object.align-right {\n    clear: right;\n    float: right;\n    margin-left: 1em;\n}\n\nimg.align-center, .figure.align-center, object.align-center {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.align-left {\n    text-align: left;\n}\n\n.align-center {\n    text-align: center;\n}\n\n.align-right {\n    text-align: right;\n}\n\n/* -- sidebars -------------------------------------------------------------- */\n\ndiv.sidebar {\n    margin: 0 0 0.5em 1em;\n    border: 1px solid #ddb;\n    padding: 7px 7px 0 7px;\n    background-color: #ffe;\n    width: 40%;\n    float: right;\n}\n\np.sidebar-title {\n    font-weight: bold;\n}\n\n/* -- topics ---------------------------------------------------------------- */\n\ndiv.topic {\n    border: 1px solid #ccc;\n    padding: 7px 7px 0 7px;\n    margin: 10px 0 10px 0;\n}\n\np.topic-title {\n    font-size: 1.1em;\n    font-weight: bold;\n    margin-top: 10px;\n}\n\n/* -- admonitions ----------------------------------------------------------- */\n\ndiv.admonition {\n    margin-top: 10px;\n    margin-bottom: 10px;\n    padding: 7px;\n}\n\ndiv.admonition dt {\n    font-weight: bold;\n}\n\ndiv.admonition dl {\n    margin-bottom: 0;\n}\n\np.admonition-title {\n    margin: 0px 10px 5px 0px;\n    font-weight: bold;\n}\n\ndiv.body p.centered {\n    text-align: center;\n    margin-top: 25px;\n}\n\n/* -- tables ---------------------------------------------------------------- */\n\ntable.docutils {\n    border: 0;\n    border-collapse: collapse;\n}\n\ntable.docutils td, table.docutils th {\n    padding: 1px 8px 1px 5px;\n    border-top: 0;\n    border-left: 0;\n    border-right: 0;\n    border-bottom: 1px solid #aaa;\n}\n\ntable.field-list td, table.field-list th {\n    border: 0 !important;\n}\n\ntable.footnote td, table.footnote th {\n    border: 0 !important;\n}\n\nth {\n    text-align: left;\n    padding-right: 5px;\n}\n\ntable.citation {\n    border-left: solid 1px gray;\n    margin-left: 1px;\n}\n\ntable.citation td {\n    border-bottom: none;\n}\n\n/* -- other body styles ----------------------------------------------------- */\n\nol.arabic {\n    list-style: decimal;\n}\n\nol.loweralpha {\n    list-style: lower-alpha;\n}\n\nol.upperalpha {\n    list-style: upper-alpha;\n}\n\nol.lowerroman {\n    list-style: lower-roman;\n}\n\nol.upperroman {\n    list-style: upper-roman;\n}\n\ndl {\n    margin-bottom: 15px;\n}\n\ndd p {\n    margin-top: 0px;\n}\n\ndd ul, dd table {\n    margin-bottom: 10px;\n}\n\ndd {\n    margin-top: 3px;\n    margin-bottom: 10px;\n    margin-left: 30px;\n}\n\ndt:target, .highlighted {\n    background-color: #fbe54e;\n}\n\ndl.glossary dt {\n    font-weight: bold;\n    font-size: 1.1em;\n}\n\n.field-list ul {\n    margin: 0;\n    padding-left: 1em;\n}\n\n.field-list p {\n    margin: 0;\n}\n\n.refcount {\n    color: #060;\n}\n\n.optional {\n    font-size: 1.3em;\n}\n\n.versionmodified {\n    font-style: italic;\n}\n\n.system-message {\n    background-color: #fda;\n    padding: 5px;\n    border: 3px solid red;\n}\n\n.footnote:target  {\n    background-color: #ffa;\n}\n\n.line-block {\n    display: block;\n    margin-top: 1em;\n    margin-bottom: 1em;\n}\n\n.line-block .line-block {\n    margin-top: 0;\n    margin-bottom: 0;\n    margin-left: 1.5em;\n}\n\n.guilabel, .menuselection {\n    font-family: sans-serif;\n}\n\n.accelerator {\n    text-decoration: underline;\n}\n\n.classifier {\n    font-style: oblique;\n}\n\nabbr, acronym {\n    border-bottom: dotted 1px;\n    cursor: help;\n}\n\n/* -- code displays --------------------------------------------------------- */\n\npre {\n    overflow: auto;\n    overflow-y: hidden;  /* fixes display issues on Chrome browsers */\n}\n\ntd.linenos pre {\n    padding: 5px 0px;\n    border: 0;\n    background-color: transparent;\n    color: #aaa;\n}\n\ntable.highlighttable {\n    margin-left: 0.5em;\n}\n\ntable.highlighttable td {\n    padding: 0 0.5em 0 0.5em;\n}\n\ntt.descname {\n    background-color: transparent;\n    font-weight: bold;\n    font-size: 1.2em;\n}\n\ntt.descclassname {\n    background-color: transparent;\n}\n\ntt.xref, a tt {\n    background-color: transparent;\n    font-weight: bold;\n}\n\nh1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {\n    background-color: transparent;\n}\n\n.viewcode-link {\n    float: right;\n}\n\n.viewcode-back {\n    float: right;\n    font-family: sans-serif;\n}\n\ndiv.viewcode-block:target {\n    margin: -1px -10px;\n    padding: 0 10px;\n}\n\n/* -- math display ---------------------------------------------------------- */\n\nimg.math {\n    vertical-align: middle;\n}\n\ndiv.body div.math p {\n    text-align: center;\n}\n\nspan.eqno {\n    float: right;\n}\n\n/* -- printout stylesheet --------------------------------------------------- */\n\n@media print {\n    div.document,\n    div.documentwrapper,\n    div.bodywrapper {\n        margin: 0 !important;\n        width: 100%;\n    }\n\n    div.sphinxsidebar,\n    div.related,\n    div.footer,\n    #top-link {\n        display: none;\n    }\n}"
  },
  {
    "path": "docs/_build/html/_static/default.css",
    "content": "/*\n * default.css_t\n * ~~~~~~~~~~~~~\n *\n * Sphinx stylesheet -- default theme.\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n@import url(\"basic.css\");\n\n/* -- page layout ----------------------------------------------------------- */\n\nbody {\n    font-family: sans-serif;\n    font-size: 100%;\n    background-color: #11303d;\n    color: #000;\n    margin: 0;\n    padding: 0;\n}\n\ndiv.document {\n    background-color: #1c4e63;\n}\n\ndiv.documentwrapper {\n    float: left;\n    width: 100%;\n}\n\ndiv.bodywrapper {\n    margin: 0 0 0 230px;\n}\n\ndiv.body {\n    background-color: #ffffff;\n    color: #000000;\n    padding: 0 20px 30px 20px;\n}\n\ndiv.footer {\n    color: #ffffff;\n    width: 100%;\n    padding: 9px 0 9px 0;\n    text-align: center;\n    font-size: 75%;\n}\n\ndiv.footer a {\n    color: #ffffff;\n    text-decoration: underline;\n}\n\ndiv.related {\n    background-color: #133f52;\n    line-height: 30px;\n    color: #ffffff;\n}\n\ndiv.related a {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar {\n}\n\ndiv.sphinxsidebar h3 {\n    font-family: 'Trebuchet MS', sans-serif;\n    color: #ffffff;\n    font-size: 1.4em;\n    font-weight: normal;\n    margin: 0;\n    padding: 0;\n}\n\ndiv.sphinxsidebar h3 a {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar h4 {\n    font-family: 'Trebuchet MS', sans-serif;\n    color: #ffffff;\n    font-size: 1.3em;\n    font-weight: normal;\n    margin: 5px 0 0 0;\n    padding: 0;\n}\n\ndiv.sphinxsidebar p {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar p.topless {\n    margin: 5px 10px 10px 10px;\n}\n\ndiv.sphinxsidebar ul {\n    margin: 10px;\n    padding: 0;\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar a {\n    color: #98dbcc;\n}\n\ndiv.sphinxsidebar input {\n    border: 1px solid #98dbcc;\n    font-family: sans-serif;\n    font-size: 1em;\n}\n\n\n\n/* -- hyperlink styles ------------------------------------------------------ */\n\na {\n    color: #355f7c;\n    text-decoration: none;\n}\n\na:visited {\n    color: #355f7c;\n    text-decoration: none;\n}\n\na:hover {\n    text-decoration: underline;\n}\n\n\n\n/* -- body styles ----------------------------------------------------------- */\n\ndiv.body h1,\ndiv.body h2,\ndiv.body h3,\ndiv.body h4,\ndiv.body h5,\ndiv.body h6 {\n    font-family: 'Trebuchet MS', sans-serif;\n    background-color: #f2f2f2;\n    font-weight: normal;\n    color: #20435c;\n    border-bottom: 1px solid #ccc;\n    margin: 20px -20px 10px -20px;\n    padding: 3px 0 3px 10px;\n}\n\ndiv.body h1 { margin-top: 0; font-size: 200%; }\ndiv.body h2 { font-size: 160%; }\ndiv.body h3 { font-size: 140%; }\ndiv.body h4 { font-size: 120%; }\ndiv.body h5 { font-size: 110%; }\ndiv.body h6 { font-size: 100%; }\n\na.headerlink {\n    color: #c60f0f;\n    font-size: 0.8em;\n    padding: 0 4px 0 4px;\n    text-decoration: none;\n}\n\na.headerlink:hover {\n    background-color: #c60f0f;\n    color: white;\n}\n\ndiv.body p, div.body dd, div.body li {\n    text-align: justify;\n    line-height: 130%;\n}\n\ndiv.admonition p.admonition-title + p {\n    display: inline;\n}\n\ndiv.admonition p {\n    margin-bottom: 5px;\n}\n\ndiv.admonition pre {\n    margin-bottom: 5px;\n}\n\ndiv.admonition ul, div.admonition ol {\n    margin-bottom: 5px;\n}\n\ndiv.note {\n    background-color: #eee;\n    border: 1px solid #ccc;\n}\n\ndiv.seealso {\n    background-color: #ffc;\n    border: 1px solid #ff6;\n}\n\ndiv.topic {\n    background-color: #eee;\n}\n\ndiv.warning {\n    background-color: #ffe4e4;\n    border: 1px solid #f66;\n}\n\np.admonition-title {\n    display: inline;\n}\n\np.admonition-title:after {\n    content: \":\";\n}\n\npre {\n    padding: 5px;\n    background-color: #eeffcc;\n    color: #333333;\n    line-height: 120%;\n    border: 1px solid #ac9;\n    border-left: none;\n    border-right: none;\n}\n\ntt {\n    background-color: #ecf0f3;\n    padding: 0 1px 0 1px;\n    font-size: 0.95em;\n}\n\nth {\n    background-color: #ede;\n}\n\n.warning tt {\n    background: #efc2c2;\n}\n\n.note tt {\n    background: #d6d6d6;\n}\n\n.viewcode-back {\n    font-family: sans-serif;\n}\n\ndiv.viewcode-block:target {\n    background-color: #f4debf;\n    border-top: 1px solid #ac9;\n    border-bottom: 1px solid #ac9;\n}"
  },
  {
    "path": "docs/_build/html/_static/doctools.js",
    "content": "/*\n * doctools.js\n * ~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for all documentation.\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/**\n * select a different prefix for underscore\n */\n$u = _.noConflict();\n\n/**\n * make the code below compatible with browsers without\n * an installed firebug like debugger\nif (!window.console || !console.firebug) {\n  var names = [\"log\", \"debug\", \"info\", \"warn\", \"error\", \"assert\", \"dir\",\n    \"dirxml\", \"group\", \"groupEnd\", \"time\", \"timeEnd\", \"count\", \"trace\",\n    \"profile\", \"profileEnd\"];\n  window.console = {};\n  for (var i = 0; i < names.length; ++i)\n    window.console[names[i]] = function() {};\n}\n */\n\n/**\n * small helper function to urldecode strings\n */\njQuery.urldecode = function(x) {\n  return decodeURIComponent(x).replace(/\\+/g, ' ');\n}\n\n/**\n * small helper function to urlencode strings\n */\njQuery.urlencode = encodeURIComponent;\n\n/**\n * This function returns the parsed url parameters of the\n * current request. Multiple values per key are supported,\n * it will always return arrays of strings for the value parts.\n */\njQuery.getQueryParameters = function(s) {\n  if (typeof s == 'undefined')\n    s = document.location.search;\n  var parts = s.substr(s.indexOf('?') + 1).split('&');\n  var result = {};\n  for (var i = 0; i < parts.length; i++) {\n    var tmp = parts[i].split('=', 2);\n    var key = jQuery.urldecode(tmp[0]);\n    var value = jQuery.urldecode(tmp[1]);\n    if (key in result)\n      result[key].push(value);\n    else\n      result[key] = [value];\n  }\n  return result;\n};\n\n/**\n * small function to check if an array contains\n * a given item.\n */\njQuery.contains = function(arr, item) {\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i] == item)\n      return true;\n  }\n  return false;\n};\n\n/**\n * highlight a given string on a jquery object by wrapping it in\n * span elements with the given class name.\n */\njQuery.fn.highlightText = function(text, className) {\n  function highlight(node) {\n    if (node.nodeType == 3) {\n      var val = node.nodeValue;\n      var pos = val.toLowerCase().indexOf(text);\n      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {\n        var span = document.createElement(\"span\");\n        span.className = className;\n        span.appendChild(document.createTextNode(val.substr(pos, text.length)));\n        node.parentNode.insertBefore(span, node.parentNode.insertBefore(\n          document.createTextNode(val.substr(pos + text.length)),\n          node.nextSibling));\n        node.nodeValue = val.substr(0, pos);\n      }\n    }\n    else if (!jQuery(node).is(\"button, select, textarea\")) {\n      jQuery.each(node.childNodes, function() {\n        highlight(this);\n      });\n    }\n  }\n  return this.each(function() {\n    highlight(this);\n  });\n};\n\n/**\n * Small JavaScript module for the documentation.\n */\nvar Documentation = {\n\n  init : function() {\n    this.fixFirefoxAnchorBug();\n    this.highlightSearchWords();\n    this.initIndexTable();\n  },\n\n  /**\n   * i18n support\n   */\n  TRANSLATIONS : {},\n  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },\n  LOCALE : 'unknown',\n\n  // gettext and ngettext don't access this so that the functions\n  // can safely bound to a different name (_ = Documentation.gettext)\n  gettext : function(string) {\n    var translated = Documentation.TRANSLATIONS[string];\n    if (typeof translated == 'undefined')\n      return string;\n    return (typeof translated == 'string') ? translated : translated[0];\n  },\n\n  ngettext : function(singular, plural, n) {\n    var translated = Documentation.TRANSLATIONS[singular];\n    if (typeof translated == 'undefined')\n      return (n == 1) ? singular : plural;\n    return translated[Documentation.PLURALEXPR(n)];\n  },\n\n  addTranslations : function(catalog) {\n    for (var key in catalog.messages)\n      this.TRANSLATIONS[key] = catalog.messages[key];\n    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');\n    this.LOCALE = catalog.locale;\n  },\n\n  /**\n   * add context elements like header anchor links\n   */\n  addContextElements : function() {\n    $('div[id] > :header:first').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this headline')).\n      appendTo(this);\n    });\n    $('dt[id]').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this definition')).\n      appendTo(this);\n    });\n  },\n\n  /**\n   * workaround a firefox stupidity\n   */\n  fixFirefoxAnchorBug : function() {\n    if (document.location.hash && $.browser.mozilla)\n      window.setTimeout(function() {\n        document.location.href += '';\n      }, 10);\n  },\n\n  /**\n   * highlight the search words provided in the url in the text\n   */\n  highlightSearchWords : function() {\n    var params = $.getQueryParameters();\n    var terms = (params.highlight) ? params.highlight[0].split(/\\s+/) : [];\n    if (terms.length) {\n      var body = $('div.body');\n      window.setTimeout(function() {\n        $.each(terms, function() {\n          body.highlightText(this.toLowerCase(), 'highlighted');\n        });\n      }, 10);\n      $('<p class=\"highlight-link\"><a href=\"javascript:Documentation.' +\n        'hideSearchWords()\">' + _('Hide Search Matches') + '</a></p>')\n          .appendTo($('#searchbox'));\n    }\n  },\n\n  /**\n   * init the domain index toggle buttons\n   */\n  initIndexTable : function() {\n    var togglers = $('img.toggler').click(function() {\n      var src = $(this).attr('src');\n      var idnum = $(this).attr('id').substr(7);\n      $('tr.cg-' + idnum).toggle();\n      if (src.substr(-9) == 'minus.png')\n        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');\n      else\n        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');\n    }).css('display', '');\n    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {\n        togglers.click();\n    }\n  },\n\n  /**\n   * helper function to hide the search marks again\n   */\n  hideSearchWords : function() {\n    $('#searchbox .highlight-link').fadeOut(300);\n    $('span.highlighted').removeClass('highlighted');\n  },\n\n  /**\n   * make the url absolute\n   */\n  makeURL : function(relativeURL) {\n    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;\n  },\n\n  /**\n   * get the current relative url\n   */\n  getCurrentURL : function() {\n    var path = document.location.pathname;\n    var parts = path.split(/\\//);\n    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\\//), function() {\n      if (this == '..')\n        parts.pop();\n    });\n    var url = parts.join('/');\n    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);\n  }\n};\n\n// quick alias for translations\n_ = Documentation.gettext;\n\n$(document).ready(function() {\n  Documentation.init();\n});\n"
  },
  {
    "path": "docs/_build/html/_static/jquery.js",
    "content": "/*!\n * jQuery JavaScript Library v1.4.2\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: Sat Feb 13 22:33:48 2010 -0500\n */\n(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll(\"left\")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:\"script\"}):c.globalEval(b.text||b.textContent||b.innerHTML||\"\");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b===\"object\"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?\ne(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,\"events\");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type===\"click\")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,\"\")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=\nj.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType===\"mouseenter\"||i.preType===\"mouseleave\")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return\"live.\"+(a&&a!==\"*\"?a+\".\":\"\")+b.replace(/\\./g,\"`\").replace(/ /g,\n\"&\")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]===\"string\"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=\ntrue;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return\"scrollTo\"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\\w\\W]+>)[^>]*$|^#([\\w-]+)$/,Ua=/^.[^:#\\[\\.,]*$/,Va=/\\S/,\nWa=/^(\\s|\\u00A0)+|(\\s|\\u00A0)+$/g,Xa=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a===\"body\"&&!b){this.context=s;this[0]=s.body;this.selector=\"body\";this.length=1;return this}if(typeof a===\"string\")if((d=Ta.exec(a))&&\n(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,\na)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:\"\",jquery:\"1.4.2\",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===\n\"find\")f.selector=this.selector+(this.selector?\" \":\"\")+d;else if(b)f.selector=this.selector+\".\"+b+\"(\"+d+\")\";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),\"slice\",R.call(arguments).join(\",\"))},map:function(a){return this.pushStack(c.map(this,\nfunction(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a===\"boolean\"){f=a;a=arguments[1]||{};b=2}if(typeof a!==\"object\"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||\nc.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler(\"ready\")}},bindReady:function(){if(!xa){xa=true;if(s.readyState===\"complete\")return c.ready();if(s.addEventListener){s.addEventListener(\"DOMContentLoaded\",\nL,false);A.addEventListener(\"load\",c.ready,false)}else if(s.attachEvent){s.attachEvent(\"onreadystatechange\",L);A.attachEvent(\"onload\",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)===\"[object Function]\"},isArray:function(a){return $.call(a)===\"[object Array]\"},isPlainObject:function(a){if(!a||$.call(a)!==\"[object Object]\"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,\"constructor\")&&!aa.call(a.constructor.prototype,\n\"isPrototypeOf\"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!==\"string\"||!a)return null;a=c.trim(a);if(/^[\\],:{}\\s]*$/.test(a.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\"@\").replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\"]\").replace(/(?:^|:|,)(?:\\s*\\[)+/g,\"\")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function(\"return \"+\na))();else c.error(\"Invalid JSON: \"+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName(\"head\")[0]||s.documentElement,d=s.createElement(\"script\");d.type=\"text/javascript\";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],\nd)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||\"\").replace(Wa,\"\")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a===\"string\"||c.isFunction(a)||typeof a!==\"function\"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===\na)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length===\"number\")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===\"string\"){d=a;a=d[b];b=w}else if(b&&\n!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \\/]([\\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \\/]([\\w.]+)/.exec(a)||/(msie) ([\\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\\w.]+))?/.exec(a)||[];return{browser:a[1]||\"\",version:a[2]||\"0\"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=\ntrue;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener(\"DOMContentLoaded\",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState===\"complete\"){s.detachEvent(\"onreadystatechange\",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement(\"script\"),d=s.createElement(\"div\"),f=\"script\"+J();d.style.display=\"none\";d.innerHTML=\"   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>\";\nvar e=d.getElementsByTagName(\"*\"),j=d.getElementsByTagName(\"a\")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName(\"tbody\").length,htmlSerialize:!!d.getElementsByTagName(\"link\").length,style:/red/.test(j.getAttribute(\"style\")),hrefNormalized:j.getAttribute(\"href\")===\"/a\",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName(\"input\")[0].value===\"on\",optSelected:s.createElement(\"select\").appendChild(s.createElement(\"option\")).selected,\nparentNode:d.removeChild(d.appendChild(s.createElement(\"div\"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type=\"text/javascript\";try{b.appendChild(s.createTextNode(\"window.\"+f+\"=1;\"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent(\"onclick\",function k(){c.support.noCloneEvent=\nfalse;d.detachEvent(\"onclick\",k)});d.cloneNode(true).fireEvent(\"onclick\")}d=s.createElement(\"div\");d.innerHTML=\"<input type='radio' name='radiotest' checked='checked'/>\";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement(\"div\");k.style.width=k.style.paddingLeft=\"1px\";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display=\"none\"});a=function(k){var n=\ns.createElement(\"div\");k=\"on\"+k;var r=k in n;if(!r){n.setAttribute(k,\"return;\");r=typeof n[k]===\"function\"}return r};c.support.submitBubbles=a(\"submit\");c.support.changeBubbles=a(\"change\");a=b=d=e=j=null}})();c.props={\"for\":\"htmlFor\",\"class\":\"className\",readonly:\"readOnly\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",rowspan:\"rowSpan\",colspan:\"colSpan\",tabindex:\"tabIndex\",usemap:\"useMap\",frameborder:\"frameBorder\"};var G=\"jQuery\"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,\napplet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b===\"string\"&&d===w)return null;f||(f=++Ya);if(typeof b===\"object\"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b===\"string\"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];\nelse a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a===\"undefined\"&&this.length)return c.data(this[0]);else if(typeof a===\"object\")return this.each(function(){c.data(this,a)});var d=a.split(\".\");d[1]=d[1]?\".\"+d[1]:\"\";if(b===w){var f=this.triggerHandler(\"getData\"+d[1]+\"!\",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger(\"setData\"+d[1]+\"!\",[d[0],b]).each(function(){c.data(this,\na,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||\"fx\")+\"queue\";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||\"fx\";var d=c.queue(a,b),f=d.shift();if(f===\"inprogress\")f=d.shift();if(f){b===\"fx\"&&d.unshift(\"inprogress\");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!==\"string\"){b=a;a=\"fx\"}if(b===\nw)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a===\"fx\"&&d[0]!==\"inprogress\"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||\"fx\";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||\"fx\",[])}});var Aa=/[\\n\\t]/g,ca=/\\s+/,Za=/\\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,\ncb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,\"\");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr(\"class\")))});if(a&&typeof a===\"string\")for(var b=(a||\"\").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=\" \"+e.className+\" \",\ni=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(\" \"+b[o]+\" \")<0)i+=\" \"+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr(\"class\")))});if(a&&typeof a===\"string\"||a===w)for(var b=(a||\"\").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(\" \"+e.className+\" \").replace(Aa,\" \"),i=0,o=b.length;i<o;i++)j=j.replace(\" \"+b[i]+\" \",\n\" \");e.className=c.trim(j)}else e.className=\"\"}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b===\"boolean\";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr(\"class\"),b),b)});return this.each(function(){if(d===\"string\")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?\"addClass\":\"removeClass\"](e)}else if(d===\"undefined\"||d===\"boolean\"){this.className&&c.data(this,\"__className__\",this.className);this.className=\nthis.className||a===false?\"\":c.data(this,\"__className__\")||\"\"}})},hasClass:function(a){a=\" \"+a+\" \";for(var b=0,d=this.length;b<d;b++)if((\" \"+this[b].className+\" \").replace(Aa,\" \").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,\"option\"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,\"select\")){var d=b.selectedIndex,f=[],e=b.options;b=b.type===\"select-one\";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=\ne[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute(\"value\")===null?\"on\":b.value;return(b.value||\"\").replace(Za,\"\")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r===\"number\")r+=\"\";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,\"select\")){var u=c.makeArray(r);c(\"option\",this).each(function(){this.selected=\nc.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b===\"type\"&&ab.test(a.nodeName)&&a.parentNode&&c.error(\"type property can't be changed\");\na[b]=d}if(c.nodeName(a,\"form\")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b===\"tabIndex\")return(b=a.getAttributeNode(\"tabIndex\"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b===\"style\"){if(e)a.style.cssText=\"\"+d;return a.style.cssText}e&&a.setAttribute(b,\"\"+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\\.(.*)$/,db=function(a){return a.replace(/[^\\w\\s\\.\\|`]/g,\nfunction(b){return\"\\\\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!==\"undefined\"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(\" \");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(\".\")>-1){r=k.split(\".\");\nk=r.shift();j.namespace=r.slice(0).sort().join(\".\")}else{r=[];j.namespace=\"\"}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent(\"on\"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),\nC=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b===\"string\"&&b.charAt(0)===\".\"){b=b||\"\";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(\" \");e=b[j++];){n=e;i=e.indexOf(\".\")<0;o=[];if(!i){o=e.split(\".\");e=o.shift();k=new RegExp(\"(^|\\\\.)\"+c.map(o.slice(0).sort(),db).join(\"\\\\.(?:.*\\\\.)?\")+\"(\\\\.|$)\")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=\nnull)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a===\"object\"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf(\"!\")>=0){a.type=\ne=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,\"handle\"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d[\"on\"+e]&&d[\"on\"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&\nf)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,\"a\")&&e===\"click\",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f[\"on\"+e])f[\"on\"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f[\"on\"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(\".\")<0&&!a.exclusive;\nif(!b){d=a.type.split(\".\");a.type=d.shift();f=new RegExp(\"(^|\\\\.)\"+d.slice(0).sort().join(\"\\\\.(?:.*\\\\.)?\")+\"(\\\\.|$)\")}e=c.data(this,\"events\");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:\"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(\" \"),\nfix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||\nd&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,\"\");c.each(c.data(this,\n\"events\").live||[],function(){if(d===this.origType.replace(O,\"\"))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent(\"on\"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=\na;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,\nisImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=\n{setup:function(){if(this.nodeName.toLowerCase()!==\"form\"){c.event.add(this,\"click.specialSubmit\",function(a){var b=a.target,d=b.type;if((d===\"submit\"||d===\"image\")&&c(b).closest(\"form\").length)return na(\"submit\",this,arguments)});c.event.add(this,\"keypress.specialSubmit\",function(a){var b=a.target,d=b.type;if((d===\"text\"||d===\"password\")&&c(b).closest(\"form\").length&&a.keyCode===13)return na(\"submit\",this,arguments)})}else return false},teardown:function(){c.event.remove(this,\".specialSubmit\")}};\nif(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b===\"radio\"||b===\"checkbox\")d=a.checked;else if(b===\"select-multiple\")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join(\"-\"):\"\";else if(a.nodeName.toLowerCase()===\"select\")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,\"_change_data\");e=Fa(d);if(a.type!==\"focusout\"||d.type!==\"radio\")c.data(d,\"_change_data\",\ne);if(!(f===w||e===f))if(f!=null||e){a.type=\"change\";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d===\"radio\"||d===\"checkbox\"||b.nodeName.toLowerCase()===\"select\")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!==\"textarea\"||a.keyCode===32&&(d===\"checkbox\"||d===\"radio\")||d===\"select-multiple\")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,\n\"_change_data\",Fa(a))}},setup:function(){if(this.type===\"file\")return false;for(var a in ea)c.event.add(this,a+\".specialChange\",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,\".specialChange\");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,\nd,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each([\"bind\",\"one\"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d===\"object\"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b===\"one\"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d===\"unload\"&&b!==\"one\")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a===\"object\"&&\n!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind(\"live\"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},\ntoggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,\"lastToggle\"+a.guid)||0)%d;c.data(this,\"lastToggle\"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:\"focusin\",blur:\"focusout\",mouseenter:\"mouseover\",mouseleave:\"mouseout\"};c.each([\"live\",\"die\"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,\nu=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||\"\").split(\" \");(i=d[o++])!=null;){j=O.exec(i);k=\"\";if(j){k=j[0];i=i.replace(O,\"\")}if(i===\"hover\")d.push(\"mouseenter\"+k,\"mouseleave\"+k);else{n=i;if(i===\"focus\"||i===\"blur\"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b===\"live\"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error\".split(\" \"),\nfunction(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent(\"onunload\",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h=\"\",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];\nif(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!==\"string\"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|['\"][^'\"]*['\"]|[^[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\ne=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!==\"string\")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(\"\"),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();\nt=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]===\"~\"||p[0]===\"+\")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D=\"\";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||\ng);if(j.call(y)===\"[object Array]\")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];\nfor(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!==\"\\\\\"){q[1]=(q[1]||\"\").replace(/\\\\/g,\"\");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],\"\");break}}}}m||(m=h.getElementsByTagName(\"*\"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-\n1)!==\"\\\\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],\"\");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw\"Syntax error, unrecognized expression: \"+g;};var n=k.selectors={order:[\"ID\",\"NAME\",\"TAG\"],match:{ID:/#((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)/,\nCLASS:/\\.((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)/,NAME:/\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)['\"]*\\]/,ATTR:/\\[\\s*((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(['\"]*)(.*?)\\3|)\\s*\\]/,TAG:/^((?:[\\w\\u00c0-\\uFFFF\\*-]|\\\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\\((even|odd|[\\dn+-]*)\\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^-]|$)/,PSEUDO:/:((?:[\\w\\u00c0-\\uFFFF-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/},leftMatch:{},attrMap:{\"class\":\"className\",\"for\":\"htmlFor\"},attrHandle:{href:function(g){return g.getAttribute(\"href\")}},\nrelative:{\"+\":function(g,h){var l=typeof h===\"string\",m=l&&!/\\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},\">\":function(g,h){var l=typeof h===\"string\";if(l&&!/\\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=\nl?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},\"\":function(g,h,l){var m=e++,q=d;if(typeof h===\"string\"&&!/\\W/.test(h)){var p=h=h.toLowerCase();q=b}q(\"parentNode\",h,m,g,p,l)},\"~\":function(g,h,l){var m=e++,q=d;if(typeof h===\"string\"&&!/\\W/.test(h)){var p=h=h.toLowerCase();q=b}q(\"previousSibling\",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!==\"undefined\"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!==\"undefined\"){var l=[];\nh=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute(\"name\")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=\" \"+g[1].replace(/\\\\/g,\"\")+\" \";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(\" \"+v.className+\" \").replace(/[\\t\\n]/g,\" \").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\\\/g,\"\")},TAG:function(g){return g[1].toLowerCase()},\nCHILD:function(g){if(g[1]===\"nth\"){var h=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(g[2]===\"even\"&&\"2n\"||g[2]===\"odd\"&&\"2n+1\"||!/\\D/.test(g[2])&&\"0n+\"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\\\/g,\"\");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]===\"~=\")g[4]=\" \"+g[4]+\" \";return g},PSEUDO:function(g,h,l,m,q){if(g[1]===\"not\")if((f.exec(g[3])||\"\").length>1||/^\\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,\ng);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!==\"hidden\"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\\d/i.test(g.nodeName)},\ntext:function(g){return\"text\"===g.type},radio:function(g){return\"radio\"===g.type},checkbox:function(g){return\"checkbox\"===g.type},file:function(g){return\"file\"===g.type},password:function(g){return\"password\"===g.type},submit:function(g){return\"submit\"===g.type},image:function(g){return\"image\"===g.type},reset:function(g){return\"reset\"===g.type},button:function(g){return\"button\"===g.type||g.nodeName.toLowerCase()===\"button\"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},\nsetFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q===\"contains\")return(g.textContent||g.innerText||a([g])||\"\").indexOf(h[3])>=0;else if(q===\"not\"){h=\nh[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error(\"Syntax error, unrecognized expression: \"+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case \"only\":case \"first\":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l===\"first\")return true;m=g;case \"last\":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case \"nth\":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=\nm.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute(\"id\")===h},TAG:function(g,h){return h===\"*\"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(\" \"+(g.className||g.getAttribute(\"class\"))+\" \").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+\"\";var m=h[2];h=h[4];return g==null?m===\"!=\":m===\n\"=\"?l===h:m===\"*=\"?l.indexOf(h)>=0:m===\"~=\"?(\" \"+l+\" \").indexOf(h)>=0:!h?l&&g!==false:m===\"!=\"?l!==h:m===\"^=\"?l.indexOf(h)===0:m===\"$=\"?l.substr(l.length-h.length)===h:m===\"|=\"?l===h||l.substr(0,h.length+1)===h+\"-\":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\\[]*\\])(?![^\\(]*\\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\\r|\\n)*?)/.source+n.match[u].source.replace(/\\\\(\\d+)/g,function(g,\nh){return\"\\\\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)===\"[object Array]\")Array.prototype.push.apply(h,g);else if(typeof g.length===\"number\")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||\n!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if(\"sourceIndex\"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=\nh.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement(\"div\"),h=\"script\"+(new Date).getTime();g.innerHTML=\"<a name='\"+h+\"'/>\";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!==\"undefined\"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!==\"undefined\"&&\nq.getAttributeNode(\"id\").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!==\"undefined\"&&m.getAttributeNode(\"id\");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement(\"div\");g.appendChild(s.createComment(\"\"));if(g.getElementsByTagName(\"*\").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]===\"*\"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=\"<a href='#'></a>\";\nif(g.firstChild&&typeof g.firstChild.getAttribute!==\"undefined\"&&g.firstChild.getAttribute(\"href\")!==\"#\")n.attrHandle.href=function(h){return h.getAttribute(\"href\",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement(\"div\");h.innerHTML=\"<p class='TEST'></p>\";if(!(h.querySelectorAll&&h.querySelectorAll(\".TEST\").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();\n(function(){var g=s.createElement(\"div\");g.innerHTML=\"<div class='test e'></div><div class='test'></div>\";if(!(!g.getElementsByClassName||g.getElementsByClassName(\"e\").length===0)){g.lastChild.className=\"e\";if(g.getElementsByClassName(\"e\").length!==1){n.order.splice(1,0,\"CLASS\");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!==\"undefined\"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:\nfunction(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!==\"HTML\":false},ga=function(g,h){var l=[],m=\"\",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,\"\")}g=n.relative[g]?g+\"*\":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[\":\"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,\ngb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b===\"string\"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack(\"\",\"find\",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;\nc.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),\"not\",a)},filter:function(a){return this.pushStack(Ia(this,a,true),\"filter\",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=\n{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===\n\"string\")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a===\"string\"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,\"parentNode\")},parentsUntil:function(a,b,d){return c.dir(a,\"parentNode\",\nd)},next:function(a){return c.nth(a,2,\"nextSibling\")},prev:function(a){return c.nth(a,2,\"previousSibling\")},nextAll:function(a){return c.dir(a,\"nextSibling\")},prevAll:function(a){return c.dir(a,\"previousSibling\")},nextUntil:function(a,b,d){return c.dir(a,\"nextSibling\",d)},prevUntil:function(a,b,d){return c.dir(a,\"previousSibling\",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,\"iframe\")?\na.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f===\"string\")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(\",\"))}});c.extend({filter:function(a,b,d){if(d)a=\":not(\"+a+\")\";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===\n1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\\d+=\"(?:\\d+|null)\"/g,V=/^\\s+/,Ka=/(<([\\w:]+)[^>]*?)\\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\\w:]+)/,ib=/<tbody/i,jb=/<|&#?\\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?\na:b+\"></\"+d+\">\"},F={option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,\"div<div>\",\"</div>\"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=\nc(this);d.text(a.call(this,b,d.text()))});if(typeof a!==\"object\"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},\nwrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,\"body\")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},\nprepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,\"before\",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,\nthis.nextSibling)});else if(arguments.length){var a=this.pushStack(this,\"after\",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName(\"*\"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName(\"*\"));b.firstChild;)b.removeChild(b.firstChild);\nreturn this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement(\"div\");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,\"\").replace(/=([^=\"'>\\s]+\\/)>/g,'=\"$1\">').replace(V,\"\")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find(\"*\"),b.find(\"*\"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,\n\"\"):null;else if(typeof a===\"string\"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||[\"\",\"\"])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName(\"*\"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&\nthis[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!==\"string\")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),\"replaceWith\",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,\"table\")?u.getElementsByTagName(\"tbody\")[0]||\nu.appendChild(u.ownerDocument.createElement(\"tbody\")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i===\"string\"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===\n1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,\"tr\");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);\nreturn this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement===\"undefined\")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i===\"number\")i+=\"\";if(i){if(typeof i===\"string\"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i===\"string\"){i=i.replace(Ka,Ma);var o=(La.exec(i)||[\"\",\n\"\"])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement(\"div\");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o===\"table\"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===\"<table>\"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],\"tbody\")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=\nc.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],\"script\")&&(!e[j].type||e[j].type.toLowerCase()===\"text/javascript\"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName(\"script\"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?\nc.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\\([^)]*\\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\\d+(?:px)?$/i,nb=/^-?\\d/,ob={position:\"absolute\",visibility:\"hidden\",display:\"block\"},pb=[\"Left\",\"Right\"],qb=[\"Top\",\"Bottom\"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?\"cssFloat\":\"styleFloat\",ja=\nfunction(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e===\"number\"&&!kb.test(f))e+=\"px\";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b===\"width\"||b===\"height\")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b===\"opacity\"){if(e){f.zoom=1;b=parseInt(d,10)+\"\"===\"NaN\"?\"\":\"alpha(opacity=\"+d*100+\")\";a=f.filter||c.curCSS(a,\"filter\")||\"\";f.filter=\nNa.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf(\"opacity=\")>=0?parseFloat(Oa.exec(f.filter)[1])/100+\"\":\"\"}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b===\"width\"||b===\"height\"){var e,j=b===\"width\"?pb:qb;function i(){e=b===\"width\"?a.offsetWidth:a.offsetHeight;f!==\"border\"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,\"padding\"+this,true))||0);if(f===\"margin\")e+=parseFloat(c.curCSS(a,\"margin\"+this,true))||0;else e-=parseFloat(c.curCSS(a,\n\"border\"+this+\"Width\",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b===\"opacity\"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||\"\")?parseFloat(RegExp.$1)/100+\"\":\"\";return f===\"\"?\"1\":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b=\"float\";b=b.replace(lb,\"-$1\").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=\na.getPropertyValue(b);if(b===\"opacity\"&&f===\"\")f=\"1\"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d===\"fontSize\"?\"1em\":f||0;f=e.pixelLeft+\"px\";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=\na.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()===\"tr\";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,\"display\")===\"none\"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\\s)*?\\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\\?(&|$)/,ka=/\\?/,wb=/(\\?|&)_=.*?(&|$)/,xb=/^(\\w+:)?\\/\\/([^\\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==\n\"string\")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(\" \");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f=\"GET\";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===\"object\"){b=c.param(b,c.ajaxSettings.traditional);f=\"POST\"}var j=this;c.ajax({url:a,type:f,dataType:\"html\",data:b,complete:function(i,o){if(o===\"success\"||o===\"notmodified\")j.html(e?c(\"<div />\").append(i.responseText.replace(tb,\"\")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},\nserialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),\nfunction(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:\"GET\",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,\"script\")},getJSON:function(a,b,d){return c.get(a,b,d,\"json\")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:\"POST\",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,\nglobal:true,type:\"GET\",contentType:\"application/x-www-form-urlencoded\",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!==\"file:\"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(a){}},accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",script:\"text/javascript, application/javascript\",json:\"application/json, text/javascript\",text:\"text/plain\",_default:\"*/*\"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&\ne.success.call(k,o,i,x);e.global&&f(\"ajaxSuccess\",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f(\"ajaxComplete\",[x,e]);e.global&&!--c.active&&c.event.trigger(\"ajaxStop\")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!==\"string\")e.data=c.param(e.data,e.traditional);if(e.dataType===\"jsonp\"){if(n===\"GET\")N.test(e.url)||(e.url+=(ka.test(e.url)?\n\"&\":\"?\")+(e.jsonp||\"callback\")+\"=?\");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+\"&\":\"\")+(e.jsonp||\"callback\")+\"=?\";e.dataType=\"json\"}if(e.dataType===\"json\"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||\"jsonp\"+sb++;if(e.data)e.data=(e.data+\"\").replace(N,\"=\"+j+\"$1\");e.url=e.url.replace(N,\"=\"+j+\"$1\");e.dataType=\"script\";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType===\"script\"&&e.cache===null)e.cache=false;if(e.cache===\nfalse&&n===\"GET\"){var r=J(),u=e.url.replace(wb,\"$1_=\"+r+\"$2\");e.url=u+(u===e.url?(ka.test(e.url)?\"&\":\"?\")+\"_=\"+r:\"\")}if(e.data&&n===\"GET\")e.url+=(ka.test(e.url)?\"&\":\"?\")+e.data;e.global&&!c.active++&&c.event.trigger(\"ajaxStart\");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType===\"script\"&&n===\"GET\"&&r){var z=s.getElementsByTagName(\"head\")[0]||s.documentElement,C=s.createElement(\"script\");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=\nfalse;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState===\"loaded\"||this.readyState===\"complete\")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader(\"Content-Type\",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader(\"If-Modified-Since\",\nc.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader(\"If-None-Match\",c.etag[e.url])}r||x.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");x.setRequestHeader(\"Accept\",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+\", */*\":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger(\"ajaxStop\");x.abort();return false}e.global&&f(\"ajaxSend\",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q===\"abort\"){E||\nd();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q===\"timeout\")){E=true;x.onreadystatechange=c.noop;i=q===\"timeout\"?\"timeout\":!c.httpSuccess(x)?\"error\":e.ifModified&&c.httpNotModified(x,e.url)?\"notmodified\":\"success\";var p;if(i===\"success\")try{o=c.httpData(x,e.dataType,e)}catch(v){i=\"parsererror\";p=v}if(i===\"success\"||i===\"notmodified\")j||b();else c.handleError(e,x,i,p);d();q===\"timeout\"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);\ng(\"abort\")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g(\"timeout\")},e.timeout);try{x.send(n===\"POST\"||n===\"PUT\"||n===\"DELETE\"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger(\"ajaxError\",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===\"file:\"||a.status>=200&&a.status<300||a.status===304||a.status===\n1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader(\"Last-Modified\"),f=a.getResponseHeader(\"Etag\");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader(\"content-type\")||\"\",e=b===\"xml\"||!b&&f.indexOf(\"xml\")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName===\"parsererror\"&&c.error(\"parsererror\");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a===\"string\")if(b===\n\"json\"||!b&&f.indexOf(\"json\")>=0)a=c.parseJSON(a);else if(b===\"script\"||!b&&f.indexOf(\"javascript\")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\\[\\]$/.test(i)?f(i,n):d(i+\"[\"+(typeof n===\"object\"||c.isArray(n)?k:\"\")+\"]\",n)});else!b&&o!=null&&typeof o===\"object\"?c.each(o,function(k,n){d(i+\"[\"+k+\"]\",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+\"=\"+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;\nif(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join(\"&\").replace(yb,\"+\")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\\d+-.]+)(.*)$/,W,va=[[\"height\",\"marginTop\",\"marginBottom\",\"paddingTop\",\"paddingBottom\"],[\"width\",\"marginLeft\",\"marginRight\",\"paddingLeft\",\"paddingRight\"],[\"opacity\"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K(\"show\",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],\"olddisplay\");\nthis[a].style.display=d||\"\";if(c.css(this[a],\"display\")===\"none\"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c(\"<\"+d+\" />\").appendTo(\"body\");f=e.css(\"display\");if(f===\"none\")f=\"block\";e.remove();la[d]=f}c.data(this[a],\"olddisplay\",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],\"olddisplay\")||\"\";return this}},hide:function(a,b){if(a||a===0)return this.animate(K(\"hide\",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],\"olddisplay\");!d&&d!==\"none\"&&c.data(this[a],\n\"olddisplay\",c.css(this[a],\"display\"))}a=0;for(b=this.length;a<b;a++)this[a].style.display=\"none\";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a===\"boolean\";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(\":hidden\");c(this)[f?\"show\":\"hide\"]()}):this.animate(K(\"toggle\",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(\":hidden\").css(\"opacity\",0).show().end().animate({opacity:b},a,d)},\nanimate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?\"each\":\"queue\"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(\":hidden\"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]===\"hide\"&&o||a[i]===\"show\"&&!o)return j.complete.call(this);if((i===\"height\"||i===\"width\")&&this.style){j.display=c.css(this,\"display\");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=\nj.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow=\"hidden\";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u===\"toggle\"?o?\"show\":\"hide\":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||\"px\";if(E!==\"px\"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]===\"-=\"?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,\"\")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);\nthis.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K(\"show\",1),slideUp:K(\"hide\",1),slideToggle:K(\"toggle\",1),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a===\"object\"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===\n\"number\"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||\nc.fx.step._default)(this);if((this.prop===\"height\"||this.prop===\"width\")&&this.elem.style)this.elem.style.display=\"block\"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||\"px\";this.now=this.start;\nthis.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===\"width\"||this.prop===\"height\"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=\nthis.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,\"olddisplay\");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,\"display\")===\"none\")this.elem.style.display=\"block\"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,\ne,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?\"swing\":\"linear\");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||\nc.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,\"opacity\",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop===\"width\"||a.prop===\"height\"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset=\"getBoundingClientRect\"in s.documentElement?\nfunction(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=\nthis[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position===\"fixed\")break;j=e?e.getComputedStyle(b,null):b.currentStyle;\nk-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!==\"visible\"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position===\"relative\"||f.position===\"static\"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&\nf.position===\"fixed\"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement(\"div\"),d,f,e,j=parseFloat(c.curCSS(a,\"marginTop\",true))||0;c.extend(b.style,{position:\"absolute\",top:0,left:0,margin:0,border:0,width:\"1px\",height:\"1px\",visibility:\"hidden\"});b.innerHTML=\"<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>\";\na.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position=\"fixed\";f.style.top=\"20px\";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top=\"\";d.style.overflow=\"hidden\";d.style.position=\"relative\";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);\nc.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,\"marginTop\",true))||0;d+=parseFloat(c.curCSS(a,\"marginLeft\",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,\"position\")))a.style.position=\"relative\";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,\"top\",true),10)||0,i=parseInt(c.curCSS(a,\"left\",true),10)||0;if(c.isFunction(b))b=b.call(a,\nd,e);d={top:b.top-e.top+j,left:b.left-e.left+i};\"using\"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,\"marginTop\",true))||0;d.left-=parseFloat(c.curCSS(a,\"marginLeft\",true))||0;f.top+=parseFloat(c.curCSS(b[0],\"borderTopWidth\",true))||0;f.left+=parseFloat(c.curCSS(b[0],\"borderLeftWidth\",true))||0;return{top:d.top-\nf.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,\"position\")===\"static\";)a=a.offsetParent;return a})}});c.each([\"Left\",\"Top\"],function(a,b){var d=\"scroll\"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?\"pageXOffset\"in j?j[a?\"pageYOffset\":\n\"pageXOffset\"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each([\"Height\",\"Width\"],function(a,b){var d=b.toLowerCase();c.fn[\"inner\"+b]=function(){return this[0]?c.css(this[0],d,false,\"padding\"):null};c.fn[\"outer\"+b]=function(f){return this[0]?c.css(this[0],d,false,f?\"margin\":\"border\"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return\"scrollTo\"in\ne&&e.document?e.document.compatMode===\"CSS1Compat\"&&e.document.documentElement[\"client\"+b]||e.document.body[\"client\"+b]:e.nodeType===9?Math.max(e.documentElement[\"client\"+b],e.body[\"scroll\"+b],e.documentElement[\"scroll\"+b],e.body[\"offset\"+b],e.documentElement[\"offset\"+b]):f===w?c.css(e,d):this.css(d,typeof f===\"string\"?f:f+\"px\")}});A.jQuery=A.$=c})(window);\n"
  },
  {
    "path": "docs/_build/html/_static/pygments.css",
    "content": ".highlight .hll { background-color: #ffffcc }\n.highlight  { background: #eeffcc; }\n.highlight .c { color: #408090; font-style: italic } /* Comment */\n.highlight .err { border: 1px solid #FF0000 } /* Error */\n.highlight .k { color: #007020; font-weight: bold } /* Keyword */\n.highlight .o { color: #666666 } /* Operator */\n.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */\n.highlight .cp { color: #007020 } /* Comment.Preproc */\n.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */\n.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */\n.highlight .gd { color: #A00000 } /* Generic.Deleted */\n.highlight .ge { font-style: italic } /* Generic.Emph */\n.highlight .gr { color: #FF0000 } /* Generic.Error */\n.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n.highlight .gi { color: #00A000 } /* Generic.Inserted */\n.highlight .go { color: #333333 } /* Generic.Output */\n.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */\n.highlight .gs { font-weight: bold } /* Generic.Strong */\n.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n.highlight .gt { color: #0044DD } /* Generic.Traceback */\n.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */\n.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */\n.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */\n.highlight .kp { color: #007020 } /* Keyword.Pseudo */\n.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */\n.highlight .kt { color: #902000 } /* Keyword.Type */\n.highlight .m { color: #208050 } /* Literal.Number */\n.highlight .s { color: #4070a0 } /* Literal.String */\n.highlight .na { color: #4070a0 } /* Name.Attribute */\n.highlight .nb { color: #007020 } /* Name.Builtin */\n.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */\n.highlight .no { color: #60add5 } /* Name.Constant */\n.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */\n.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */\n.highlight .ne { color: #007020 } /* Name.Exception */\n.highlight .nf { color: #06287e } /* Name.Function */\n.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */\n.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */\n.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */\n.highlight .nv { color: #bb60d5 } /* Name.Variable */\n.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */\n.highlight .w { color: #bbbbbb } /* Text.Whitespace */\n.highlight .mf { color: #208050 } /* Literal.Number.Float */\n.highlight .mh { color: #208050 } /* Literal.Number.Hex */\n.highlight .mi { color: #208050 } /* Literal.Number.Integer */\n.highlight .mo { color: #208050 } /* Literal.Number.Oct */\n.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */\n.highlight .sc { color: #4070a0 } /* Literal.String.Char */\n.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */\n.highlight .s2 { color: #4070a0 } /* Literal.String.Double */\n.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */\n.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */\n.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */\n.highlight .sx { color: #c65d09 } /* Literal.String.Other */\n.highlight .sr { color: #235388 } /* Literal.String.Regex */\n.highlight .s1 { color: #4070a0 } /* Literal.String.Single */\n.highlight .ss { color: #517918 } /* Literal.String.Symbol */\n.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */\n.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */\n.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */\n.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */\n.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */"
  },
  {
    "path": "docs/_build/html/_static/searchtools.js",
    "content": "/*\n * searchtools.js_t\n * ~~~~~~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for the full-text search.\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/**\n * helper function to return a node containing the\n * search summary for a given text. keywords is a list\n * of stemmed words, hlwords is the list of normal, unstemmed\n * words. the first one is used to find the occurance, the\n * latter for highlighting it.\n */\n\njQuery.makeSearchSummary = function(text, keywords, hlwords) {\n  var textLower = text.toLowerCase();\n  var start = 0;\n  $.each(keywords, function() {\n    var i = textLower.indexOf(this.toLowerCase());\n    if (i > -1)\n      start = i;\n  });\n  start = Math.max(start - 120, 0);\n  var excerpt = ((start > 0) ? '...' : '') +\n  $.trim(text.substr(start, 240)) +\n  ((start + 240 - text.length) ? '...' : '');\n  var rv = $('<div class=\"context\"></div>').text(excerpt);\n  $.each(hlwords, function() {\n    rv = rv.highlightText(this, 'highlighted');\n  });\n  return rv;\n}\n\n\n/**\n * Porter Stemmer\n */\nvar Stemmer = function() {\n\n  var step2list = {\n    ational: 'ate',\n    tional: 'tion',\n    enci: 'ence',\n    anci: 'ance',\n    izer: 'ize',\n    bli: 'ble',\n    alli: 'al',\n    entli: 'ent',\n    eli: 'e',\n    ousli: 'ous',\n    ization: 'ize',\n    ation: 'ate',\n    ator: 'ate',\n    alism: 'al',\n    iveness: 'ive',\n    fulness: 'ful',\n    ousness: 'ous',\n    aliti: 'al',\n    iviti: 'ive',\n    biliti: 'ble',\n    logi: 'log'\n  };\n\n  var step3list = {\n    icate: 'ic',\n    ative: '',\n    alize: 'al',\n    iciti: 'ic',\n    ical: 'ic',\n    ful: '',\n    ness: ''\n  };\n\n  var c = \"[^aeiou]\";          // consonant\n  var v = \"[aeiouy]\";          // vowel\n  var C = c + \"[^aeiouy]*\";    // consonant sequence\n  var V = v + \"[aeiou]*\";      // vowel sequence\n\n  var mgr0 = \"^(\" + C + \")?\" + V + C;                      // [C]VC... is m>0\n  var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\";    // [C]VC[V] is m=1\n  var mgr1 = \"^(\" + C + \")?\" + V + C + V + C;              // [C]VCVC... is m>1\n  var s_v   = \"^(\" + C + \")?\" + v;                         // vowel in stem\n\n  this.stemWord = function (w) {\n    var stem;\n    var suffix;\n    var firstch;\n    var origword = w;\n\n    if (w.length < 3)\n      return w;\n\n    var re;\n    var re2;\n    var re3;\n    var re4;\n\n    firstch = w.substr(0,1);\n    if (firstch == \"y\")\n      w = firstch.toUpperCase() + w.substr(1);\n\n    // Step 1a\n    re = /^(.+?)(ss|i)es$/;\n    re2 = /^(.+?)([^s])s$/;\n\n    if (re.test(w))\n      w = w.replace(re,\"$1$2\");\n    else if (re2.test(w))\n      w = w.replace(re2,\"$1$2\");\n\n    // Step 1b\n    re = /^(.+?)eed$/;\n    re2 = /^(.+?)(ed|ing)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      re = new RegExp(mgr0);\n      if (re.test(fp[1])) {\n        re = /.$/;\n        w = w.replace(re,\"\");\n      }\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1];\n      re2 = new RegExp(s_v);\n      if (re2.test(stem)) {\n        w = stem;\n        re2 = /(at|bl|iz)$/;\n        re3 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n        re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n        if (re2.test(w))\n          w = w + \"e\";\n        else if (re3.test(w)) {\n          re = /.$/;\n          w = w.replace(re,\"\");\n        }\n        else if (re4.test(w))\n          w = w + \"e\";\n      }\n    }\n\n    // Step 1c\n    re = /^(.+?)y$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(s_v);\n      if (re.test(stem))\n        w = stem + \"i\";\n    }\n\n    // Step 2\n    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step2list[suffix];\n    }\n\n    // Step 3\n    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step3list[suffix];\n    }\n\n    // Step 4\n    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n    re2 = /^(.+?)(s|t)(ion)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      if (re.test(stem))\n        w = stem;\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1] + fp[2];\n      re2 = new RegExp(mgr1);\n      if (re2.test(stem))\n        w = stem;\n    }\n\n    // Step 5\n    re = /^(.+?)e$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      re2 = new RegExp(meq1);\n      re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n        w = stem;\n    }\n    re = /ll$/;\n    re2 = new RegExp(mgr1);\n    if (re.test(w) && re2.test(w)) {\n      re = /.$/;\n      w = w.replace(re,\"\");\n    }\n\n    // and turn initial Y back to y\n    if (firstch == \"y\")\n      w = firstch.toLowerCase() + w.substr(1);\n    return w;\n  }\n}\n\n\n/**\n * Search Module\n */\nvar Search = {\n\n  _index : null,\n  _queued_query : null,\n  _pulse_status : -1,\n\n  init : function() {\n      var params = $.getQueryParameters();\n      if (params.q) {\n          var query = params.q[0];\n          $('input[name=\"q\"]')[0].value = query;\n          this.performSearch(query);\n      }\n  },\n\n  loadIndex : function(url) {\n    $.ajax({type: \"GET\", url: url, data: null, success: null,\n            dataType: \"script\", cache: true});\n  },\n\n  setIndex : function(index) {\n    var q;\n    this._index = index;\n    if ((q = this._queued_query) !== null) {\n      this._queued_query = null;\n      Search.query(q);\n    }\n  },\n\n  hasIndex : function() {\n      return this._index !== null;\n  },\n\n  deferQuery : function(query) {\n      this._queued_query = query;\n  },\n\n  stopPulse : function() {\n      this._pulse_status = 0;\n  },\n\n  startPulse : function() {\n    if (this._pulse_status >= 0)\n        return;\n    function pulse() {\n      Search._pulse_status = (Search._pulse_status + 1) % 4;\n      var dotString = '';\n      for (var i = 0; i < Search._pulse_status; i++)\n        dotString += '.';\n      Search.dots.text(dotString);\n      if (Search._pulse_status > -1)\n        window.setTimeout(pulse, 500);\n    };\n    pulse();\n  },\n\n  /**\n   * perform a search for something\n   */\n  performSearch : function(query) {\n    // create the required interface elements\n    this.out = $('#search-results');\n    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);\n    this.dots = $('<span></span>').appendTo(this.title);\n    this.status = $('<p style=\"display: none\"></p>').appendTo(this.out);\n    this.output = $('<ul class=\"search\"/>').appendTo(this.out);\n\n    $('#search-progress').text(_('Preparing search...'));\n    this.startPulse();\n\n    // index already loaded, the browser was quick!\n    if (this.hasIndex())\n      this.query(query);\n    else\n      this.deferQuery(query);\n  },\n\n  query : function(query) {\n    var stopwords = [\"and\",\"then\",\"into\",\"it\",\"as\",\"are\",\"in\",\"if\",\"for\",\"no\",\"there\",\"their\",\"was\",\"is\",\"be\",\"to\",\"that\",\"but\",\"they\",\"not\",\"such\",\"with\",\"by\",\"a\",\"on\",\"these\",\"of\",\"will\",\"this\",\"near\",\"the\",\"or\",\"at\"];\n\n    // Stem the searchterms and add them to the correct list\n    var stemmer = new Stemmer();\n    var searchterms = [];\n    var excluded = [];\n    var hlterms = [];\n    var tmp = query.split(/\\s+/);\n    var objectterms = [];\n    for (var i = 0; i < tmp.length; i++) {\n      if (tmp[i] != \"\") {\n          objectterms.push(tmp[i].toLowerCase());\n      }\n\n      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\\d+$/) ||\n          tmp[i] == \"\") {\n        // skip this \"word\"\n        continue;\n      }\n      // stem the word\n      var word = stemmer.stemWord(tmp[i]).toLowerCase();\n      // select the correct list\n      if (word[0] == '-') {\n        var toAppend = excluded;\n        word = word.substr(1);\n      }\n      else {\n        var toAppend = searchterms;\n        hlterms.push(tmp[i].toLowerCase());\n      }\n      // only add if not already in the list\n      if (!$.contains(toAppend, word))\n        toAppend.push(word);\n    };\n    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(\" \"));\n\n    // console.debug('SEARCH: searching for:');\n    // console.info('required: ', searchterms);\n    // console.info('excluded: ', excluded);\n\n    // prepare search\n    var filenames = this._index.filenames;\n    var titles = this._index.titles;\n    var terms = this._index.terms;\n    var fileMap = {};\n    var files = null;\n    // different result priorities\n    var importantResults = [];\n    var objectResults = [];\n    var regularResults = [];\n    var unimportantResults = [];\n    $('#search-progress').empty();\n\n    // lookup as object\n    for (var i = 0; i < objectterms.length; i++) {\n      var others = [].concat(objectterms.slice(0,i),\n                             objectterms.slice(i+1, objectterms.length))\n      var results = this.performObjectSearch(objectterms[i], others);\n      // Assume first word is most likely to be the object,\n      // other words more likely to be in description.\n      // Therefore put matches for earlier words first.\n      // (Results are eventually used in reverse order).\n      objectResults = results[0].concat(objectResults);\n      importantResults = results[1].concat(importantResults);\n      unimportantResults = results[2].concat(unimportantResults);\n    }\n\n    // perform the search on the required terms\n    for (var i = 0; i < searchterms.length; i++) {\n      var word = searchterms[i];\n      // no match but word was a required one\n      if ((files = terms[word]) == null)\n        break;\n      if (files.length == undefined) {\n        files = [files];\n      }\n      // create the mapping\n      for (var j = 0; j < files.length; j++) {\n        var file = files[j];\n        if (file in fileMap)\n          fileMap[file].push(word);\n        else\n          fileMap[file] = [word];\n      }\n    }\n\n    // now check if the files don't contain excluded terms\n    for (var file in fileMap) {\n      var valid = true;\n\n      // check if all requirements are matched\n      if (fileMap[file].length != searchterms.length)\n        continue;\n\n      // ensure that none of the excluded terms is in the\n      // search result.\n      for (var i = 0; i < excluded.length; i++) {\n        if (terms[excluded[i]] == file ||\n            $.contains(terms[excluded[i]] || [], file)) {\n          valid = false;\n          break;\n        }\n      }\n\n      // if we have still a valid result we can add it\n      // to the result list\n      if (valid)\n        regularResults.push([filenames[file], titles[file], '', null]);\n    }\n\n    // delete unused variables in order to not waste\n    // memory until list is retrieved completely\n    delete filenames, titles, terms;\n\n    // now sort the regular results descending by title\n    regularResults.sort(function(a, b) {\n      var left = a[1].toLowerCase();\n      var right = b[1].toLowerCase();\n      return (left > right) ? -1 : ((left < right) ? 1 : 0);\n    });\n\n    // combine all results\n    var results = unimportantResults.concat(regularResults)\n      .concat(objectResults).concat(importantResults);\n\n    // print the results\n    var resultCount = results.length;\n    function displayNextItem() {\n      // results left, load the summary and display it\n      if (results.length) {\n        var item = results.pop();\n        var listItem = $('<li style=\"display:none\"></li>');\n        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {\n          // dirhtml builder\n          var dirname = item[0] + '/';\n          if (dirname.match(/\\/index\\/$/)) {\n            dirname = dirname.substring(0, dirname.length-6);\n          } else if (dirname == 'index/') {\n            dirname = '';\n          }\n          listItem.append($('<a/>').attr('href',\n            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +\n            highlightstring + item[2]).html(item[1]));\n        } else {\n          // normal html builders\n          listItem.append($('<a/>').attr('href',\n            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +\n            highlightstring + item[2]).html(item[1]));\n        }\n        if (item[3]) {\n          listItem.append($('<span> (' + item[3] + ')</span>'));\n          Search.output.append(listItem);\n          listItem.slideDown(5, function() {\n            displayNextItem();\n          });\n        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {\n          $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +\n                item[0] + '.txt', function(data) {\n            if (data != '') {\n              listItem.append($.makeSearchSummary(data, searchterms, hlterms));\n              Search.output.append(listItem);\n            }\n            listItem.slideDown(5, function() {\n              displayNextItem();\n            });\n          }, \"text\");\n        } else {\n          // no source available, just display title\n          Search.output.append(listItem);\n          listItem.slideDown(5, function() {\n            displayNextItem();\n          });\n        }\n      }\n      // search finished, update title and status message\n      else {\n        Search.stopPulse();\n        Search.title.text(_('Search Results'));\n        if (!resultCount)\n          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\\'ve selected enough categories.'));\n        else\n            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));\n        Search.status.fadeIn(500);\n      }\n    }\n    displayNextItem();\n  },\n\n  performObjectSearch : function(object, otherterms) {\n    var filenames = this._index.filenames;\n    var objects = this._index.objects;\n    var objnames = this._index.objnames;\n    var titles = this._index.titles;\n\n    var importantResults = [];\n    var objectResults = [];\n    var unimportantResults = [];\n\n    for (var prefix in objects) {\n      for (var name in objects[prefix]) {\n        var fullname = (prefix ? prefix + '.' : '') + name;\n        if (fullname.toLowerCase().indexOf(object) > -1) {\n          var match = objects[prefix][name];\n          var objname = objnames[match[1]][2];\n          var title = titles[match[0]];\n          // If more than one term searched for, we require other words to be\n          // found in the name/title/description\n          if (otherterms.length > 0) {\n            var haystack = (prefix + ' ' + name + ' ' +\n                            objname + ' ' + title).toLowerCase();\n            var allfound = true;\n            for (var i = 0; i < otherterms.length; i++) {\n              if (haystack.indexOf(otherterms[i]) == -1) {\n                allfound = false;\n                break;\n              }\n            }\n            if (!allfound) {\n              continue;\n            }\n          }\n          var descr = objname + _(', in ') + title;\n          anchor = match[3];\n          if (anchor == '')\n            anchor = fullname;\n          else if (anchor == '-')\n            anchor = objnames[match[1]][1] + '-' + fullname;\n          result = [filenames[match[0]], fullname, '#'+anchor, descr];\n          switch (match[2]) {\n          case 1: objectResults.push(result); break;\n          case 0: importantResults.push(result); break;\n          case 2: unimportantResults.push(result); break;\n          }\n        }\n      }\n    }\n\n    // sort results descending\n    objectResults.sort(function(a, b) {\n      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);\n    });\n\n    importantResults.sort(function(a, b) {\n      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);\n    });\n\n    unimportantResults.sort(function(a, b) {\n      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);\n    });\n\n    return [importantResults, objectResults, unimportantResults]\n  }\n}\n\n$(document).ready(function() {\n  Search.init();\n});\n"
  },
  {
    "path": "docs/_build/html/_static/sidebar.js",
    "content": "/*\n * sidebar.js\n * ~~~~~~~~~~\n *\n * This script makes the Sphinx sidebar collapsible.\n *\n * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds\n * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton\n * used to collapse and expand the sidebar.\n *\n * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden\n * and the width of the sidebar and the margin-left of the document\n * are decreased. When the sidebar is expanded the opposite happens.\n * This script saves a per-browser/per-session cookie used to\n * remember the position of the sidebar among the pages.\n * Once the browser is closed the cookie is deleted and the position\n * reset to the default (expanded).\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n$(function() {\n  // global elements used by the functions.\n  // the 'sidebarbutton' element is defined as global after its\n  // creation, in the add_sidebar_button function\n  var bodywrapper = $('.bodywrapper');\n  var sidebar = $('.sphinxsidebar');\n  var sidebarwrapper = $('.sphinxsidebarwrapper');\n\n  // for some reason, the document has no sidebar; do not run into errors\n  if (!sidebar.length) return;\n\n  // original margin-left of the bodywrapper and width of the sidebar\n  // with the sidebar expanded\n  var bw_margin_expanded = bodywrapper.css('margin-left');\n  var ssb_width_expanded = sidebar.width();\n\n  // margin-left of the bodywrapper and width of the sidebar\n  // with the sidebar collapsed\n  var bw_margin_collapsed = '.8em';\n  var ssb_width_collapsed = '.8em';\n\n  // colors used by the current theme\n  var dark_color = $('.related').css('background-color');\n  var light_color = $('.document').css('background-color');\n\n  function sidebar_is_collapsed() {\n    return sidebarwrapper.is(':not(:visible)');\n  }\n\n  function toggle_sidebar() {\n    if (sidebar_is_collapsed())\n      expand_sidebar();\n    else\n      collapse_sidebar();\n  }\n\n  function collapse_sidebar() {\n    sidebarwrapper.hide();\n    sidebar.css('width', ssb_width_collapsed);\n    bodywrapper.css('margin-left', bw_margin_collapsed);\n    sidebarbutton.css({\n        'margin-left': '0',\n        'height': bodywrapper.height()\n    });\n    sidebarbutton.find('span').text('»');\n    sidebarbutton.attr('title', _('Expand sidebar'));\n    document.cookie = 'sidebar=collapsed';\n  }\n\n  function expand_sidebar() {\n    bodywrapper.css('margin-left', bw_margin_expanded);\n    sidebar.css('width', ssb_width_expanded);\n    sidebarwrapper.show();\n    sidebarbutton.css({\n        'margin-left': ssb_width_expanded-12,\n        'height': bodywrapper.height()\n    });\n    sidebarbutton.find('span').text('«');\n    sidebarbutton.attr('title', _('Collapse sidebar'));\n    document.cookie = 'sidebar=expanded';\n  }\n\n  function add_sidebar_button() {\n    sidebarwrapper.css({\n        'float': 'left',\n        'margin-right': '0',\n        'width': ssb_width_expanded - 28\n    });\n    // create the button\n    sidebar.append(\n        '<div id=\"sidebarbutton\"><span>&laquo;</span></div>'\n    );\n    var sidebarbutton = $('#sidebarbutton');\n    light_color = sidebarbutton.css('background-color');\n    // find the height of the viewport to center the '<<' in the page\n    var viewport_height;\n    if (window.innerHeight)\n \t  viewport_height = window.innerHeight;\n    else\n\t  viewport_height = $(window).height();\n    sidebarbutton.find('span').css({\n        'display': 'block',\n        'margin-top': (viewport_height - sidebar.position().top - 20) / 2\n    });\n\n    sidebarbutton.click(toggle_sidebar);\n    sidebarbutton.attr('title', _('Collapse sidebar'));\n    sidebarbutton.css({\n        'color': '#FFFFFF',\n        'border-left': '1px solid ' + dark_color,\n        'font-size': '1.2em',\n        'cursor': 'pointer',\n        'height': bodywrapper.height(),\n        'padding-top': '1px',\n        'margin-left': ssb_width_expanded - 12\n    });\n\n    sidebarbutton.hover(\n      function () {\n          $(this).css('background-color', dark_color);\n      },\n      function () {\n          $(this).css('background-color', light_color);\n      }\n    );\n  }\n\n  function set_position_from_cookie() {\n    if (!document.cookie)\n      return;\n    var items = document.cookie.split(';');\n    for(var k=0; k<items.length; k++) {\n      var key_val = items[k].split('=');\n      var key = key_val[0];\n      if (key == 'sidebar') {\n        var value = key_val[1];\n        if ((value == 'collapsed') && (!sidebar_is_collapsed()))\n          collapse_sidebar();\n        else if ((value == 'expanded') && (sidebar_is_collapsed()))\n          expand_sidebar();\n      }\n    }\n  }\n\n  add_sidebar_button();\n  var sidebarbutton = $('#sidebarbutton');\n  set_position_from_cookie();\n});\n"
  },
  {
    "path": "docs/_build/html/_static/underscore.js",
    "content": "// Underscore.js 0.5.5\n// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.\n// Underscore is freely distributable under the terms of the MIT license.\n// Portions of Underscore are inspired by or borrowed from Prototype.js,\n// Oliver Steele's Functional, and John Resig's Micro-Templating.\n// For all details and documentation:\n// http://documentcloud.github.com/underscore/\n(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!==\"undefined\"?StopIteration:\"__break__\",b=j._=function(a){return new i(a)};if(typeof exports!==\"undefined\")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION=\"0.5.5\";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,\na[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);\nvar f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,\nd);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=\nfunction(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,\nfunction(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),\"value\")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,\n0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,\ne)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,\"length\")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=\na.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});\nreturn a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);\nvar c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;\nif(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!==\"object\")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==\n0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,\"length\")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===\"\"||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)===\"[object Number]\"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&\na.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a==\"undefined\"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function(\"obj\",\"var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('\"+a.replace(/[\\r\\t\\n]/g,\n\" \").replace(/'(?=[^%]*%>)/g,\"\\t\").split(\"'\").join(\"\\\\'\").split(\"\\t\").join(\"'\").replace(/<%=(.+?)%>/g,\"',$1,'\").split(\"<%\").join(\"');\").split(\"%>\").join(\"p.push('\")+\"');}return p.join('');\");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);\no.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each([\"concat\",\"join\",\"slice\"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();\n"
  },
  {
    "path": "docs/_build/html/_static/websupport.js",
    "content": "/*\n * websupport.js\n * ~~~~~~~~~~~~~\n *\n * sphinx.websupport utilities for all documentation.\n *\n * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n(function($) {\n  $.fn.autogrow = function() {\n    return this.each(function() {\n    var textarea = this;\n\n    $.fn.autogrow.resize(textarea);\n\n    $(textarea)\n      .focus(function() {\n        textarea.interval = setInterval(function() {\n          $.fn.autogrow.resize(textarea);\n        }, 500);\n      })\n      .blur(function() {\n        clearInterval(textarea.interval);\n      });\n    });\n  };\n\n  $.fn.autogrow.resize = function(textarea) {\n    var lineHeight = parseInt($(textarea).css('line-height'), 10);\n    var lines = textarea.value.split('\\n');\n    var columns = textarea.cols;\n    var lineCount = 0;\n    $.each(lines, function() {\n      lineCount += Math.ceil(this.length / columns) || 1;\n    });\n    var height = lineHeight * (lineCount + 1);\n    $(textarea).css('height', height);\n  };\n})(jQuery);\n\n(function($) {\n  var comp, by;\n\n  function init() {\n    initEvents();\n    initComparator();\n  }\n\n  function initEvents() {\n    $('a.comment-close').live(\"click\", function(event) {\n      event.preventDefault();\n      hide($(this).attr('id').substring(2));\n    });\n    $('a.vote').live(\"click\", function(event) {\n      event.preventDefault();\n      handleVote($(this));\n    });\n    $('a.reply').live(\"click\", function(event) {\n      event.preventDefault();\n      openReply($(this).attr('id').substring(2));\n    });\n    $('a.close-reply').live(\"click\", function(event) {\n      event.preventDefault();\n      closeReply($(this).attr('id').substring(2));\n    });\n    $('a.sort-option').live(\"click\", function(event) {\n      event.preventDefault();\n      handleReSort($(this));\n    });\n    $('a.show-proposal').live(\"click\", function(event) {\n      event.preventDefault();\n      showProposal($(this).attr('id').substring(2));\n    });\n    $('a.hide-proposal').live(\"click\", function(event) {\n      event.preventDefault();\n      hideProposal($(this).attr('id').substring(2));\n    });\n    $('a.show-propose-change').live(\"click\", function(event) {\n      event.preventDefault();\n      showProposeChange($(this).attr('id').substring(2));\n    });\n    $('a.hide-propose-change').live(\"click\", function(event) {\n      event.preventDefault();\n      hideProposeChange($(this).attr('id').substring(2));\n    });\n    $('a.accept-comment').live(\"click\", function(event) {\n      event.preventDefault();\n      acceptComment($(this).attr('id').substring(2));\n    });\n    $('a.delete-comment').live(\"click\", function(event) {\n      event.preventDefault();\n      deleteComment($(this).attr('id').substring(2));\n    });\n    $('a.comment-markup').live(\"click\", function(event) {\n      event.preventDefault();\n      toggleCommentMarkupBox($(this).attr('id').substring(2));\n    });\n  }\n\n  /**\n   * Set comp, which is a comparator function used for sorting and\n   * inserting comments into the list.\n   */\n  function setComparator() {\n    // If the first three letters are \"asc\", sort in ascending order\n    // and remove the prefix.\n    if (by.substring(0,3) == 'asc') {\n      var i = by.substring(3);\n      comp = function(a, b) { return a[i] - b[i]; };\n    } else {\n      // Otherwise sort in descending order.\n      comp = function(a, b) { return b[by] - a[by]; };\n    }\n\n    // Reset link styles and format the selected sort option.\n    $('a.sel').attr('href', '#').removeClass('sel');\n    $('a.by' + by).removeAttr('href').addClass('sel');\n  }\n\n  /**\n   * Create a comp function. If the user has preferences stored in\n   * the sortBy cookie, use those, otherwise use the default.\n   */\n  function initComparator() {\n    by = 'rating'; // Default to sort by rating.\n    // If the sortBy cookie is set, use that instead.\n    if (document.cookie.length > 0) {\n      var start = document.cookie.indexOf('sortBy=');\n      if (start != -1) {\n        start = start + 7;\n        var end = document.cookie.indexOf(\";\", start);\n        if (end == -1) {\n          end = document.cookie.length;\n          by = unescape(document.cookie.substring(start, end));\n        }\n      }\n    }\n    setComparator();\n  }\n\n  /**\n   * Show a comment div.\n   */\n  function show(id) {\n    $('#ao' + id).hide();\n    $('#ah' + id).show();\n    var context = $.extend({id: id}, opts);\n    var popup = $(renderTemplate(popupTemplate, context)).hide();\n    popup.find('textarea[name=\"proposal\"]').hide();\n    popup.find('a.by' + by).addClass('sel');\n    var form = popup.find('#cf' + id);\n    form.submit(function(event) {\n      event.preventDefault();\n      addComment(form);\n    });\n    $('#s' + id).after(popup);\n    popup.slideDown('fast', function() {\n      getComments(id);\n    });\n  }\n\n  /**\n   * Hide a comment div.\n   */\n  function hide(id) {\n    $('#ah' + id).hide();\n    $('#ao' + id).show();\n    var div = $('#sc' + id);\n    div.slideUp('fast', function() {\n      div.remove();\n    });\n  }\n\n  /**\n   * Perform an ajax request to get comments for a node\n   * and insert the comments into the comments tree.\n   */\n  function getComments(id) {\n    $.ajax({\n     type: 'GET',\n     url: opts.getCommentsURL,\n     data: {node: id},\n     success: function(data, textStatus, request) {\n       var ul = $('#cl' + id);\n       var speed = 100;\n       $('#cf' + id)\n         .find('textarea[name=\"proposal\"]')\n         .data('source', data.source);\n\n       if (data.comments.length === 0) {\n         ul.html('<li>No comments yet.</li>');\n         ul.data('empty', true);\n       } else {\n         // If there are comments, sort them and put them in the list.\n         var comments = sortComments(data.comments);\n         speed = data.comments.length * 100;\n         appendComments(comments, ul);\n         ul.data('empty', false);\n       }\n       $('#cn' + id).slideUp(speed + 200);\n       ul.slideDown(speed);\n     },\n     error: function(request, textStatus, error) {\n       showError('Oops, there was a problem retrieving the comments.');\n     },\n     dataType: 'json'\n    });\n  }\n\n  /**\n   * Add a comment via ajax and insert the comment into the comment tree.\n   */\n  function addComment(form) {\n    var node_id = form.find('input[name=\"node\"]').val();\n    var parent_id = form.find('input[name=\"parent\"]').val();\n    var text = form.find('textarea[name=\"comment\"]').val();\n    var proposal = form.find('textarea[name=\"proposal\"]').val();\n\n    if (text == '') {\n      showError('Please enter a comment.');\n      return;\n    }\n\n    // Disable the form that is being submitted.\n    form.find('textarea,input').attr('disabled', 'disabled');\n\n    // Send the comment to the server.\n    $.ajax({\n      type: \"POST\",\n      url: opts.addCommentURL,\n      dataType: 'json',\n      data: {\n        node: node_id,\n        parent: parent_id,\n        text: text,\n        proposal: proposal\n      },\n      success: function(data, textStatus, error) {\n        // Reset the form.\n        if (node_id) {\n          hideProposeChange(node_id);\n        }\n        form.find('textarea')\n          .val('')\n          .add(form.find('input'))\n          .removeAttr('disabled');\n\tvar ul = $('#cl' + (node_id || parent_id));\n        if (ul.data('empty')) {\n          $(ul).empty();\n          ul.data('empty', false);\n        }\n        insertComment(data.comment);\n        var ao = $('#ao' + node_id);\n        ao.find('img').attr({'src': opts.commentBrightImage});\n        if (node_id) {\n          // if this was a \"root\" comment, remove the commenting box\n          // (the user can get it back by reopening the comment popup)\n          $('#ca' + node_id).slideUp();\n        }\n      },\n      error: function(request, textStatus, error) {\n        form.find('textarea,input').removeAttr('disabled');\n        showError('Oops, there was a problem adding the comment.');\n      }\n    });\n  }\n\n  /**\n   * Recursively append comments to the main comment list and children\n   * lists, creating the comment tree.\n   */\n  function appendComments(comments, ul) {\n    $.each(comments, function() {\n      var div = createCommentDiv(this);\n      ul.append($(document.createElement('li')).html(div));\n      appendComments(this.children, div.find('ul.comment-children'));\n      // To avoid stagnating data, don't store the comments children in data.\n      this.children = null;\n      div.data('comment', this);\n    });\n  }\n\n  /**\n   * After adding a new comment, it must be inserted in the correct\n   * location in the comment tree.\n   */\n  function insertComment(comment) {\n    var div = createCommentDiv(comment);\n\n    // To avoid stagnating data, don't store the comments children in data.\n    comment.children = null;\n    div.data('comment', comment);\n\n    var ul = $('#cl' + (comment.node || comment.parent));\n    var siblings = getChildren(ul);\n\n    var li = $(document.createElement('li'));\n    li.hide();\n\n    // Determine where in the parents children list to insert this comment.\n    for(i=0; i < siblings.length; i++) {\n      if (comp(comment, siblings[i]) <= 0) {\n        $('#cd' + siblings[i].id)\n          .parent()\n          .before(li.html(div));\n        li.slideDown('fast');\n        return;\n      }\n    }\n\n    // If we get here, this comment rates lower than all the others,\n    // or it is the only comment in the list.\n    ul.append(li.html(div));\n    li.slideDown('fast');\n  }\n\n  function acceptComment(id) {\n    $.ajax({\n      type: 'POST',\n      url: opts.acceptCommentURL,\n      data: {id: id},\n      success: function(data, textStatus, request) {\n        $('#cm' + id).fadeOut('fast');\n        $('#cd' + id).removeClass('moderate');\n      },\n      error: function(request, textStatus, error) {\n        showError('Oops, there was a problem accepting the comment.');\n      }\n    });\n  }\n\n  function deleteComment(id) {\n    $.ajax({\n      type: 'POST',\n      url: opts.deleteCommentURL,\n      data: {id: id},\n      success: function(data, textStatus, request) {\n        var div = $('#cd' + id);\n        if (data == 'delete') {\n          // Moderator mode: remove the comment and all children immediately\n          div.slideUp('fast', function() {\n            div.remove();\n          });\n          return;\n        }\n        // User mode: only mark the comment as deleted\n        div\n          .find('span.user-id:first')\n          .text('[deleted]').end()\n          .find('div.comment-text:first')\n          .text('[deleted]').end()\n          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +\n                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)\n          .remove();\n        var comment = div.data('comment');\n        comment.username = '[deleted]';\n        comment.text = '[deleted]';\n        div.data('comment', comment);\n      },\n      error: function(request, textStatus, error) {\n        showError('Oops, there was a problem deleting the comment.');\n      }\n    });\n  }\n\n  function showProposal(id) {\n    $('#sp' + id).hide();\n    $('#hp' + id).show();\n    $('#pr' + id).slideDown('fast');\n  }\n\n  function hideProposal(id) {\n    $('#hp' + id).hide();\n    $('#sp' + id).show();\n    $('#pr' + id).slideUp('fast');\n  }\n\n  function showProposeChange(id) {\n    $('#pc' + id).hide();\n    $('#hc' + id).show();\n    var textarea = $('#pt' + id);\n    textarea.val(textarea.data('source'));\n    $.fn.autogrow.resize(textarea[0]);\n    textarea.slideDown('fast');\n  }\n\n  function hideProposeChange(id) {\n    $('#hc' + id).hide();\n    $('#pc' + id).show();\n    var textarea = $('#pt' + id);\n    textarea.val('').removeAttr('disabled');\n    textarea.slideUp('fast');\n  }\n\n  function toggleCommentMarkupBox(id) {\n    $('#mb' + id).toggle();\n  }\n\n  /** Handle when the user clicks on a sort by link. */\n  function handleReSort(link) {\n    var classes = link.attr('class').split(/\\s+/);\n    for (var i=0; i<classes.length; i++) {\n      if (classes[i] != 'sort-option') {\n\tby = classes[i].substring(2);\n      }\n    }\n    setComparator();\n    // Save/update the sortBy cookie.\n    var expiration = new Date();\n    expiration.setDate(expiration.getDate() + 365);\n    document.cookie= 'sortBy=' + escape(by) +\n                     ';expires=' + expiration.toUTCString();\n    $('ul.comment-ul').each(function(index, ul) {\n      var comments = getChildren($(ul), true);\n      comments = sortComments(comments);\n      appendComments(comments, $(ul).empty());\n    });\n  }\n\n  /**\n   * Function to process a vote when a user clicks an arrow.\n   */\n  function handleVote(link) {\n    if (!opts.voting) {\n      showError(\"You'll need to login to vote.\");\n      return;\n    }\n\n    var id = link.attr('id');\n    if (!id) {\n      // Didn't click on one of the voting arrows.\n      return;\n    }\n    // If it is an unvote, the new vote value is 0,\n    // Otherwise it's 1 for an upvote, or -1 for a downvote.\n    var value = 0;\n    if (id.charAt(1) != 'u') {\n      value = id.charAt(0) == 'u' ? 1 : -1;\n    }\n    // The data to be sent to the server.\n    var d = {\n      comment_id: id.substring(2),\n      value: value\n    };\n\n    // Swap the vote and unvote links.\n    link.hide();\n    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)\n      .show();\n\n    // The div the comment is displayed in.\n    var div = $('div#cd' + d.comment_id);\n    var data = div.data('comment');\n\n    // If this is not an unvote, and the other vote arrow has\n    // already been pressed, unpress it.\n    if ((d.value !== 0) && (data.vote === d.value * -1)) {\n      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();\n      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();\n    }\n\n    // Update the comments rating in the local data.\n    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);\n    data.vote = d.value;\n    div.data('comment', data);\n\n    // Change the rating text.\n    div.find('.rating:first')\n      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));\n\n    // Send the vote information to the server.\n    $.ajax({\n      type: \"POST\",\n      url: opts.processVoteURL,\n      data: d,\n      error: function(request, textStatus, error) {\n        showError('Oops, there was a problem casting that vote.');\n      }\n    });\n  }\n\n  /**\n   * Open a reply form used to reply to an existing comment.\n   */\n  function openReply(id) {\n    // Swap out the reply link for the hide link\n    $('#rl' + id).hide();\n    $('#cr' + id).show();\n\n    // Add the reply li to the children ul.\n    var div = $(renderTemplate(replyTemplate, {id: id})).hide();\n    $('#cl' + id)\n      .prepend(div)\n      // Setup the submit handler for the reply form.\n      .find('#rf' + id)\n      .submit(function(event) {\n        event.preventDefault();\n        addComment($('#rf' + id));\n        closeReply(id);\n      })\n      .find('input[type=button]')\n      .click(function() {\n        closeReply(id);\n      });\n    div.slideDown('fast', function() {\n      $('#rf' + id).find('textarea').focus();\n    });\n  }\n\n  /**\n   * Close the reply form opened with openReply.\n   */\n  function closeReply(id) {\n    // Remove the reply div from the DOM.\n    $('#rd' + id).slideUp('fast', function() {\n      $(this).remove();\n    });\n\n    // Swap out the hide link for the reply link\n    $('#cr' + id).hide();\n    $('#rl' + id).show();\n  }\n\n  /**\n   * Recursively sort a tree of comments using the comp comparator.\n   */\n  function sortComments(comments) {\n    comments.sort(comp);\n    $.each(comments, function() {\n      this.children = sortComments(this.children);\n    });\n    return comments;\n  }\n\n  /**\n   * Get the children comments from a ul. If recursive is true,\n   * recursively include childrens' children.\n   */\n  function getChildren(ul, recursive) {\n    var children = [];\n    ul.children().children(\"[id^='cd']\")\n      .each(function() {\n        var comment = $(this).data('comment');\n        if (recursive)\n          comment.children = getChildren($(this).find('#cl' + comment.id), true);\n        children.push(comment);\n      });\n    return children;\n  }\n\n  /** Create a div to display a comment in. */\n  function createCommentDiv(comment) {\n    if (!comment.displayed && !opts.moderator) {\n      return $('<div class=\"moderate\">Thank you!  Your comment will show up '\n               + 'once it is has been approved by a moderator.</div>');\n    }\n    // Prettify the comment rating.\n    comment.pretty_rating = comment.rating + ' point' +\n      (comment.rating == 1 ? '' : 's');\n    // Make a class (for displaying not yet moderated comments differently)\n    comment.css_class = comment.displayed ? '' : ' moderate';\n    // Create a div for this comment.\n    var context = $.extend({}, opts, comment);\n    var div = $(renderTemplate(commentTemplate, context));\n\n    // If the user has voted on this comment, highlight the correct arrow.\n    if (comment.vote) {\n      var direction = (comment.vote == 1) ? 'u' : 'd';\n      div.find('#' + direction + 'v' + comment.id).hide();\n      div.find('#' + direction + 'u' + comment.id).show();\n    }\n\n    if (opts.moderator || comment.text != '[deleted]') {\n      div.find('a.reply').show();\n      if (comment.proposal_diff)\n        div.find('#sp' + comment.id).show();\n      if (opts.moderator && !comment.displayed)\n        div.find('#cm' + comment.id).show();\n      if (opts.moderator || (opts.username == comment.username))\n        div.find('#dc' + comment.id).show();\n    }\n    return div;\n  }\n\n  /**\n   * A simple template renderer. Placeholders such as <%id%> are replaced\n   * by context['id'] with items being escaped. Placeholders such as <#id#>\n   * are not escaped.\n   */\n  function renderTemplate(template, context) {\n    var esc = $(document.createElement('div'));\n\n    function handle(ph, escape) {\n      var cur = context;\n      $.each(ph.split('.'), function() {\n        cur = cur[this];\n      });\n      return escape ? esc.text(cur || \"\").html() : cur;\n    }\n\n    return template.replace(/<([%#])([\\w\\.]*)\\1>/g, function() {\n      return handle(arguments[2], arguments[1] == '%' ? true : false);\n    });\n  }\n\n  /** Flash an error message briefly. */\n  function showError(message) {\n    $(document.createElement('div')).attr({'class': 'popup-error'})\n      .append($(document.createElement('div'))\n               .attr({'class': 'error-message'}).text(message))\n      .appendTo('body')\n      .fadeIn(\"slow\")\n      .delay(2000)\n      .fadeOut(\"slow\");\n  }\n\n  /** Add a link the user uses to open the comments popup. */\n  $.fn.comment = function() {\n    return this.each(function() {\n      var id = $(this).attr('id').substring(1);\n      var count = COMMENT_METADATA[id];\n      var title = count + ' comment' + (count == 1 ? '' : 's');\n      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;\n      var addcls = count == 0 ? ' nocomment' : '';\n      $(this)\n        .append(\n          $(document.createElement('a')).attr({\n            href: '#',\n            'class': 'sphinx-comment-open' + addcls,\n            id: 'ao' + id\n          })\n            .append($(document.createElement('img')).attr({\n              src: image,\n              alt: 'comment',\n              title: title\n            }))\n            .click(function(event) {\n              event.preventDefault();\n              show($(this).attr('id').substring(2));\n            })\n        )\n        .append(\n          $(document.createElement('a')).attr({\n            href: '#',\n            'class': 'sphinx-comment-close hidden',\n            id: 'ah' + id\n          })\n            .append($(document.createElement('img')).attr({\n              src: opts.closeCommentImage,\n              alt: 'close',\n              title: 'close'\n            }))\n            .click(function(event) {\n              event.preventDefault();\n              hide($(this).attr('id').substring(2));\n            })\n        );\n    });\n  };\n\n  var opts = {\n    processVoteURL: '/_process_vote',\n    addCommentURL: '/_add_comment',\n    getCommentsURL: '/_get_comments',\n    acceptCommentURL: '/_accept_comment',\n    deleteCommentURL: '/_delete_comment',\n    commentImage: '/static/_static/comment.png',\n    closeCommentImage: '/static/_static/comment-close.png',\n    loadingImage: '/static/_static/ajax-loader.gif',\n    commentBrightImage: '/static/_static/comment-bright.png',\n    upArrow: '/static/_static/up.png',\n    downArrow: '/static/_static/down.png',\n    upArrowPressed: '/static/_static/up-pressed.png',\n    downArrowPressed: '/static/_static/down-pressed.png',\n    voting: false,\n    moderator: false\n  };\n\n  if (typeof COMMENT_OPTIONS != \"undefined\") {\n    opts = jQuery.extend(opts, COMMENT_OPTIONS);\n  }\n\n  var popupTemplate = '\\\n    <div class=\"sphinx-comments\" id=\"sc<%id%>\">\\\n      <p class=\"sort-options\">\\\n        Sort by:\\\n        <a href=\"#\" class=\"sort-option byrating\">best rated</a>\\\n        <a href=\"#\" class=\"sort-option byascage\">newest</a>\\\n        <a href=\"#\" class=\"sort-option byage\">oldest</a>\\\n      </p>\\\n      <div class=\"comment-header\">Comments</div>\\\n      <div class=\"comment-loading\" id=\"cn<%id%>\">\\\n        loading comments... <img src=\"<%loadingImage%>\" alt=\"\" /></div>\\\n      <ul id=\"cl<%id%>\" class=\"comment-ul\"></ul>\\\n      <div id=\"ca<%id%>\">\\\n      <p class=\"add-a-comment\">Add a comment\\\n        (<a href=\"#\" class=\"comment-markup\" id=\"ab<%id%>\">markup</a>):</p>\\\n      <div class=\"comment-markup-box\" id=\"mb<%id%>\">\\\n        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \\\n        <tt>``code``</tt>, \\\n        code blocks: <tt>::</tt> and an indented block after blank line</div>\\\n      <form method=\"post\" id=\"cf<%id%>\" class=\"comment-form\" action=\"\">\\\n        <textarea name=\"comment\" cols=\"80\"></textarea>\\\n        <p class=\"propose-button\">\\\n          <a href=\"#\" id=\"pc<%id%>\" class=\"show-propose-change\">\\\n            Propose a change &#9657;\\\n          </a>\\\n          <a href=\"#\" id=\"hc<%id%>\" class=\"hide-propose-change\">\\\n            Propose a change &#9663;\\\n          </a>\\\n        </p>\\\n        <textarea name=\"proposal\" id=\"pt<%id%>\" cols=\"80\"\\\n                  spellcheck=\"false\"></textarea>\\\n        <input type=\"submit\" value=\"Add comment\" />\\\n        <input type=\"hidden\" name=\"node\" value=\"<%id%>\" />\\\n        <input type=\"hidden\" name=\"parent\" value=\"\" />\\\n      </form>\\\n      </div>\\\n    </div>';\n\n  var commentTemplate = '\\\n    <div id=\"cd<%id%>\" class=\"sphinx-comment<%css_class%>\">\\\n      <div class=\"vote\">\\\n        <div class=\"arrow\">\\\n          <a href=\"#\" id=\"uv<%id%>\" class=\"vote\" title=\"vote up\">\\\n            <img src=\"<%upArrow%>\" />\\\n          </a>\\\n          <a href=\"#\" id=\"uu<%id%>\" class=\"un vote\" title=\"vote up\">\\\n            <img src=\"<%upArrowPressed%>\" />\\\n          </a>\\\n        </div>\\\n        <div class=\"arrow\">\\\n          <a href=\"#\" id=\"dv<%id%>\" class=\"vote\" title=\"vote down\">\\\n            <img src=\"<%downArrow%>\" id=\"da<%id%>\" />\\\n          </a>\\\n          <a href=\"#\" id=\"du<%id%>\" class=\"un vote\" title=\"vote down\">\\\n            <img src=\"<%downArrowPressed%>\" />\\\n          </a>\\\n        </div>\\\n      </div>\\\n      <div class=\"comment-content\">\\\n        <p class=\"tagline comment\">\\\n          <span class=\"user-id\"><%username%></span>\\\n          <span class=\"rating\"><%pretty_rating%></span>\\\n          <span class=\"delta\"><%time.delta%></span>\\\n        </p>\\\n        <div class=\"comment-text comment\"><#text#></div>\\\n        <p class=\"comment-opts comment\">\\\n          <a href=\"#\" class=\"reply hidden\" id=\"rl<%id%>\">reply &#9657;</a>\\\n          <a href=\"#\" class=\"close-reply\" id=\"cr<%id%>\">reply &#9663;</a>\\\n          <a href=\"#\" id=\"sp<%id%>\" class=\"show-proposal\">proposal &#9657;</a>\\\n          <a href=\"#\" id=\"hp<%id%>\" class=\"hide-proposal\">proposal &#9663;</a>\\\n          <a href=\"#\" id=\"dc<%id%>\" class=\"delete-comment hidden\">delete</a>\\\n          <span id=\"cm<%id%>\" class=\"moderation hidden\">\\\n            <a href=\"#\" id=\"ac<%id%>\" class=\"accept-comment\">accept</a>\\\n          </span>\\\n        </p>\\\n        <pre class=\"proposal\" id=\"pr<%id%>\">\\\n<#proposal_diff#>\\\n        </pre>\\\n          <ul class=\"comment-children\" id=\"cl<%id%>\"></ul>\\\n        </div>\\\n        <div class=\"clearleft\"></div>\\\n      </div>\\\n    </div>';\n\n  var replyTemplate = '\\\n    <li>\\\n      <div class=\"reply-div\" id=\"rd<%id%>\">\\\n        <form id=\"rf<%id%>\">\\\n          <textarea name=\"comment\" cols=\"80\"></textarea>\\\n          <input type=\"submit\" value=\"Add reply\" />\\\n          <input type=\"button\" value=\"Cancel\" />\\\n          <input type=\"hidden\" name=\"parent\" value=\"<%id%>\" />\\\n          <input type=\"hidden\" name=\"node\" value=\"\" />\\\n        </form>\\\n      </div>\\\n    </li>';\n\n  $(document).ready(function() {\n    init();\n  });\n})(jQuery);\n\n$(document).ready(function() {\n  // add comment anchors for all paragraphs that are commentable\n  $('.sphinx-has-comment').comment();\n\n  // highlight search words in search results\n  $(\"div.context\").each(function() {\n    var params = $.getQueryParameters();\n    var terms = (params.q) ? params.q[0].split(/\\s+/) : [];\n    var result = $(this);\n    $.each(terms, function() {\n      result.highlightText(this.toLowerCase(), 'highlighted');\n    });\n  });\n\n  // directly open comment window if requested\n  var anchor = document.location.hash;\n  if (anchor.substring(0, 9) == '#comment-') {\n    $('#ao' + anchor.substring(9)).click();\n    document.location.hash = '#s' + anchor.substring(9);\n  }\n});\n"
  },
  {
    "path": "docs/_build/html/genindex.html",
    "content": "\n\n\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Index &mdash; django-stronghold 0.1.1 documentation</title>\n    \n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    \n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '',\n        VERSION:     '0.1.1',\n        COLLAPSE_INDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"django-stronghold 0.1.1 documentation\" href=\"index.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"#\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li><a href=\"index.html\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n\n<h1 id=\"index\">Index</h1>\n\n<div class=\"genindex-jumpbox\">\n \n</div>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n\n   \n\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"#\" title=\"General Index\"\n             >index</a></li>\n        <li><a href=\"index.html\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2013, Mike Grouchy.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.1.3.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "docs/_build/html/index.html",
    "content": "\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Welcome to django-stronghold’s documentation! &mdash; django-stronghold 0.1.1 documentation</title>\n    \n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    \n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '',\n        VERSION:     '0.1.1',\n        COLLAPSE_INDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"django-stronghold 0.1.1 documentation\" href=\"#\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li><a href=\"#\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <div class=\"section\" id=\"welcome-to-django-stronghold-s-documentation\">\n<h1>Welcome to django-stronghold&#8217;s documentation!<a class=\"headerlink\" href=\"#welcome-to-django-stronghold-s-documentation\" title=\"Permalink to this headline\">¶</a></h1>\n<p>Contents:</p>\n<div class=\"toctree-wrapper compound\">\n<ul class=\"simple\">\n</ul>\n</div>\n</div>\n<div class=\"section\" id=\"indices-and-tables\">\n<h1>Indices and tables<a class=\"headerlink\" href=\"#indices-and-tables\" title=\"Permalink to this headline\">¶</a></h1>\n<ul class=\"simple\">\n<li><a class=\"reference internal\" href=\"genindex.html\"><em>Index</em></a></li>\n<li><a class=\"reference internal\" href=\"py-modindex.html\"><em>Module Index</em></a></li>\n<li><a class=\"reference internal\" href=\"search.html\"><em>Search Page</em></a></li>\n</ul>\n</div>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h3><a href=\"#\">Table Of Contents</a></h3>\n  <ul>\n<li><a class=\"reference internal\" href=\"#\">Welcome to django-stronghold&#8217;s documentation!</a><ul>\n</ul>\n</li>\n<li><a class=\"reference internal\" href=\"#indices-and-tables\">Indices and tables</a></li>\n</ul>\n\n  <h3>This Page</h3>\n  <ul class=\"this-page-menu\">\n    <li><a href=\"_sources/index.txt\"\n           rel=\"nofollow\">Show Source</a></li>\n  </ul>\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li><a href=\"#\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2013, Mike Grouchy.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.1.3.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "docs/_build/html/search.html",
    "content": "\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Search &mdash; django-stronghold 0.1.1 documentation</title>\n    \n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    \n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '',\n        VERSION:     '0.1.1',\n        COLLAPSE_INDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/searchtools.js\"></script>\n    <link rel=\"top\" title=\"django-stronghold 0.1.1 documentation\" href=\"index.html\" />\n  <script type=\"text/javascript\">\n    jQuery(function() { Search.loadIndex(\"searchindex.js\"); });\n  </script>\n   \n\n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li><a href=\"index.html\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <h1 id=\"search-documentation\">Search</h1>\n  <div id=\"fallback\" class=\"admonition warning\">\n  <script type=\"text/javascript\">$('#fallback').hide();</script>\n  <p>\n    Please activate JavaScript to enable the search\n    functionality.\n  </p>\n  </div>\n  <p>\n    From here you can search these documents. Enter your search\n    words into the box below and click \"search\". Note that the search\n    function will automatically search for all of the words. Pages\n    containing fewer words won't appear in the result list.\n  </p>\n  <form action=\"\" method=\"get\">\n    <input type=\"text\" name=\"q\" value=\"\" />\n    <input type=\"submit\" value=\"search\" />\n    <span id=\"search-progress\" style=\"padding-left: 10px\"></span>\n  </form>\n  \n  <div id=\"search-results\">\n  \n  </div>\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li><a href=\"index.html\">django-stronghold 0.1.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2013, Mike Grouchy.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.1.3.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "docs/_build/html/searchindex.js",
    "content": "Search.setIndex({objects:{},terms:{stronghold:0,index:0,search:0,welcom:0,modul:0,indic:0,django:0,content:0,tabl:0,document:0,page:0},objtypes:{},titles:[\"Welcome to django-stronghold&#8217;s documentation!\"],objnames:{},filenames:[\"index\"]})"
  },
  {
    "path": "docs/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# django-stronghold documentation build configuration file, created by\n# sphinx-quickstart on Fri Mar 22 22:25:59 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.insert(0, os.path.abspath('.'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = []\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'django-stronghold'\ncopyright = u'2013, Mike Grouchy'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.2.0'\n# The full version, including alpha/beta/rc tags.\nrelease = '0.2.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'django-strongholddoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'django-stronghold.tex', u'django-stronghold Documentation',\n   u'Mike Grouchy', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'django-stronghold', u'django-stronghold Documentation',\n     [u'Mike Grouchy'], 1)\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'django-stronghold', u'django-stronghold Documentation',\n   u'Mike Grouchy', 'django-stronghold', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n\n# -- Options for Epub output ---------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = u'django-stronghold'\nepub_author = u'Mike Grouchy'\nepub_publisher = u'Mike Grouchy'\nepub_copyright = u'2013, Mike Grouchy'\n\n# The language of the text. It defaults to the language option\n# or en if the language is not set.\n#epub_language = ''\n\n# The scheme of the identifier. Typical schemes are ISBN or URL.\n#epub_scheme = ''\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#epub_identifier = ''\n\n# A unique identification for the text.\n#epub_uid = ''\n\n# A tuple containing the cover image and cover page html template filenames.\n#epub_cover = ()\n\n# HTML files that should be inserted before the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_pre_files = []\n\n# HTML files that should be inserted after the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_post_files = []\n\n# A list of files that should not be packed into the epub file.\n#epub_exclude_files = []\n\n# The depth of the table of contents in toc.ncx.\n#epub_tocdepth = 3\n\n# Allow duplicate toc entries.\n#epub_tocdup = True\n"
  },
  {
    "path": "docs/index.rst",
    "content": ".. django-stronghold documentation master file, created by\n   sphinx-quickstart on Fri Mar 22 22:25:59 2013.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nWelcome to django-stronghold's documentation!\n=============================================\n\nContents:\n\n.. toctree::\n   :maxdepth: 2\n\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n\n"
  },
  {
    "path": "requirements.txt",
    "content": "Jinja2==2.10.3\nPygments==1.6\nSphinx==1.1.3\ndocutils==0.10\n"
  },
  {
    "path": "setup.cfg",
    "content": "[bdist_wheel]\nuniversal = 1\n\n"
  },
  {
    "path": "setup.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\n\ndependencies = []\ntest_dependencies = [\"django>1.8.0\"]\n\nsetup(\n    name=\"django-stronghold\",\n    version=\"0.4.0\",\n    description=\"Get inside your stronghold and make all your Django views default login_required\",\n    url=\"https://github.com/mgrouchy/django-stronghold\",\n    author=\"Mike Grouchy\",\n    author_email=\"mgrouchy@gmail.com\",\n    packages=[\"stronghold\", \"stronghold.tests\",],\n    license=\"MIT license\",\n    install_requires=dependencies,\n    tests_require=test_dependencies,\n    long_description=open(\"README.md\").read(),\n    long_description_content_type=\"text/markdown\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.4\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n)\n"
  },
  {
    "path": "stronghold/__init__.py",
    "content": ""
  },
  {
    "path": "stronghold/conf.py",
    "content": "import re\n\ntry:\n    from django.urls import reverse, NoReverseMatch\nexcept ImportError:\n    from django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.conf import settings\nfrom django.contrib.auth.decorators import login_required\n\nSTRONGHOLD_PUBLIC_URLS = getattr(settings, \"STRONGHOLD_PUBLIC_URLS\", ())\nSTRONGHOLD_DEFAULTS = getattr(settings, \"STRONGHOLD_DEFAULTS\", True)\nSTRONGHOLD_PUBLIC_NAMED_URLS = getattr(settings, \"STRONGHOLD_PUBLIC_NAMED_URLS\", ())\n\n\ndef is_authenticated(user):\n    \"\"\" make compatible with django 1 and 2 \"\"\"\n    try:\n        return user.is_authenticated()\n    except TypeError:\n        return user.is_authenticated\n\n\ndef test_request(request, view_func, view_args, view_kwargs):\n    \"\"\"\n    Default test against request in middleware. \n    \n    Set this in STRONGHOLD_USER_TEST_FUNC in your django.conf.settings if you \n    want to use the request details to deny permission. \n    \"\"\"\n    return True\n\n\nSTRONGHOLD_USER_TEST_FUNC = getattr(settings, \"STRONGHOLD_USER_TEST_FUNC\", is_authenticated)\nSTRONGHOLD_REQUEST_TEST_FUNC = getattr(settings, \"STRONGHOLD_REQUEST_TEST_FUNC\", test_request)\n\nif STRONGHOLD_DEFAULTS:\n    if \"django.contrib.auth\" in settings.INSTALLED_APPS:\n        STRONGHOLD_PUBLIC_NAMED_URLS += (\"login\", \"logout\")\n\n    # Do not login protect the logout url, causes an infinite loop\n    logout_url = getattr(settings, \"LOGOUT_URL\", None)\n    if logout_url:\n        STRONGHOLD_PUBLIC_URLS += (r\"^%s.+$\" % logout_url,)\n\n    if settings.DEBUG:\n        # In Debug mode we serve the media urls as public by default as a\n        # convenience. We make no other assumptions\n        static_url = getattr(settings, \"STATIC_URL\", None)\n        media_url = getattr(settings, \"MEDIA_URL\", None)\n\n        if static_url:\n            STRONGHOLD_PUBLIC_URLS += (r\"^%s.+$\" % static_url,)\n\n        if media_url:\n            STRONGHOLD_PUBLIC_URLS += (r\"^%s.+$\" % media_url,)\n\n# named urls can be unsafe if a user puts the wrong url in. Right now urls that\n# dont reverse are just ignored with a warning. Maybe in the future make this\n# so it breaks?\nnamed_urls = []\nfor named_url in STRONGHOLD_PUBLIC_NAMED_URLS:\n    try:\n        url = reverse(named_url)\n        named_urls.append(url)\n    except NoReverseMatch:\n        # print \"Stronghold: Could not reverse Named URL: '%s'. Is it in your `urlpatterns`? Ignoring.\" % named_url\n        # ignore non-matches\n        pass\n\n\nSTRONGHOLD_PUBLIC_URLS += tuple([\"^%s$\" % url for url in named_urls])\n\nif STRONGHOLD_PUBLIC_URLS:\n    STRONGHOLD_PUBLIC_URLS = [re.compile(v) for v in STRONGHOLD_PUBLIC_URLS]\n"
  },
  {
    "path": "stronghold/decorators.py",
    "content": "from functools import partial\nfrom stronghold.utils import set_view_func_public\n\n\ndef public(function):\n    \"\"\"\n    Decorator for public views that do not require authentication\n    Sets an attribute in the function STRONGHOLD_IS_PUBLIC to True\n    \"\"\"\n    orig_func = function\n    outer_partial_wrapper = None\n    while isinstance(orig_func, partial):\n        outer_partial_wrapper = orig_func\n        orig_func = orig_func.func\n    # For Django >= 2.1.x:\n    # If `function` is a bound method, django will wrap it in a partial\n    # to allow setting attributes on a bound method.\n    # Bound methods have the attr \"__self__\". If this is the case,\n    # we reapply the partial wrapper before setting the attribute.\n    if hasattr(orig_func, \"__self__\") and outer_partial_wrapper != None:\n        orig_func = outer_partial_wrapper\n    set_view_func_public(orig_func)\n\n    return function\n"
  },
  {
    "path": "stronghold/middleware.py",
    "content": "from django.contrib.auth.decorators import user_passes_test\nfrom stronghold import conf, utils\n\ntry:\n    from django.utils.deprecation import MiddlewareMixin\nexcept ImportError:\n    MiddlewareMixin = object\n\n\nclass LoginRequiredMiddleware(MiddlewareMixin):\n    \"\"\"\n    Restrict access to users that for which STRONGHOLD_USER_TEST_FUNC returns\n    True. Default is to check if the user is authenticated.\n\n    View is deemed to be public if the @public decorator is applied to the view\n\n    View is also deemed to be Public if listed in in django settings in the\n    STRONGHOLD_PUBLIC_URLS dictionary\n    each url in STRONGHOLD_PUBLIC_URLS must be a valid regex\n\n    \"\"\"\n\n    def __init__(self, *args, **kwargs):\n        if MiddlewareMixin != object:\n            super(LoginRequiredMiddleware, self).__init__(*args, **kwargs)\n        self.public_view_urls = getattr(conf, \"STRONGHOLD_PUBLIC_URLS\", ())\n\n    def process_view(self, request, view_func, view_args, view_kwargs):\n        if (\n            utils.is_view_func_public(view_func)\n            or self.is_public_url(request.path_info)\n            or conf.STRONGHOLD_USER_TEST_FUNC(request.user)\n            and conf.STRONGHOLD_REQUEST_TEST_FUNC(request, view_func, view_args, view_kwargs)\n        ):\n            return None\n\n        decorator = user_passes_test(conf.STRONGHOLD_USER_TEST_FUNC)\n        return decorator(view_func)(request, *view_args, **view_kwargs)\n\n    def is_public_url(self, url):\n        return any(public_url.match(url) for public_url in self.public_view_urls)\n"
  },
  {
    "path": "stronghold/models.py",
    "content": ""
  },
  {
    "path": "stronghold/tests/__init__.py",
    "content": "from stronghold.tests.testdecorators import *\nfrom stronghold.tests.testmiddleware import *\nfrom stronghold.tests.testmixins import *\nfrom stronghold.tests.testutils import *\n"
  },
  {
    "path": "stronghold/tests/testdecorators.py",
    "content": "import functools\n\nfrom stronghold import decorators\n\nimport django\nif django.VERSION[:2] < (1, 9):\n    from django.utils import unittest\nelse:\n    import unittest\nfrom django.utils.decorators import method_decorator\n\n\nclass StrongholdDecoratorTests(unittest.TestCase):\n\n    def test_public_decorator_sets_attr(self):\n        @decorators.public\n        def function():\n            pass\n\n        self.assertTrue(function.STRONGHOLD_IS_PUBLIC)\n\n    def test_public_decorator_sets_attr_with_nested_decorators(self):\n        def stub_decorator(func):\n            return func\n\n        @decorators.public\n        @stub_decorator\n        def inner_function():\n            pass\n\n        self.assertTrue(inner_function.STRONGHOLD_IS_PUBLIC)\n\n    def test_public_decorator_works_with_partials(self):\n        def function():\n            pass\n        partial = functools.partial(function)\n\n        decorators.public(partial)\n\n        self.assertTrue(function.STRONGHOLD_IS_PUBLIC)\n\n    def test_public_decorator_works_with_method_decorator(self):\n        class TestClass:\n            @method_decorator(decorators.public)\n            def function(self):\n                pass\n\n        self.assertTrue(TestClass.function.STRONGHOLD_IS_PUBLIC)"
  },
  {
    "path": "stronghold/tests/testmiddleware.py",
    "content": "from unittest import mock\nimport re\n\nfrom stronghold import conf\nfrom stronghold.middleware import LoginRequiredMiddleware\n\ntry:\n    from django.urls import reverse\nexcept ImportError:\n    from django.core.urlresolvers import reverse\n\nfrom django.http import HttpResponse\nfrom django.test import TestCase\nfrom django.test.client import RequestFactory\n\n\nclass StrongholdMiddlewareTestCase(TestCase):\n\n    def test_public_view_is_public(self):\n        response = self.client.get(reverse('public_view'))\n        self.assertEqual(response.status_code, 200)\n\n    def test_private_view_is_private(self):\n        response = self.client.get(reverse('protected_view'))\n        self.assertEqual(response.status_code, 302)\n\n\nclass LoginRequiredMiddlewareTests(TestCase):\n\n    def setUp(self):\n        self.middleware = LoginRequiredMiddleware()\n\n        self.request = RequestFactory().get('/test-protected-url/')\n        self.request.user = mock.Mock()\n\n        self.kwargs = {\n            'view_func': HttpResponse,\n            'view_args': [],\n            'view_kwargs': {},\n            'request': self.request,\n        }\n\n    def set_authenticated(self, is_authenticated):\n        \"\"\"Set whether user is authenticated in the request.\"\"\"\n        user = self.request.user\n        user.is_authenticated.return_value = is_authenticated\n\n        # In Django >= 1.10, is_authenticated acts as property and method\n        user.is_authenticated.__bool__ = lambda self: is_authenticated\n        user.is_authenticated.__nonzero__ = lambda self: is_authenticated\n\n    def test_redirects_to_login_when_not_authenticated(self):\n        self.set_authenticated(False)\n\n        response = self.middleware.process_view(**self.kwargs)\n\n        self.assertEqual(response.status_code, 302)\n\n    def test_returns_none_when_authenticated(self):\n        self.set_authenticated(True)\n\n        response = self.middleware.process_view(**self.kwargs)\n\n        self.assertEqual(response, None)\n\n    def test_returns_none_when_url_is_in_public_urls(self):\n        self.set_authenticated(False)\n        self.middleware.public_view_urls = [re.compile(r'/test-protected-url/')]\n\n        response = self.middleware.process_view(**self.kwargs)\n\n        self.assertEqual(response, None)\n\n    def test_returns_none_when_url_is_decorated_public(self):\n        self.set_authenticated(False)\n\n        self.kwargs['view_func'].STRONGHOLD_IS_PUBLIC = True\n        response = self.middleware.process_view(**self.kwargs)\n\n        self.assertEqual(response, None)\n\n    def test_redirects_to_login_when_not_passing_custom_test(self):\n        with mock.patch('stronghold.conf.STRONGHOLD_USER_TEST_FUNC', lambda u: u.is_staff):\n            self.request.user.is_staff = False\n\n            response = self.middleware.process_view(**self.kwargs)\n\n            self.assertEqual(response.status_code, 302)\n\n    def test_returns_none_when_passing_custom_test(self):\n        with mock.patch('stronghold.conf.STRONGHOLD_USER_TEST_FUNC', lambda u: u.is_staff):\n            self.request.user.is_staff = True\n\n            response = self.middleware.process_view(**self.kwargs)\n\n            self.assertEqual(response, None)\n"
  },
  {
    "path": "stronghold/tests/testmixins.py",
    "content": "from stronghold.views import StrongholdPublicMixin\n\nimport django\nfrom django.views.generic import View\nfrom django.views.generic.base import TemplateResponseMixin\n\nif django.VERSION[:2] < (1, 9):\n    from django.utils import unittest\nelse:\n    import unittest\n\n\nclass StrongholdMixinsTests(unittest.TestCase):\n\n    def test_public_mixin_sets_attr(self):\n\n        class TestView(StrongholdPublicMixin, View):\n            pass\n\n        self.assertTrue(TestView.dispatch.STRONGHOLD_IS_PUBLIC)\n\n    def test_public_mixin_sets_attr_with_multiple_mixins(self):\n\n        class TestView(StrongholdPublicMixin, TemplateResponseMixin, View):\n            template_name = 'dummy.html'\n\n        self.assertTrue(TestView.dispatch.STRONGHOLD_IS_PUBLIC)\n"
  },
  {
    "path": "stronghold/tests/testutils.py",
    "content": "from stronghold import utils\n\nimport django\nif django.VERSION[:2] < (1, 9):\n    from django.utils import unittest\nelse:\n    import unittest\n\n\nclass IsViewFuncPublicTests(unittest.TestCase):\n\n    def test_False_when_not_present(self):\n        def function():\n            pass\n\n        is_public = utils.is_view_func_public(function)\n\n        self.assertFalse(is_public)\n\n    def test_False(self):\n        def function():\n            pass\n\n        function.STRONGHOLD_IS_PUBLIC = False\n\n        is_public = utils.is_view_func_public(function)\n\n        self.assertFalse(is_public)\n\n    def test_True(self):\n        def function():\n            pass\n        function.STRONGHOLD_IS_PUBLIC = True\n\n        is_public = utils.is_view_func_public(function)\n\n        self.assertTrue(is_public)\n\n\nclass SetViewFuncPublicTests(unittest.TestCase):\n\n    def test_sets_attr(self):\n        def function():\n            pass\n\n        utils.set_view_func_public(function)\n\n        self.assertTrue(function.STRONGHOLD_IS_PUBLIC)\n"
  },
  {
    "path": "stronghold/utils.py",
    "content": "def is_view_func_public(func):\n    \"\"\"\n    Returns whether a view is public or not (ie/ has the STRONGHOLD_IS_PUBLIC\n    attribute set)\n    \"\"\"\n    return getattr(func, \"STRONGHOLD_IS_PUBLIC\", False)\n\n\ndef set_view_func_public(func):\n    \"\"\"\n    Set the STRONGHOLD_IS_PUBLIC attribute on a given function to True\n    \"\"\"\n    setattr(func, \"STRONGHOLD_IS_PUBLIC\", True)\n"
  },
  {
    "path": "stronghold/views.py",
    "content": "from django.utils.decorators import method_decorator\nfrom stronghold.decorators import public\n\n\nclass StrongholdPublicMixin(object):\n    @method_decorator(public)\n    def dispatch(self, *args, **kwargs):\n        return super(StrongholdPublicMixin, self).dispatch(*args, **kwargs)\n"
  },
  {
    "path": "test_project/manage.py",
    "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n    os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"test_project.settings\")\n\n    from django.core.management import execute_from_command_line\n\n    execute_from_command_line(sys.argv)\n"
  },
  {
    "path": "test_project/test_project/__init__.py",
    "content": ""
  },
  {
    "path": "test_project/test_project/settings.py",
    "content": "\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n    # ('Your Name', 'your_email@example.com'),\n)\n\nMANAGERS = ADMINS\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': 'test.db',\n        'USER': '',\n        'PASSWORD': '',\n        'HOST': '',\n        'PORT': '',\n    }\n}\n\nTIME_ZONE = 'America/Toronto'\nLANGUAGE_CODE = 'en-us'\nSITE_ID = 1\nUSE_I18N = True\nUSE_L10N = True\nUSE_TZ = True\n\nMEDIA_ROOT = ''\nMEDIA_URL = '/media/'\n\nSTATIC_ROOT = ''\nSTATIC_URL = '/static/'\n\n# Make this unique, and don't share it with anybody.\nSECRET_KEY = 'dq73h&amp;uf%a5p(*ns7*!y&amp;7f=)lnn(#aoax_1$e*j)2ziy9b3^!'\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n    'django.template.loaders.filesystem.Loader',\n    'django.template.loaders.app_directories.Loader',\n    #'django.template.loaders.eggs.Loader',\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    # Uncomment the next line for simple clickjacking protection:\n    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'stronghold.middleware.LoginRequiredMiddleware',\n)\n\nMIDDLEWARE = MIDDLEWARE_CLASSES\n\nROOT_URLCONF = 'test_project.urls'\n\n# Python dotted path to the WSGI application used by Django's runserver.\nWSGI_APPLICATION = 'test_project.wsgi.application'\n\nTEMPLATE_DIRS = (\n)\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    # Uncomment the next line to enable the admin:\n    # 'django.contrib.admin',\n    # Uncomment the next line to enable admin documentation:\n    # 'django.contrib.admindocs',\n    'stronghold',\n)\n\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'filters': {\n        'require_debug_false': {\n            '()': 'django.utils.log.RequireDebugFalse'\n        }\n    },\n    'handlers': {\n        'mail_admins': {\n            'level': 'ERROR',\n            'filters': ['require_debug_false'],\n            'class': 'django.utils.log.AdminEmailHandler'\n        }\n    },\n    'loggers': {\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': True,\n        },\n    }\n}\n"
  },
  {
    "path": "test_project/test_project/urls.py",
    "content": "from django.conf.urls import url\nfrom . import views\n\n\nurlpatterns = [\n    url(r'^protected/$', views.ProtectedView.as_view(), name=\"protected_view\"),\n    url(r'^public/$', views.PublicView.as_view(), name=\"public_view\"),\n    url(r'^public2/$', views.PublicView2.as_view(), name=\"public_view2\"),\n    url(r'^public3/$', views.public_view3, name=\"public_view3\")\n]\n"
  },
  {
    "path": "test_project/test_project/views.py",
    "content": "from django.views.generic import View\nfrom django.http import HttpResponse\nfrom django.utils.decorators import method_decorator\n\nfrom stronghold.decorators import public\nfrom stronghold.views import StrongholdPublicMixin\n\n\nclass ProtectedView(View):\n    \"\"\"A view we want to be private\"\"\"\n    def get(self, request, *args, **kwargs):\n        return HttpResponse(\"ProtectedView\")\n\n\nclass PublicView(View):\n    \"\"\" A view we want to be public\"\"\"\n    @method_decorator(public)\n    def dispatch(self, *args, **kwargs):\n        return super(PublicView, self).dispatch(*args, **kwargs)\n\n    def get(self, request, *args, **kwargs):\n        return HttpResponse(\"PublicView\")\n\nclass PublicView2(StrongholdPublicMixin, View):\n    \"\"\" A view we want to be public, using the StrongholdPublicMixin\"\"\"\n    def get(self, request, *args, **kwargs):\n        return HttpResponse(\"PublicView\")\n\n@public\ndef public_view3(request):\n    \"\"\" A function view we want to be public\"\"\"\n    return HttpResponse(\"PublicView\")"
  },
  {
    "path": "test_project/test_project/wsgi.py",
    "content": "\"\"\"\nWSGI config for test_project project.\nIt exposes the WSGI callable as a module-level variable named ``application``.\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/stable/howto/deployment/wsgi/\n\"\"\"\n\nimport os\n\nfrom django.core.wsgi import get_wsgi_application\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"test_project.settings\")\n\napplication = get_wsgi_application()\n"
  }
]