
ml.cNotifier = function() {
	
};

ml.cNotifier.prototype.globalInfo = function(message) {
	j.jGrowl(message);
};

ml.cNotifier.prototype.globalError = function(message) {
	j.jGrowl(message, { header: 'Hiba történt!', theme:'error'});
};

ml.cNotifier.prototype.local = function(dom_id, message, divclass, delay) {
	if ( typeof(delay) == 'undefined' ) delay = 0;
	var noti = j('#'+dom_id);
	noti.clearQueue();
	noti.removeClass().addClass('ml-notifier').addClass(divclass).html(message).hide().fadeTo('slow', 1);
	if ( delay>0 ) {
		noti.delay(delay*1000).fadeTo('slow',0);
	}
};

ml.cNotifier.prototype.localRemove = function(dom_id) {
	j('#'+dom_id).removeClass().addClass('ml-notifier').html('').hide();
};

ml.Notifier = new ml.cNotifier();
