modified http://james.padolsey.com/javascript/special-scroll-events-for-jquery/ which broke in jquery 1.9