<div class="modal-content">
    <div id="wa-unauthorized">
        <h1>Unauthorized</h1>
    </div>
</div>
<script>

    (function ($) {

        window.modals = window.modals || []

        if (window.modals.wa_unauthorized === undefined)
        {
            window.modals.wa_unauthorized = new jBox('Modal', {
            closeButton: 'box',
            content: $('#wa-unauthorized'),
            maxWidth: 650,
            minWidth: 100,
            minHeight: 100,
            width: 650,
            addClass: ''
        }).open();
        } else {
            window.modals.wa_unauthorized.content.empty();
            window.modals.wa_unauthorized.setContent($('#wa-unauthorized')).open();
        }

    })(jQuery);
</script>