<commit_before>/* main.js
 * JS functions for sfuco-site
 * <NAME>.
 * <EMAIL>
 * 2016
 */
$(document).ready(function()
{
    // Function Definitions
    ////////////////////////////////////////

    // Navigation

    function updateVerticalNav ()
    {
        var windowPosition = $(window).scrollTop();
        var firstSection = $("section:eq(0)").offset().top;

        if(windowPosition >= firstSection)
        {
            verticalNav.fadeIn();
            updateNavColors();
        }
        else
        {
            verticalNav.fadeOut();
        }
    }

    function updateNavColors ()
    {
        var windowPosition = $(document).scrollTop();

        $("section").each(function(index)
        {
            index++; // Since #home is not a <section> but it's still a link
            var currentSectionTop = $(this).offset().top;
            var currentSectionBottom = currentSectionTop + $(this).outerHeight(true);

            var currentSection = $("#vertical-nav a:eq(" + index + ")");
            var currentSectionID = $("#vertical-nav a:eq(" + index + ")").attr("id");
<commit_msg>Add new breakpoint rule to when vertical nav appears<commit_after>/* main.js
 * JS functions for sfuco-site
 * <NAME>.
 * <EMAIL>
 * 2016
 */
$(document).ready(function()
{
    // Function Definitions
    ////////////////////////////////////////

    // Navigation

    function updateVerticalNav ()
    {
        var windowPosition = $(window).scrollTop();
        var firstSection = $("section:eq(0)").offset().top;

        if(windowPosition >= firstSection - (firstSection/4))
        {
            verticalNav.fadeIn();
            updateNavColors();
        }
        else
        {
            verticalNav.fadeOut();
        }
    }

    function updateNavColors ()
    {
        var windowPosition = $(document).scrollTop();

        $("section").each(function(index)
        {
            index++; // Since #home is not a <section> but it's still a link
            var currentSectionTop = $(this).offset().top;
            var currentSectionBottom = currentSectionTop + $(this).outerHeight(true);

            var currentSection = $("#vertical-nav a:eq(" + index + ")");
            var currentSectionID = $("#vertical-nav a:eq(" + index + ")").attr("id");

{'fraction_non_alphanumeric': 0.17750439367311072, 'fraction_numerical': 0.0048330404217926184, 'mean_word_length': 1.8786346396965865, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1136351', 'n_tokens_mistral': 616, 'n_tokens_neox': 591, 'n_words': 135}