<commit_before>
//******************/
//****  FORMS   ****/
//******************/
(function () {

    var form = $('form'),
        notices = $('form .notices'),
        $inputs = $('form :input'),
        values = {},
        request;

    $('form').h5Validate({
        errorClass: 'invalid',
        validClass: 'valid',
        focusout: true,
        focusin: false,
        change: false,
        keyup: false
    });

    $('input').focus(function (event) {
        $(this).removeClass('invalid valid');
        $(this).siblings('.help').show();
    });

    $('input').blur(function (event) {
        $(this).siblings('.help').hide();
    });

    form.submit(function(event) {
        event.preventDefault();

        request = $.ajax({
            type: form.attr("method"),
            url: form.attr("action"),
            data: form.serialize(),
            dataType: "json"
        });

        //form_submit.val('Wait please').attr('disabled', 'disabled');

        request.done(function(response) {
            notices.html(response.data);
        });

        request.fail(function(jqXHR, textStatus) {
            notices.html('FAIL: ' + textStatus);
        });
    });

}());


//******************/
//**** OVERLAYS ****/
//******************/
(function () {

    $('#overlay .close, .disabled-event-catcher').click(function (event) {
        $('[id^="overlay"]').hide();
    });

    $('.login-link').click(function (event) {
        event.preventDefault();
        $('form').removeAttr('id');
        $('#overlay-login form').attr('id', 'active-form');<commit_msg>Close overlay on mock-button click<commit_after>
//******************/
//****  FORMS   ****/
//******************/
(function () {

    var form = $('form'),
        notices = $('form .notices'),
        $inputs = $('form :input'),
        values = {},
        request;

    $('form').h5Validate({
        errorClass: 'invalid',
        validClass: 'valid',
        focusout: true,
        focusin: false,
        change: false,
        keyup: false
    });

    $('input').focus(function (event) {
        $(this).removeClass('invalid valid');
        $(this).siblings('.help').show();
    });

    $('input').blur(function (event) {
        $(this).siblings('.help').hide();
    });

    form.submit(function(event) {
        event.preventDefault();

        request = $.ajax({
            type: form.attr("method"),
            url: form.attr("action"),
            data: form.serialize(),
            dataType: "json"
        });

        //form_submit.val('Wait please').attr('disabled', 'disabled');

        request.done(function(response) {
            notices.html(response.data);
        });

        request.fail(function(jqXHR, textStatus) {
            notices.html('FAIL: ' + textStatus);
        });
    });

}());


//******************/
//**** OVERLAYS ****/
//******************/
(function () {

    $('#overlay .close, .mock-button').click(function (event) {
        $('[id^="overlay"]').hide();
    });

    $('.login-link').click(function (event) {
        event.preventDefault();
        $('form').removeAttr('id');
        $('#overlay-login form').attr('id', 'active-form');
{'fraction_non_alphanumeric': 0.25392834695160277, 'fraction_numerical': 0.0006285355122564425, 'mean_word_length': 2.1671641791044776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349428', 'n_tokens_mistral': 937, 'n_tokens_neox': 917, 'n_words': 143}