function mostraCarregando() {
	//$('#carregando').style.display = 'block';
}
function escondeCarregando() {
	//$('#carregando').style.display = 'none';
}
var timeout = null;
function mostraMensagemRetorno(mensagem) {
    $("#notify").bar({
        message : mensagem,
        color: "#FFFFFF",
	background_color: "#3c5745"
    });
    $("#notify").click();
}
function escondeMensagemRetorno() {
}

function ajax_link(href, id,  success, failure, confirm, confirmMsg) {
	if (confirm) {
		if (!window.confirm(confirmMsg))
			return;
	}
	var opt = {
    	type: "GET",
        url: href,
	    success: success,
	    failure: failure
	}
	actionid = id;
	mostraCarregando();
    $.ajax(opt);
}

function successAssinatura (t) {
    t = eval(t);
    $("#valorNumeroAssinantes").html(t.numeroAssinantes);
    $("#link_"+t.idToDisable).hide();
    $("#link_"+t.idToEnable).show();
	escondeCarregando();
} 

function failureAssinatura (t) {
	mostraMensagemRetorno("Erro ao seguir usuário");
	escondeCarregando();
}

function mostraDiv(div) {
    $("#"+div).show();
}
function escondeDiv(div) {
    $("#"+div).hide();
}

