Added smooth hiding of inactive elements