{"size": 877, "ext": "js", "max_stars_repo_path": "js/main.js", "max_stars_repo_name": "hanisno/Portfolio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/main.js", "max_issues_repo_name": "hanisno/Portfolio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/main.js", "max_forks_repo_name": "hanisno/Portfolio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.4814814815, "max_line_length": 66, "alphanum_fraction": 0.5769669327}
$("#menu-toggle").click(function () {
  $("header").toggleClass("open");
});

/*mousemove parallax effect: https://jsfiddle.net/lovromar/JmUL8*/
$(document).ready(function myFunction() {
  var currentX = "";
  var currentY = "";
  var movementConstant = 0.004;
  $("main").mousemove(function (e) {
    if (currentX == "") currentX = e.clientX;
    var xdiff = e.clientX - currentX;
    currentX = e.clientX;
    if (currentY == "") currentY = e.clientY;
    var ydiff = e.pageY - currentY;
    currentY = e.pageY;
    $(".parallaxfx img").each(function (i, el) {
      var movement = (i + 1) * (xdiff * movementConstant);
      var movementy = (i + 1) * (ydiff * movementConstant);
      var newX = $(el).position().left + movement;
      var newY = $(el).position().top + movementy;
      $(el).css("left", newX + "px");
      $(el).css("top", newY + "px");
    });
  });
});
