function Notify()
{
    this.display = true;
    
    var stack_topleft = {'dir1': 'down', 'dir2': 'right', 'push': 'top'};
    var stack_bottomleft = {'dir1': 'right', 'dir2': 'up'};
    var stack_custom = {'dir1': 'right', 'dir2': 'down'};
    var stack_custom2 = {'dir1': 'left', 'dir2': 'up', 'push': 'top'};
    var stack_bottomright = {'dir1': 'up', 'dir2': 'left', 'firstpos1': 15, 'firstpos2': 15};
    //type: info, error, notice, success
    
    var pnotify_opts = {
        addclass: 'stack-bottomleft',
		stack: stack_bottomleft,
		history: false,
		animation: 'slide',
		animate_speed: 'slow',
		width: 'auto',
		delay: 5000,
        styling: 'jqueryui'
    };
    
    this.create = function(type,title,text,sticky)
    {
        var title = (typeof(title) == 'undefined') ? '' : title;
    	var text = (typeof(text) == 'undefined') ? '' : text;
    	var hide = (typeof(sticky) == 'undefined') ? true : !sticky;
        
        pnotify_opts['type'] = type;
        pnotify_opts['hide'] = hide;
        pnotify_opts['nonblock'] = hide;
        pnotify_opts['title'] = title;
    	pnotify_opts['text'] = text;
        
        pnotify_opts['animate_speed'] = 'fast';
        
    	if (this.display) $.pnotify(pnotify_opts);
        this.display = true;
    }    
}

var notify = new Notify();