Floaty bars module, need improvement?
What I tend to do in these situations is have two states for the floaty thing:


When it's not in "stay on the page" mode, it has position:relative.
When the page is scrolled down enough, it gets position:fixed and stays on the page.


It is not animation intensive at all,  it's more like the way gmail used to be before the recent changes. You only change the element's style when the page scrolls up or down past a certain point, but most scroll events you just ignore.