+ var menu = document.getElementById("menu");
+ var menuLoc = parseInt(getComputedStyle(menu).getPropertyValue("top"));
+
+ for(var i = 0; i < directions.length; i++) {
+ directions[i].children[0].onclick = function(event) {
+ event.preventDefault();
+ var node = event.currentTarget;
+ if(menuLoc != 10) {
+ menuLoc = 0;
+ menu.setAttribute("class", "top");
+ window.history.pushState("object or string", "Title", node.href);
+ } else {
+ window.history.pushState("object or string", "Title", node.href);
+ }
+ };