<!DOCTYPE html>

{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}

{%- macro relbar(bottom=False) %}
{%- endmacro %}

{%- macro sidebar() %}
    {%- if render_sidebar %}
        <div class="sphinxsidebar">
            <div class="sphinxsidebarwrapper">
                {%- if sidebars != None %}
                    {#- new style sidebar: explicitly include/exclude templates #}
                    {%- for sidebartemplate in sidebars %}
                        {%- include sidebartemplate %}
                    {%- endfor %}
                {%- else %}
                    {#- old style sidebars: using blocks -- should be deprecated #}
                    {%- block sidebartoc %}
                        {%- include "localtoc.html" %}
                    {%- endblock %}
                    {%- block sidebarrel %}
                        {%- include "relations.html" %}
                    {%- endblock %}
                    {%- block sidebarsourcelink %}
                        {%- include "sourcelink.html" %}
                    {%- endblock %}
                    {%- if customsidebar %}
                        {%- include customsidebar %}
                    {%- endif %}
                {%- endif %}
            </div>
        </div>
    {%- endif %}
{%- endmacro -%}

{%- macro seachbox() %}
    {%- if pagename != "search" %}
        <form class="navbar-search" action="{{ pathto('search') }}"
              method="get">
            <input type="text" name="q" placeholder="search"/>
            <input type="hidden" name="check_keywords" value="yes"/>
            <input type="hidden" name="area" value="default"/>
        </form>
    {%- endif %}
{%- endmacro -%}

<html>
<head>
    <meta http-equiv="Content-Type"
          content="text/html; charset={{ encoding }}"/>
    {{ metatags }}
    {%- if not embedded and docstitle %}
        {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
    {%- else %}
        {%- set titlesuffix = "" %}
    {%- endif %}
    {%- block htmltitle %}
        <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
    {%- endblock %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href='http://fonts.googleapis.com/css?family=Crete+Round' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css"/>
    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css"/>
    {%- for cssfile in css_files %}
        <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css"/>
    {%- endfor %}
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    {%- if not embedded %}
        <script type="text/javascript">
            var DOCUMENTATION_OPTIONS = {
                URL_ROOT:'{{ url_root }}',
                VERSION:'{{ release|e }}',
                COLLAPSE_INDEX:false,
                FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
                HAS_SOURCE:  {{ has_source|lower }}
            };
        </script>
        {%- for scriptfile in script_files + ["_static/bootstrap-dropdown.js"] %}
            <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
        {%- endfor %}

        {%- if use_opensearch %}
            <link rel="search" type="application/opensearchdescription+xml"
                  title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
                  href="{{ pathto('_static/opensearch.xml', 1) }}"/>
        {%- endif %}
        {%- if favicon %}
            <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
        {%- endif %}
    {%- endif %}

    {%- block extrahead %} {% endblock %}
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
    {% if theme_analytics_code %}
        <!-- analytics -->
        <script type="text/javascript">
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', '{{ theme_analytics_code }}']);
            {% if theme_analytics_domain %}
                _gaq.push(['_setDomainName', '{{ theme_analytics_domain }}']);
            {% endif %}
            _gaq.push(['_trackPageview']);

            (function () {
                var ga = document.createElement('script');
                ga.type = 'text/javascript';
                ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(ga, s);
            })();
        </script>
    {% endif %}
</head>
<body>


{%- block header %}

    <div class="navbar navbar-static-top">
        <div class="navbar-inner">
            <div class="container">

                {%- block headerlogo %}
                    {%- if logo %}
                        <a href="{{ pathto('index') }}">
                            <img class="logo" src="{{ pathto('_static/' + logo, 1) }}"
                            {% if theme_logo_width %} width="{{ theme_logo_width }}"{% endif %}
                            {% if theme_logo_height %} height="{{ theme_logo_height }}"{% endif %}
                            alt="{{ project|e }}" title="{{ project|e }}"/>
                        </a>
                    {%- else %}
{#                        <a class="brand" href="./index.html">Bootstrap</a>#}
                    {%- endif %}
                {%- endblock %}

                {%- block relbar1 %}{{ relbar() }}{% endblock %}


                <ul class="quick-links">
                    <li>
                        <a href="{{ pathto('docs') }}" title="Documentation">Docs</a> 
                    </li>
                    <li class="divider">&middot;</li>
                    <li>
                        <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}/">github</a>
                    </li>
                    <li class="divider">&middot;</li>
                    <li>
                        <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}/issues">Bugs</a>
                    </li>
                    <li class="divider">&middot;</li>
                    <li>
                        <a href="{{ pathto('faq') }}" title="FAQ">FAQ</a> 
                    </li>
                    <li class="divider">&middot;</li>

                    <li>
                        <a href="{{ pathto('download') }}" title="Home">Download</a>
                    </li>
                    <li class="divider">&middot;</li>

                    <li>
                        <a href="{{ pathto('community') }}" title="Mailing Lists">Mailing Lists</a>
                    </li>

                </ul>

            </div>
        </div>
    </div>
{% endblock %}

{%- block content %}
    {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
    <div class="container">
        <div class="content row">
            {%- block document %}
                <div class="span9">
                    {% block body %} {% endblock %}
                    {% if theme_disqus_shortname %}
                        <div id="disqus_thread"></div>
                        <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
                    {% endif %}
                </div>
            {%- endblock %}
            {%- block sidebar2 %}
                <div class="span3">
                    {{ sidebar() }}
                </div>
            {% endblock %}
        </div>
    </div>
{%- endblock %}

{%- block footer %}
    <div class="footer">
        {#        {%- block relbar2 %}{{ relbar(bottom=True) }}{% endblock %}#}
        <div class="container">
            {%- if show_copyright %}
                {%- if hasdoc('copyright') %}
                    {% trans path=pathto('copyright'), copyright=copyright|e %}&copy;
                        <a href="{{ path }}">Copyright</a> {{ copyright }}
                        .{% endtrans %}
                {%- else %}
                    {% trans copyright=copyright|e %}&copy;
                        Copyright {{ copyright }}.{% endtrans %}
                {%- endif %}
            {%- endif %}
            {%- if last_updated %}
                {% trans last_updated=last_updated|e %}Last updated
                    on {{ last_updated }}.{% endtrans %}
            {%- endif %}
        </div>
    </div>
{%- endblock %}

{% if theme_disqus_shortname %}
    <!-- disqus -->
    <script type="text/javascript">
        var disqus_title = '{{ title|striptags|e }}{{ titlesuffix }}';
        var disqus_identifier ='code' + '.' + "{{ theme_disqus_shortname }}" + window.location.pathname.replace('/', '.');
    </script>

    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = "{{ theme_disqus_shortname }}"; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
{% endif %}

<script type="text/javascript">
    $('.nav .active').on('click', function () {
        e.preventDefault()
        $(this).siblings().toggle()
    });
</script>

<!-- plusone -->
<script type="text/javascript">
    (function () {
        var po = document.createElement('script');
        po.type = 'text/javascript';
        po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(po, s);
    })();
</script>

<!-- twitter -->
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>

</body>
</html>
