Viewport ads couple of extra selectors to jQuery. With these selectors you can check whether element is inside or outside of viewport.
$(":in-viewport") $(":below-the-fold") $(":above-the-top") $(":left-of-screen") $(":right-of-screen")
Download from project page: http://www.appelsiini.net/projects/viewport