{% raw %}
{% load wagtailcore_tags compress static wagtailuserbar core_tags i18n %}
{% load wagtailsettings_tags wagtailimages_tags %}
{% get_settings %}


<!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" />
        <title>{% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock %}{% block title_suffix %}{% endblock %}</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta property="og:title" content="" />
        <meta property="og:description" content="" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        {% compress css %}
            <link rel="stylesheet" type="text/x-scss" href="{% static 'css/style.scss' %}">
        {% endcompress %}

        {% block extra_css %}
        {% endblock %}

        <script type="text/javascript">
          WebFontConfig = {
            google: { families: [ 'Exo+2:400,700:latin' ] }
          };
          (function() {
            var wf = document.createElement('script');
            wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
              '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
            wf.type = 'text/javascript';
            wf.async = 'true';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(wf, s);
          })();

          /*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */
        function loadJS( src, cb ){
          "use strict";
          var ref = window.document.getElementsByTagName( "script" )[ 0 ];
          var script = window.document.createElement( "script" );
          script.src = src;
          script.async = true;
          ref.parentNode.insertBefore( script, ref );
          if (cb && typeof(cb) === "function") {
            script.onload = cb;
          }
          return script;
        }

        // cut the mustard
        if('querySelector' in document && 'localStorage' in window && 'addEventListener' in window) {
          loadJS( "{% static 'js/main.js' %}" );
        }
        </script>

        <!-- this section should always be last in the head -->
        {% compress css file enhanced %}
          <link rel="stylesheet" type="text/x-scss" href="{% static 'css/enhanced.scss' %}">
        {% endcompress %}

    </head>

    <body class="{% block body_class %}{% endblock %}">

        {% wagtailuserbar %}


        <div class="logo">
        {% if languages %}
          {% if settings.core.SiteSettings.logo %}
            {% image settings.core.SiteSettings.logo height-30 %}
          {% endif %}

          {% trans "Site Language:" %}
          {% for language in languages %}
            <a href="{% url 'locale_set' language.code %}">{{language.title}} </a>
          {% endfor %}
        {% endif %}
        </div>

        {% breadcrumbs %}

        {% block content %}{% endblock %}

        {% block extra_js %}
        {% endblock %}

        {% block search %}
          {% if languages %}
            {% include "search/search_block.html" %}
          {% endif %}
        {% endblock %}

        {% block footer %}
        {% if language_page.footers %}
          <ul>
          {% for page in language_page.footers %}
          <li><a href="{% pageurl page %}">{{page.title}}</a></li>
          {% endfor %}
          </ul>
        {% endif %}
        {% endblock %}
    </body>
</html>
{% endraw %}
