window.addEventListener('scroll', page_scroll);
var page_header = document.getElementById('page-header');

function page_scroll() {
    'use strict';
    var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
    
	if (40 + winScroll < page_header.offsetTop) {
		page_header.classList.remove('minimize');
	} else {
		page_header.classList.add('minimize');
	}
}

var hamburger_menu = document.getElementById('mobile-hamburger-menu');
var mobile_menu = document.getElementById('mobile-nav-menu');

hamburger_menu.addEventListener('click', show_menu);

function show_menu() {
	'use strict';
	hamburger_menu.classList.toggle('active');
	document.body.classList.toggle('non-scrollable');
	mobile_menu.classList.toggle('show');
}