The other obvious alternative is to make each section a radio button, hide the button image, then open/close the section based on whether the button is checked or not. Also simple, but there's an even simpler way...
You just code the HTML using specific tags and it does the rest for you:
<details> <summary>This is always visible</summary> Anything inside the details tag but outside the summary tag will only be shown when the accordion is open </details>
This works in all browsers except IE, but is anyone even supporting IE any more?