<script>
    {% if display %}
        function setCookie(name, value) {
            document.cookie = name + "=" + value + "; path=/";
        }

        $(function () {
            $('#django-whatsnew').bPopup({
                speed: 450,
                transition: 'slideDown'
            });
            $('#whatsnew-seen').click(function(){
                setCookie('{{ name }}', '{{ news.version }}')
            });
        });
    {% endif %}
</script>
{% block content %}
{% endblock content %}

