Added support for multiple pagers

The active class is now added correctly to several items if there are multiple pagers (e.g. if you have one at the top and one at the bottom)