Initialiser.modules.notifications = function(){
  
  window.safe = window.safe || {};
  
  var $banner;
  
  safe.showNotificationBar = function(message, options){
    
    defaults = {
      barId: 'notificationBanner',
      additionalClasses: ''
    }
    
    var opts = $.extend({}, defaults, options);
    
    //Hide any existing bar:
    if ($banner) {safe.hideNotificationBar();}
    
    //Check if the user has closed the bar previously:
    if (!$.cookie('hideNotificationBanner_' + opts.barId)) {
    
      $banner = $('<div id="' + opts.barId + '" class="globalTopBar ' + opts.additionalClasses + '"><div class="liner">' + message + '</div><span class="closeWidget">Close</span></div>');
        
        $banner.find('.closeWidget').click(function(){
          $.cookie('hideNotificationBanner_' + opts.barId, true);
          safe.hideNotificationBar();
        });
        
        $banner.prependTo('body');
        
         setTimeout(function(){
           $banner.animate({'height': '32px'}, 200, 'easeOutBack', function(){
             $('body').addClass('globalTopBarActive');
             $banner.find('.logo').animate({'top':0}, 400, 'easeOutBack');
           });
         }, 1000);
         
    }
  }
  
  safe.hideNotificationBar = function(){
     $('body').removeClass('globalTopBarActive');
     $banner.remove();
  }
}
