(function() {
    var config = {
        active: false,
        message: "This website will undergo server maintenance from 5th Dec 2020 10:00pm to 6th Dec 2020 2:00am (GMT +11). There will be no access during this period. We apologise for any inconvenience."

    };

    var initNotification = function() {
        if (readCookie('disableNotification') !== 'true') {
          var container=$("#container");
            container.notify({
                speed: 500,
                expires: false,
                close: function() {
                    createCookie('disableNotification', 'true');
                    $('.sectionFooter').css('margin-bottom','0px').css('bottom','0');
                    //$('.sectionFooter').slideDown(1000, function(){ $(this).css('margin-bottom','0px'); });
                }
            });

            container.notify("create", {
                title: 'Notification',
                text: config.message
            }, {
                sticky: true
            });
            container.css("bottom","0px");
            container.css("top","auto");
            container.css("top","initial");
            container.css("right","initial");
            container.css("left","0px");
            container.css("width","100%");
            $('.sectionFooter').css('margin-bottom',container.height()).css('bottom',container.height()*-1);
            $(window).resize(function(){ $('.sectionFooter').css('margin-bottom',container.height()).css('bottom',container.height()*-1); });
            //container.css("margin","10px");
        }
    }

    if (config.active && !(/bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent))) {
        $(function() {
            initNotification();
        });
    } else if (readCookie('disableNotification')) {
      eraseCookie('disableNotification');
    }
})()
