$(window).scroll(function() {
$("#menu ol li a").each(function(){
// if the relevant link appearsmore than half way down the page
$(window).scroll(function() {
$("#menu ol li a").each(function(){
// if the relevant link appearsmore than half way down the page