How to preserve link state or CSS class on a link (anchor tag) with cookies?

Hello,

I have this piece of code which adds and remove a class on my links.
The class is added to the linked clicked or active and removed from liked that are not active/clicked.

However I would like to preserve the state of the link so that it remain active, this is for a single page.

JQuery:


$(document).ready(function() {	
    $('.navbar li a').click(function(){
        $(".navbar li a").removeClass("currentTab");
        $(this).addClass("currentTab");
    });
});

Thanks everyone!!

IC