<!doctype html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <title>{{object.title}}</title>
        <meta name="description" content="">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
        <link id="page_favicon" href="{{MEDIA_URL}}frog/i/favicon.ico" rel="icon" type="image/x-icon" />
        <link rel="stylesheet" href="{{MEDIA_URL}}frog/c/ext-all-gray.css">
        <link rel="stylesheet" href="{{MEDIA_URL}}frog/c/style.css?b={{build}}">
        {% for stylesheet in plugins.css%}
        <link rel="stylesheet" href="{{MEDIA_URL}}{{stylesheet}}">
        {% endfor %}
        <!--[if gte IE 9]>
          <style type="text/css">
            .gradient {
               filter: none;
            }
          </style>
        <![endif]-->

        <script src="{{MEDIA_URL}}frog/j/libs/modernizr-2.5.3.min.js"></script>
        <script src="{{MEDIA_URL}}frog/j/ext-all.js"></script>
        <script src="{{MEDIA_URL}}frog/j/mootoolsCore.js"></script>

        <script>
            {% block script %}
            window.addEvent('domready', function() {
                Frog.StaticRoot = '{{MEDIA_URL}}';

                {% if object.security < 2 %}
                Frog.GalleryObject = new Frog.Gallery(undefined, {{object.id}}, {
                    upload: {{object.uploads|yesno:'true,false'}}{% if plugins.altclick %},
                    altclick: {{plugins.altclick}}{% endif %}
                });
                {% elif object.security == 2 %}
                    {% if user == object.owner %}
                Frog.GalleryObject = new Frog.Gallery(undefined, {{object.id}}, {
                    upload: {{object.uploads|yesno:'true,false'}}{% if plugins.altclick %},
                    altclick: {{plugins.altclick}}{% endif %}
                });
                    {% endif %}
                {% endif %}
                {% for button in plugins.buttons %}
                Frog.UI.addTool(
                    '{{button.0}}',
                    '{{MEDIA_URL}}{{button.1}}',
                    {{button.2}}
                );
                {% endfor %}
            });
            {% endblock %}
        </script>
    </head>
    <body>
        {% block content %}
        <div id="main">
            {% if object.security == 2 and user != object.owner %}
            <div style='width: 500px;margin: 300px auto;text-align: center;'>
                <h1>Access Denied</h1>
                <h3>This gallery is private and can only be viewed by it's owner</h3>
            </div>
            {% endif %}
        </div>
        {% endblock %}
        <!-- JavaScript at the bottom for fast page loading -->
        <script src="{{MEDIA_URL}}frog/j/mootoolsMore.js"></script>

        <!--<script src="{{MEDIA_URL}}frog/j/libs/plupload.js"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/plupload.html5.js"></script>-->
        <script src="{{MEDIA_URL}}frog/j/libs/plupload.full.min.js"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/Meio.Autocomplete.min.js"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/sylvester.js"></script>

        <!-- scripts concatenated and minified via build script -->
        <script src="{{MEDIA_URL}}frog/j/libs/frog.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.observer.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.thumbnail.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.viewer.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.queryBuilder.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.uploader.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.ui.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/frog.gallery.js?b={{build}}"></script>
        <script src="{{MEDIA_URL}}frog/j/libs/selection.js?b={{build}}"></script>

        <script src="{{MEDIA_URL}}frog/j/plugins.js"></script>
        <script src="{{MEDIA_URL}}frog/j/script.js"></script>

        {% for script in plugins.js%}
        <script src="{{MEDIA_URL}}{{script}}"></script>
        {% endfor %}
        <!-- end scripts -->
    </body>
</html>
