$.Alerta = function () {
	
	this.mostrar = function(msg, erro) {
		erro = erro.toString();
		if (typeof erro == "undefined" || erro=="true") {
			url = 'divopen-alerta?msg='+msg+'&icone=erro';
		} else {
			url = 'divopen-alerta?msg='+msg+'&icone=sucesso';
		}
		
		$.fancybox({
			url: url,
			frameWidth			:	684,
			frameHeight			:	236
		});
	};

};

var $objAlerta;

(function($) {
	$objAlerta = new $.Alerta();
})(jQuery);
