Phase contrast and attraction-repulsion transition in tapping mode atomic force microscopy