<?= $this->doctype('HTML5') ?>
<html lang="<?php echo $this->lang ?>">
    <head>
        <meta charset="UTF-8">
        <?php echo $this->headTitle() ?>
        <?php echo $this->headMeta() ?>
        <link rel="icon" href="/favicon.ico" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="/website/views/layouts/library/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/website/views/layouts/css/style.css" rel="stylesheet" media="screen">
        <link href="/website/views/layouts/css/lightbox.css" rel="stylesheet" />
        <?php echo $this->headLink() ?>

        <!--[if lte IE 8]><link rel="stylesheet" href="/website/views/layouts/css/ie.css" media="screen"><![endif]-->
        <link rel="icon" href="images/favicon.png" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" ></script>

        <script type="text/javascript"> var getsmily_id="7e1dacwmlr18us2";var getsmily_lang = "fr";(function(d){var gs=d.createElement("script");var gsf=d.getElementsByTagName("script")[0];gs.async=1;gs.src="https://cdn.getsmily.com/emolytics/script/emolytics-widget.js";gsf.parentNode.insertBefore(gs,gsf);})(document);</script>

        <?php echo $this->headScript() ?>
    </head>
    <body class="<?php echo $this->lang ?>  <?= $this->document->key ?>">
    <div id="container">
        <?= $this->inc('/snippets/top',  array('lang' => $this->lang)) ?>
        <?= $this->inc('/snippets/header-accueil',  array('lang' => $this->lang)); ?>

        <?= $this->layout()->content; ?>
    </div>

    <?= $this->inc('/snippets/footer',  array('lang' => $this->lang)); ?>

    <script type="text/javascript">
        $(document).ready(function() {
            $(".lang-dropdown img.flag").addClass("flagvisibility");

            $(".lang-dropdown dt a").click(function() {
                $(".lang-dropdown dd ul").toggle();
            });

            $(".lang-dropdown dd ul li a").click(function() {
                var text = $(this).html();
                $(".lang-dropdown dt a span").html(text);
                $(".lang-dropdown dd ul").hide();
            });

            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("lang-dropdown"))
                    $(".lang-dropdown dd ul").hide();
            });


            $("#flagSwitcher").click(function() {
                $(".lang-dropdown img.flag").toggleClass("flagvisibility");
            });
        });

    </script>
    </body>

</html>