{% load i18n %}
<!doctype html>
<html lang="{% if lang %}{{lang|slice:':2'}}{% else %}{{LANGUAGE_CODE|slice:':2'}}{% endif %}">
    <head>
    {% block head %}
    	<meta charset="UTF-8" />
        <link rel="SHORTCUT ICON" href="{{STATIC_URL}}jocondelab/img/favicon.ico" />
        <title>{% block title %}JocondeLab{% endblock %}</title>
        
        {% block js_import %}
        <script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
        <script type="text/javascript" src="{{STATIC_URL}}jocondelab/lib/underscore-min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}jocondelab/lib/jquery.min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}jocondelab/lib/jquery-ui.min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}jocondelab/lib/tag-it.min.js"></script>
        {% endblock %}
        
        {% block css_import %}
        <link rel="stylesheet" href="{{STATIC_URL}}jocondelab/css/smoothness/jquery-ui-1.10.3.custom.min.css" type="text/css"/>
        <link rel="stylesheet" href="{{STATIC_URL}}jocondelab/lib/jquery.tagit.css" type="text/css"/>
        {% endblock %}
        
        {% block css_declaration %}
        <link rel="stylesheet" href="{{STATIC_URL}}jocondelab/css/front-common.css" type="text/css"/>
        {% endblock %}
        
        {% block js_declaration %}
        <script type="text/javascript">
            var urls = {
                ajax_terms: "{% url 'ajax_terms' %}",
                ajax_search: "{% url 'front_search' %}"
            };
        </script>
        <script type="text/javascript" src="{{STATIC_URL}}jocondelab/js/front-common.js"></script>
        {% endblock %}
        
    {% endblock %}
    </head>
    <body>
    {% block body %}
        <div class="header-wrapper">
            <header>
                {% block header %}
                    <div class="main-title">
                        <h1><a href="{% url 'front_search' %}">Joconde<span class="title-lab">Lab</span></a></h1>
                        <h2 class="breadcrumbs">{% block breadcrumbs %}{% endblock %}</h2>
                    </div>
                    {% block header_search %}
                    <form class="header-search-form search-form" action="{% url 'front_search' %}">
                        <input class="header-search-input search-input" type="search" name="q" placeholder="{% trans 'Search in contents' %}" />
                    </form>
                    {% endblock %}
                    <ul class="menu-links">
                        <li class="menu-link"><a href="#main-menu">{% trans 'Menu' %}</a></li>
                        <li class="menu-link"><a href="#language-menu">{% trans 'Change language' %}</a></li>
                    </ul>
                {% endblock %}
            </header>
        </div>
        <form class="language-form" action="{% url 'django.views.i18n.set_language' %}" method="post">
            {% csrf_token %}
            <input class="language-input" type="hidden" name="language" value="{% if lang %}{{lang|slice:':2'}}{% else %}{{LANGUAGE_CODE|slice:':2'}}{% endif %}" />
        </form>
        <div class="menus-wrapper">
            <ul class="menu-list" id="main-menu">
                <li class="menu-item">
                    <a href="{% url 'front_search' %}">{% trans 'Multilingual search' %}</a>
                </li>
                <li class="menu-item">
                    <a href="{% url 'front_timeline' %}">{% trans 'Timeline' %}</a>
                </li>
                <li class="menu-item">
                    <a href="{% url 'front_geo' %}">{% trans 'World map' %}</a>
                </li>
            </ul>
            <ul class="menu-list" id="language-menu">
            {% get_language_info_list for LANGUAGES as languages %}
            {% for language in languages %}
                <li class="menu-item">
                    <a href="#" data-language-code="{{ language.code }}">{{ language.name_local }}</a>
                </li>
            {% endfor %}
            </ul>
        </div>
        <div class="main-wrapper">
            <section class="main">
                {% block main %}
                {% endblock %}
            </section>
            <footer>
            {% block footer %}
                <p>&copy; 2013 Institut de Recherche et d'Innovation et Ministère de la Culture et de la Communication</p>
            {% endblock %}
            </footer>
        </div>
        <div class="dbpedia-overlay clearfix">
            <img />
            <h2></h2>
            <p class="dbpedia-abstract"></p>
            <p class="dbpedia-source"><a href="#" target="_blank">{% trans 'Source: Wikipedia' %}</a></p>
        </div>
    {% endblock %}
    </body>
</html>
