Fixing accordion for adjusting screen sizes

Accordion objects were opening on any screen size adjustment. They now
only open or close at allowed screen sizes and max-height is removed
when outside the allowed screen sizes.