<xf:js>
$(function()
{
var unit = $('.samCodeUnit[data-position="container_sidebar_below"]');
if (unit.length)
{
var unitOffset = unit.offset().top;
$(window).scroll(function()
{
var unitScrollOffset = unit.offset().top;
var scrollTop = $(document).scrollTop();
if (unitScrollOffset - scrollTop <= 0)
{
unit.css({position: 'fixed', top: $('.p-nav').height() + 10, width: 'auto'});
}
else if (scrollTop <= unitOffset)
{
unit.css({position: '', top: '', width: ''});
}
});
}
});
</xf:js>