hide/show code, reduce DOM elements - api2