function adicionarFavoritos(root_path, prod1_cod){
    $.ajax({
        url: root_path + "/ajax/addFavoritos/"+prod1_cod+"/",
        cache: false,
        success: function(html){
            alert(html);
        }
    });
}

function onPessoaChange(elRadio){
    elRadio = $(elRadio);
	
    var $divJuridico    = $('.dados-juridico');
    var $divFisico      = $('.dados-fisico');
	
    if (elRadio.val()=='F'){
        $divFisico.show();
        $divJuridico.hide();
    }else{
        $divFisico.hide();
        $divJuridico.show();
    }
}

function buscarValores(root_path,tipo){
    valorFrete = $("#valor"+tipo).val();

    $.ajax({
        url: root_path + "/ajax/buscarValores/"+valorFrete+"/",
        cache: false,
        success: function(html){
            $("#parcelamento").html(html);
            $("#parcelamento").slideDown('fast');
        }
    });
}

function radioSelect(objName){
    $('#'+objName).attr('checked','checked');
}

function finalizarPedido(){
    if ((document.frmPagamentos.opcaoFrete[0].checked) || (document.frmPagamentos.opcaoFrete[1].checked)){
        document.frmPagamentos.submit();
    }
    else {
        alert('Selecione a opção de frete desejada.');
    }
}