/*! Simple fixed nav on scroll down based on #header element's height by cara-tm.com, MIT license */
var fixednav=function(o){"use strict";var didScroll=!1,nav=document.getElementById("menu"),header=document.getElementById("header");if("undefined"==typeof o.up)o.up=0;if("undefined"==typeof o.down)o.down=0;if("undefined"==typeof o.delay)o.delay=70;window.onscroll=doOnScroll;function doOnScroll(){didScroll=true;}setInterval(function(){if(didScroll){didScroll=0;var top=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,height=header.clientHeight;if(top>height-o.down){addClass("fixed",nav);}else if(top<=height-o.up){nav.className=nav.className.replace(" fixed","");}}},o.delay);function addClass(a,s){var c=s.className;if(-1==c.indexOf(a)&&""!==c&&(a=" "+a))s.className=c+a;}};

/*! Simple fixed nav on scroll down based on #header element's height. */
var fixednav=function(o){"use strict";var didScroll=!1,nav=document.getElementById(o.id),header=document.getElementById(o.nav);if("undefined"==typeof o.up)o.up=0;if("undefined"==typeof o.down)o.down=0;if("undefined"==typeof o.delay)o.delay=70;window.onscroll=doOnScroll;function doOnScroll(){didScroll=true;}setInterval(function(){if(didScroll){didScroll=0;var top=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,height=(o.distance||header.clientHeight);if(top>height-o.down){addClass("fixed",nav);}else if(top<=height-o.up){nav.className=nav.className.replace(" fixed","");}}},o.delay);function addClass(a,s){var c=s.className;if(-1==c.indexOf(a)&&""!==c&&(a=" "+a))s.className=c+a;}};

Update script.js