$(document).ready(function() { $('.nav_bg').scrollFix({zIndex:1000}); $('.footer').scrollFix( { startTop:'body', bottom: '0', endPos : '.footer-content', zIndex : 999 }); var summaries = $('.summary'); summaries.each(function(i) { var summary = $(summaries[i]); var next = summaries[i + 1]; if(next){ summary.scrollFix({ distanceTop: $(".nav_bg