
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
                         (sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
  {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
  {%- set titlesuffix = "" %}
{%- endif %}

{%- macro script() %}
    <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 %}
    <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
    {%- endfor %}
{%- endmacro %}

{%- macro 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 %}
{%- endmacro %}




{%- macro sidebar() %}
    <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 %}
            {%- if customsidebar %}
                {%- include customsidebar %}
            {%- endif %}
            {%- block sidebarsearch %}
                {%- include "searchbox.html" %}
            {%- endblock %}
        {%- endif %}
    </div>
{%- endmacro %}



<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        {{ metatags }}

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


        <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>


        {%- if hasdoc('about') %}
        <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
        {%- endif %}
        {%- if hasdoc('genindex') %}
        <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
        {%- endif %}
        {%- if hasdoc('search') %}
        <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
        {%- endif %}
        {%- if hasdoc('copyright') %}
        <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
        {%- endif %}
        <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
        {%- if parents %}
        <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
        {%- endif %}
        {%- if next %}
        <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
        {%- endif %}
        {%- if prev %}
        <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
        {%- endif %}

        <!-- Use the .htaccess and remove these lines to avoid edge case issues.
             More info: h5bp.com/i/378 -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <meta name="description" content="">

        <!-- Mobile viewport optimized: h5bp.com/viewport -->
        <meta name="viewport" content="width=device-width">

        <!-- Le styles -->
        <link href="{{ pathto('_static/less/bootstrap.less', 1) }}" rel="stylesheet/less">
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
        </style>
        <!-- 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]-->

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->

        <link rel="stylesheet" href="{{ pathto('_static/style.css', 1) }}">

        <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->

        <!-- All JavaScript at the bottom, except this Modernizr build.
             Modernizr enables HTML5 elements & feature detects for optimal performance.
             Create your own custom Modernizr build: www.modernizr.com/download/ -->
        <script src="{{ pathto('_static/js/modernizr-2.5.3.min.js', 1) }}"></script>
        <script src="{{ pathto('_static/js/less-1.3.0.min.js', 1) }}" type="text/javascript"></script>

        <link rel="stylesheet" href="{{ pathto('_static/bootstrapCustom.css', 1) }}">
        <link rel="stylesheet" href="{{ pathto('_static/main.css', 1) }}">
    </head>
    <body>
        <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
             chromium.org/developers/how-tos/chrome-frame-getting-started -->
        <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->


        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="brand" href="{{ pathto(master_doc) }}">{{ project }} documentation</a>
                    <div class="nav-collapse" id="navigation" class="related">
                        {{ toctree(collapse=True, maxdepth=1, titles_only=False) }}
                        <ul class="nav">
                            <li class="divider-vertical"></li>
                            <li>
                                <a target="_blank" href="_static/API/">API</a>
                            </li>
                        </ul>
                    </div>
                    <ul class="nav pull-right">
                        
                        <li class="divider-vertical"></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                Phraseanet Libraries
                                <b class="caret"></b>
                                </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="http://phraseanet.github.com/" target="_blank">Phraseanet.github.com</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
                {% include "ribbon.html" %}
            </div>
        </div>
        <div role="main" class="container">

            <div class="row-fluid">
                <div class="span4">
                    <div style="width:160px;margin:0 auto">
                        <img style="width:100%;margin:20px 0;" src="{{ pathto('_static/img/project.png', 1) }}"/>
                    </div>
                	{{ sidebar() }}
                </div>
                <div class="span8">
                    {%- if prev == None %}
                        <div class="hero-unit">
                            <h1>{{ project }} documentation</h1>
                            <p>
                                <!-- Your subtitle here-->
                            </p>
                        </div>
                    {%- endif %}
                    {{ body }}
                </div>
            </div>
        </div>
        {%- block footer %}
        <hr/>
        <footer 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 %}
            {%- if show_sphinx %}
            {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
            {%- endif %}
        </footer>
{%- endblock %}


        <!-- JavaScript at the bottom for fast page loading -->


        <!-- scripts concatenated and minified via build script -->
        <script src="{{ pathto('_static/js/plugins.js', 1) }}"></script>
        <script src="{{ pathto('_static/js/bootstrap.min.js', 1) }}"></script>
        <script src="{{ pathto('_static/js/script.js', 1) }}"></script>
        <!-- end scripts -->

        <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
             mathiasbynens.be/notes/async-analytics-snippet -->

        {{ script() }}

        {% include "analytics.html" %}
    </body>
</html>
