Activating and deactivating the navigation links depending on wether first or last page is active.