lick behavior } }) $('.'+config["headerclass"]).bind("mouseleave", function(){ clearTimeout(config.revealdelay) }) config.oninit($('.'+config["headerclass"]).get(), expandedindices) $(window).bind('unload', function(){ //clean up and persist on page unload $('.'+config["headerclass"]).unbind() var expandedindices=[] $('.'+config["contentclass"]+":visible").each(function(index){ //get indices of expanded headers expandedindices.push($(this).attr('contentindex')) }) if (config.persiststate==true && $('.'+config["headerclass"]).length>0){ //persist state? expandedindices=(expandedindices.length==0)? '-1c' : expandedindices //No contents expanded, indicate that with dummy '-1c' value? ddaccordion.setCookie(config.headerclass, expandedindices) } }) }) } }