Implemented hiding and opening of the divs.