I am using a great piece of code here to show hide elements. So far it works perfectly but need cookie functionality to work, which is baffling me.

The show hide code is as follows:
<script type="text/javascript">

$(function() {

// Declaring a custom target
target_obj: $('#example-1').parent().next()

// Declaring a custom target
target_obj: $('#example-2').parent().next()



So far this works fine; my sidebar categories show and hide with no problem, but as soon as i navigate to another page the sidebar resets. This is where I need the cookies to work. The author has stated that I need to add the following:

use_cookie Boolean false
cookie_name String 'show_target' - must be different for each instance of show hide

But I am unsure in how these are added to the code?

Does anyone know how to add this code to get things working?

Many, many thanks to anyone who replies.