﻿function Notification(notificationId) {
    this.$notificationPanel = $('#' + notificationId);
}

Notification.prototype.setMessage = function(message) {
    this.$notificationPanel.children("span").text(message);
}

Notification.prototype.SetError = function(message) {
    this.setMessage(message);
    this.$notificationPanel[0].className = "notification-error";
    this.Show();
}

Notification.prototype.SetSuccess = function(message) {
    this.setMessage(message);
    this.$notificationPanel[0].className = "notification-success";
    this.Show();
}

Notification.prototype.SetNotification = function(message) {
    this.setMessage(message);
    this.$notificationPanel[0].className = "notification";
    this.Show();
}

Notification.prototype.Hide = function() {
    this.$notificationPanel.hide();
}

Notification.prototype.Show = function() {
    this.$notificationPanel.show();
}
