I didn't forget about you. Busy yesterday. Bad headache today (might be CO poisoning, exhaust in the car split in half).
Yesterday I found bassman's addon in case you are interested in that -
https://xenforo.com/community/resources/cxf-sticky-navigation.3614/ It looks like his implementation moves the search and it looks a little funny. However it is a cheap solution to get the whole thing to mesh together.
However if you look at
www.digitalpoint.com he just has a gradient of white at the bottom to keep the search where it is. I am aiming to help you do it more that way.
Right now I can't really concentrate but as far as the javascript this is how I did mine. It's probably not the most efficient way but its simple in concept
http://www.tbgclan.com/js/tbgremastered/tbgstickynavbar.js
It's twice as complicated as it needs to be if you want floating nav at all widths. I removed it for low width's. This required finding a way to check if the window size changed. So there is like 3x as much code as needed otherwise.
Primarily how it works is the container for navigation has a class NavStatic. This class contains properties for where the navigation normally sits. What we do is create a second css class called NavFloat that sets things like position: fixed; top: 0px; other parts of the menu may need adjustments as well and thats why the code swaps classes to other elements.
HTML:
<div id="menucontainer" class="navstatic <xen:if is="{$visitor.is_moderator} || {$visitor.is_admin}">modbarmargin</xen:if>">
<div id="menuleft" class="navstatic">
<div class="navTabs">
Unfortunately without me redoing this for a stock theme as you can see above my navTab div is wrapped into 2 other div's. The menu left exists because of our style having left and right background sections. Furthermore I added a seperate div to contain the whole thing which isn't needed in the stock style version i dont think. However if you look closely I add a class for modbarmargin if the moderator bar is present. This is very much needed otherwise the moderator bar gets covered up.
I will help more when I feel better and have more time.