Adding Selectedclass to pages