open/close main view with animation