Simple Scrollbar question

Simple Scrollbar question

I do not work to much with jquery (although i would like to) but i can't figure out how to check with jquery how deep a user has scrolled into a page. Suppose you got a webpage with 3000px in height but the actual viewport is just 768px high. So the user has to scroll down to see the rest of the page. How do i get the current vertical scroll value of the page. So if the user is at the bottom of the page the scroll value should then be 2232px since the viewport's top is at this position. the function i'm looking for should therefore return 2232px in that particular case. How is this done in jquery?