Here is something that might work for you:
http://jsfiddle.net/y3qV5/7/
The jquery plugin that does this sets up elements that capture any stock from the top of the page. With an extra limit, it will block the item and continue scrolling up the page, keeping it from the footer. You must set a limit on the top of the footer, as well as on the height of what will be in your target element.
The code for this script is used here (fiddle above):
$(document).ready(function() { $('#cart').scrollToFixed({ marginTop: 10, limit: $('#footer').offset().top }); });
Here is a link to the plugin and its source:
https://github.com/bigspotteddog/ScrollToFixed
source share