Moved handling which page is active to jQuery to make it more dynamic and not have to manually check PHP vars