Roberto: each time you open up a menu (bind event show) set up a JS cookie with the sub-menu that was opened. Each time you open a page, check if there’s a cookie set up for a menu option and open it through Jquery. Clear the cookie every time a sub-menu is closed.