{% extends "frog/gallery.html" %}
<script>
    {% block script %}
    window.addEvent('domready', function() {
        var 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>