Most of the answers I've checked suggest using a plugin, but to save me editing 100+ pages of my site by adding a plugin URL into the headers, I'm asking if it's possible to do the following without a plugin...

I have a menu with several submenus that are toggled to show/hide using jquery. I want to save a cookie so the menu status is saved between page loads. 

Current code example:

```
$('#heading1').click(function() {
$('#menu1').toggle( "fast" );
});

$('#heading2').click(function() {
$('#menu2').toggle( "fast" );
});

```

If it's not possible/easy then I'll go for the plugin