Animated the show/hide function