/**
 * This is a Notification wrapper for jGrowl.
 */

Notification = ( function($) {
	var self = {};

	self.success = function(message, options) {
		jOptions = {
				theme :'success'
		};
		if (undefined != options) {
			if (undefined != options.theme) {
				jOptions.theme += (' ' + options.theme);
			}
		}
		$.jGrowl(message, jOptions);
	};
	
	self.error = function(message, options) {
		jOptions = {
			theme :'error'
		};
		if (undefined != options) {
			if (undefined != options.theme) {
				jOptions.theme += (' ' + options.theme);
			}
		}
		$.jGrowl(message, jOptions);
	};

	self.warning = function(message, options) {
		jOptions = {
				theme :'error'
		};
		if (undefined != options) {
			if (undefined != options.theme) {
				jOptions.theme += (' ' + options.theme);
			}
		}
		$.jGrowl(message, jOptions);
	};
	
	return self;
})(jQuery);