[WIP] a couple of improvements to the js, no functional changes at all

there are some benefits to using the jquery version of scroll rather than the raw window.scroll, otherwise this change just works the same