{"size": 2849, "ext": "js", "max_stars_repo_path": "js/mainjq.js", "max_stars_repo_name": "FunMan22/funman22.github.io", "max_stars_repo_stars_event_min_datetime": "2019-07-02T04:13:09.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-02T04:13:09.000Z", "max_issues_repo_path": "js/mainjq.js", "max_issues_repo_name": "FunMan22/funman22.github.io", "max_issues_repo_issues_event_min_datetime": "2019-07-02T02:43:00.000Z", "max_issues_repo_issues_event_max_datetime": "2019-07-02T02:43:00.000Z", "max_forks_repo_path": "js/mainjq.js", "max_forks_repo_name": "FunMan22/funman22.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 28.7777777778, "max_line_length": 94, "alphanum_fraction": 0.4791154791}
$(document).ready(function() {
   window.onload = function() {
      var timesRun = 0;
      var remainWidth = 0;
      debugger;
      $(window).scroll(function() {
         checkScroll();
      });
      $(window).resize(function() {
         checkResize();
      });
      debugger;
      // Gets the number of nav links and counts their width
      var navitems = $("ul.nav-list").children().length;
      var navitemsWidth = 0;
      var i = 0;
      var navindex = 0;
      while (i <= (navitems-1)) {
         var currentWidth = $("li.nav:eq(" + navindex + ")").width();
         navitemsWidth += currentWidth;
         navindex += 1;
         i++;
      }


      function checkScroll() {
         var column = document.getElementById("columnleft");
         var sticky = column.offsetTop - 46;
         var clientHeight = $("#banner").height();
         if (window.pageYOffset >= sticky) {
            $("#columnleft").addClass("sticky");
            $("#columnright").addClass("sticky");
            $("#navbar").addClass("navshadowon");
            $("#navbar").removeClass("navshadowoff");
         }
         if (window.pageYOffset <= clientHeight) {
            $("#columnleft").removeClass("sticky");
            $("#columnright").removeClass("sticky");
            $("#navbar").removeClass("navshadowon");
            if (timesRun !== 0) {
               $("#navbar").addClass("navshadowoff");
            }
         }
         timesRun += 1;

      }


      var resizeNav = (function () {
         return function () {
            // Gets availible width in the nav bar
            var takenWidth = $("h2.title-text").width();
            var totalWidth = $(window).width();
            var remainWidth = totalWidth - takenWidth;
            // makes the ul the size of the remaining width on the page. (Acts as a container)
            $("ul.nav-list").css({
               "width": remainWidth + "px"
            });


            // Sets the new padding for the li tag
            var paddingwidth = (((remainWidth - navitemsWidth) / navitems) - 10) / 4;
            $("li.nav").css({
               "padding-left": paddingwidth,
               "padding-right": paddingwidth
            });
            $("a.nav").css({
               "padding-left": paddingwidth,
               "padding-right": paddingwidth
            });
         }
      })();

      var resizeLeft = (function () {
         return function () {
            var remainWidth = $("#columnleft").width();
            $("div.square").css({
               "width": remainWidth,
               "height": remainWidth
            });
         }
      })();

      function checkResize() {
         resizeNav();
         resizeLeft();
      }


      function runFormat() {
         checkScroll();
         checkResize();
      }
      
      runFormat()

   }
});
