Control CSS attributes of elements and fire events based on vertical scroll position