Added functionality for accordion elements.