added transition effects to the clicked boxes