[jQuery] Use of cookies and how?

[jQuery] Use of cookies and how?


Heya,
Just downloaded a Plugin made by Klaus Hartl, But I don't really
understand how it works even though there is a miniguide in the JS
file. If anyone who knows how to use with simple actions as
remembering what menu part you are displaying?
My example:
jQuery script to slide up and down toggle. targets links with class
menu
$(document).ready(function(){
$("a.menu").click(function () {
$("div.menu").slideToggle("slow");
});
});
<!-- FIRST MENU -->
<!-- FIRST MENU -->
<div class="menu">
<ul>
<li><a href="something.html">Something</a></li>
<li><a href="#" class="menu">Select new list part</a></li>
<!-- This targets the next div so that this shows up instead of old
div. -->
</ul>
</div>
<!-- SECOND MENU -->
<!-- SECOND MENU -->
<div class="menu">
<ul>
<li><a href="#" class="menu">Back to Main list</a></li>
<li><a href="something_new.html">Something New</a></li>
<li><a href="something_new.html">Something New 2</a></li>
</ul>
</div>
So back to the question how do I add a cookie so it remembers which
menu is selected the first or second.
Best Regards