I think I understand what you're talking about, we used a similar technique on The King with jQuery. Here's how:
var name = "#rightsidebar";
var menu_top_limit = 241;
var menu_top_margin = 20;
var menu_shift_duration = 500;
var menuYloc = null;
$(window).scroll(function()
{
offset = menuYloc + $(document).scrollTop() + menu_top_margin;
if(offset < menu_top_limit)
offset = menu_top_limit;
offset += "px";
$(name).animate({top:offset},{duration:menu_shift_duration,queue:false});
});
(a tip for the hat @soyrex who wrote this code.)