Scranimate is a jQuery plugin that tracks the position of a container element, and toggles classes for above-the-fold and below-the-fold.
While not specifically limited to animation, Scranimate can be used to great effect with CSS3. Check out the demo to see how.