added on class to the am and pm buttons