$("#frmCareer").submit(function (e) {
    var isValid = $(this).valid();
    if (isValid) {
        var isValidCaptcha = grecaptcha.getResponse();
        if (isValidCaptcha == null || isValidCaptcha == "") {
            toastr.error("Please verify that you are human");
            return false;
        }
        else {
            $(this).submit();
            return true;
        }

    }
    else {
        return false;
    }
});

$("#Resume").change(function () {
    var f = this.files[0]
    var fileExtension = ['doc', 'docx', 'pdf', 'txt'];
    if ($.inArray($(this).val().split('.').pop().toLowerCase(), fileExtension) == -1) {
        toastr.error("Please upload file only " + fileExtension.join(', ') + " format");
        $(this).val("");
        return false;
    }
    if (f.size > 5288608 || f.fileSize > 5288608) {
        $(this).val("");
        toastr.error("Allowed file size exceeded. (Max. 5 MB)");
        return false;
    }
})
$("#NoticePeriod").inputFilter(function (value) {
    return /^\d*$/.test(value);
});
$("#AnnualSalary").inputFilter(function (value) {
    return /^\d*$/.test(value);
});
$(document).ready(function () {
    $("#Name").val("");
    $("#Email").val("");
    $("#ContactNo").val("");
    $("#NoticePeriod").val("");
    $("#CurrentOrganization").val("");
    $("#WorkExp").val("Fresher");
    $("#AreaExpertise").val("BPS");
    $("#Resume").val("");
    $("#AnnualSalary").val("");
});
