Waypoints is a jQuery plugin that makes it easy to execute a function whenever you scroll to an element.