jQuery.chamar = function(type, url, ok) {
    $.ajax({
        error: function(XMLHttpRequest, textStatus, errorThrown) {
            alert("Ocorreu o seguinte erro no processamento: " + textStatus + " " + errorThrown);
        },
        success: function(response) {
            ok(response);
        },
        timeout: 60000,
        type: type,
        url: url
    });
};

jQuery.fn.formatarCEP = function(){
    var cep = this.text();
    if(cep.length < 8){
        cep = "0" + cep;
    }
    return cep.substring(0, 5) + "-" + cep.substring(5);
}
