﻿var notify = function() {
    var visible = false;

    return {
        show: function(html) {
            if (html) {
                $("body").css("margin-top", "2.2em");
                $(".notify span").html(html);
            }

            $(".notify").fadeIn("slow");
            visible = true;
        },

        close: function(doPostback) {
            $.cookie("toc_notify", "true");
            $(".notify").fadeOut("fast");
            $("body").css("margin-top", "0");
            visible = false;
        },

        isVisible: function() { return visible; }

    };
} ();

