changed the toggle function to a slideToggle function