Recognizing the fade-in/fade-out functions