Change display show/hide to opacity and declare vars