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