added some extra smarts to the fixed sidebar

Added in a check for the window height before applying fixed positioning to the sidebar. This is to solve a problem where currently if you are browsing on a small screen (or in some cases even a large screen) the bottom of the sidebar gets cut off and made inaccessible.
I agree, go with the later. @slwen make that minor change, and we'll merge away :)