{% extends "frog/gallery.html" %}
<script>
    {% block script %}
    var viewer;
    window.addEvent('domready', function() {
        viewer = new Frog.Viewer();
        viewer.addEvent('hide', function() {
            location.href = '/frog/gallery/1';
        });
        var img = JSON.parse('{{object.serialize|safe}}');
        viewer.show();
        viewer.setImages([img]);
    });
    {% endblock %}
</script>