Unfortunately, the Accordion API is not as nice as something like the tabs API where the current index is passed into the change event for easy grabbing and setting to a cookie. So you have to use some jQ magic to figure out the selected index to write to your cookie for use in the next instantiation.
Using
I have written a demo for you here:
It uses the same markup as the first Accordion demo on the UI site. Viewing the source of the page I made you, you'll see that on line 71 I set the "active" option for accordion() to the returned value of a read from a cookie, or 0 if the read doesn't get a value. On line 72 I have set the change event of the accordion to write to the index of the selected area to the same cookie we're reading on line 71. So every time the accordion selection changes the cookie is written, and every time we instantiate the accordian the cookie is used to choose its starting selection.
From the looks of your markup, the only thing you need to do is download the cookies library (linked above) and include it into your page,. Then, above your call to create the accordion, copy and past my line 68. Also copy lines 71-75 and paste them in as options along with your other accordion options.