﻿$(document).ready(function () {



    $("#btn_submit_form_epractice").click(function () {

        var sucesso = true;

        document.getElementById('matricula').className = 'campotxt';
        document.getElementById('senha').className = 'campotxt';

        if (EmptyField(document.getElementById('matricula'))) {
            sucesso = false;
            document.getElementById('matricula').className += ' error';
        }
        if (EmptyField(document.getElementById('senha'))) {
            sucesso = false;
            document.getElementById('senha').className += ' error';
        }

        if (!sucesso) {
            alert('Alguns campos não foram preenchidos da forma devida para entrar no E-pr@ctice. Por favor, verifique os campos marcados em vermelho.');
            return false;
        } else {

            $('#lg_matricula_epractice').val($("#matricula").val());
            $("#lg_senha_epractice").val($("#senha").val());

            document.getElementById('form_login_epractice_post').submit();
        }

    });


    $("#topo .menu li ul").each(function () {
        $(this).children(":first").children().css("border-top", "none");
    });

    $("#topo .menu li ul").each(function () {
        $(this).children(":last").children().css("border-bottom", "none");
    });


});





