<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>{% block title %}{{ page_title|default(_('Project')) }}{% endblock %} - Project</title>
    <meta name="description" content="Internet-In-A-Box Project Gutenberg">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <link rel="Shortcut Icon" href="{{ url_for('static', filename='favicon.png') }}" type="image/x-icon">

    {% block css %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-responsive.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/ui-lightness/jquery-ui-1.10.1.custom.min.css') }}">
    {% endblock %}

    {% block css_style %}
    {% endblock %}

    {% block js_top %}
    <script src="{{ url_for('static', filename='js/vendor/modernizr-2.6.2.min.js') }}"></script>
    {% endblock %}
</head>
<body>
    {% include "macros/_ask_user_to_update_ie.html" %}

    {% block topbar %}
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                {% block topbar_content %}
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>

                <a class='brand' href='{{ url_for('top_views.index') }}'>{{ _("Home") }}</a>
                <a class='brand' href='{{ url_for('gutenberg.index') }}'>{{ _("Books") }}</a>
                {% endblock %}
            </div>
        </div>
    </div>
    {% endblock %}

    {% from 'macros/_misc.html' import render_flash_message %}
    {{ render_flash_message() }}

    {% block container %}
    <div class="container">

        {% block top %}
            <ul class="nav nav-pills">
                {% for tab, link in tabs %}
                <li class="{% if active == tab %}active{% endif %}">
                    <a href="{{ link }}">{{ tab|capitalize }}</a>
                </li>
                {% endfor %}
            </ul>
        {% endblock %}

        {% block body %}
        {% endblock %}

    </div>
    {% endblock %}

    {% block footer %}
    {% include "macros/_footer.html" %}
    {% endblock %}

    {% block js_btm %}
    {#
    <!--
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    -->
    #}
    {% set jquery_path = url_for('static', filename='js/vendor/jquery-1.8.3.min.js') %}
    {#<script>window.jQuery || document.write('<script src="{{ jquery_path }}"><\/script>')</script>#}
    <script src="{{ jquery_path }}"></script>
    <script src="{{ url_for('static', filename='js/plugins.js') }}"></script>
    <script src="{{ url_for('static', filename='js/vendor/bootstrap.js') }}"></script>
    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
    <script src="{{ url_for('static', filename='js/vendor/jquery-ui-1.10.1.custom.min.js') }}"></script>

    {% from 'macros/_autocomplete.js' import attach_autocomplete %}
    {{ attach_autocomplete('#book_search', url_for('gutenberg.autocomplete')) | safe }}
    {% endblock %}

    {% block ga %}
    {% include "macros/_google_analytics.html" %}
    {% endblock %}
</body>
</html>
