jQuery(window).scroll(function(){
var $sections = $('.section');
$sections.each(function(i,el){
var top = $(el).offset().top-100;
var bottom = top +$(el).height();
var scroll = $(window).scrollTop();
var id = $(el).attr('id');
if( scroll > top && scroll < bottom){
$('#pp-nav1 ul li a.active').removeClass('active');
$('#pp-nav1 ul li a[href="#'+id+'"]').addClass('active');
}
})
});