I would make use of the plugin callbacks to achieve that.
You could make use of afterLoad
with something like this:
$.fn.fullpage({
slidesColor: ['red', 'blue'],
afterLoad: function(anchor, index){
var activeItem;
if(index == 1 || index == 2 || index == 3){
activeItem = $('#menu').find('li').first()
}else{
activeItem = $('#menu').find('li').last()
}
activeItem
.addClass('active')
.siblings().removeClass('active');
}
});
Note that I'm not using the menu
option anymore to handle the active class as I wish.