Auto Fix Anything jQuery plugin will let you automatically fix position of any container on your website with one JS call. The plugin will detect when to fix/unfix the position automatically.
Website Demo