<!DOCTYPE html>
 {% set html_lang = grav.language.getActive ?: grav.config.site.default_lang %}
<!--[if lt IE 8 ]><html class="no-js ie ie7" lang="{{ html_lang }}"> <![endif]-->
<!--[if IE 8 ]><html class="no-js ie ie8" lang="{{ html_lang }}"> <![endif]-->
<!--[if IE 9 ]><html class="no-js ie ie9" lang="{{ html_lang }}"> <![endif]-->
<!--[if (gte IE 8)|!(IE)]><!--><html class="no-js" lang="{{ html_lang }}"><!--<![endif]-->
<head>
    {% block head %}
        <meta charset="utf-8" />
        <title>{% if header.title %}{{ header.title }} | {% endif %}{{ site.title }}</title>
        {% include 'partials/metadata.html.twig' %}
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="icon" type="image/png" href="{{ theme_url }}/images/favicon.png" />

         {% block stylesheets %}
                {% do assets.addCss('theme://css/default.css') %}
                {% do assets.addCss('theme://css/layout.css') %}
                {% do assets.addCss('theme://css/media-queries.css') %}
                {% do assets.addCss('theme://css/animate.css') %}
                {% do assets.addCss('theme://css/prettyPhoto.css') %}
        {% endblock %}
        <script src="{{ theme_url }}/js/modernizr.js"></script>

        {% block assets deferred %}
            {{ assets.css()|raw }}
        {% endblock %}
    {% endblock head %}
</head>
    <body>

        <div id="preloader">
            <div id="status">
                <img src="{{ theme_url }}/images/preloader.gif" height="64" width="64" alt="">
            </div>
        </div>

        {% block header %}
             {% include 'partials/header.html.twig' %}
        {% endblock %}

        {% block body %}
            {% block content %}{% endblock %}
        {% endblock %}

        {% block footer %}
             {% include 'partials/footer.html.twig' %}
        {% endblock %}

        {% block javascripts %}
            {% do assets.add('jquery',101) %}
            {% do assets.addJs('theme://js/jquery-migrate-1.2.1.min.js') %}
            {% do assets.addJs('theme://js/jquery.flexslider.js') %}
            {% do assets.addJs('theme://js/waypoints.js') %}
            {% do assets.addJs('theme://js/jquery.fittext.js') %}
            {% do assets.addJs('theme://js/jquery.fitvids.js') %}
            {% do assets.addJs('theme://js/imagelightbox.js') %}
            {% do assets.addJs('theme://js/jquery.prettyPhoto.js') %}
            {% do assets.addJs('theme://js/main.js') %}
            
            {{ assets.js()|raw }}
            {{ assets.js('bottom')|raw }} 
        {% endblock %}  
    </body>
</html>
