This little script combines several elements for use in long pages that are divided by sub-section.
As you scroll the page, the menu will stick to the top of the page. As sections scroll by, the active menu item is highlighted and the active section is highlighted.
A very simple "smooth scroll" has also been implemented to create a more elegant effect when a menu item is selected.
This works for menus on the top as well as side of the page. It has been tested on IE8+, Firefox, Chrome, & Safari. It works on mobile devices.