﻿function initSubscribeNow() {
    $(function() {
        var subscribeDialog =
            $('#subscribeDialog').dialog({
                autoOpen: false,
                show: 'blind',
                hide: 'blind',
                draggable: false,
                resizable: false,
                modal: true,
                width: 400,
                open: function(type, data) { $(this).parent().appendTo($('#aspnetForm')); }
            });
    });
}

function ShowSubscribeWindow() {
    $('#subscribeDialog').dialog('open');
}

function CloseSubscribeWindow() {
    $('#subscribeDialog').dialog('close');
}

function initSubscribeNowThankYou() {
    $(function() {
        var subscribeDialog =
            $('#subscribeDialogSent').dialog({
                autoOpen: false,
                show: 'blind',
                hide: 'blind',
                draggable: false,
                resizable: false,
                modal: true,
                width: 400,
                open: function(type, data) { $(this).parent().appendTo($('#aspnetForm')); }
            });
    });
}

function ShowSubscribeSentWindow() {
    window.location.hash = "#bottom";
    $('#subscribeDialogSent').dialog('open');
}

function CloseSubscribeSentWindow() {
    $('#subscribeDialogSent').dialog('close');
}

window.CloseSubscribeWindow = CloseSubscribeWindow;
