refactored to use jquery's hide and toggle methods instead of class