Hi, glad you like the script!
Just put this line:
$("#main-menu").smartmenus("itemActivate", $("#main-menu").find("a.current").eq( - 1));
inside the domready handler (at the moment it’s after it) along with the SmartMenus init call like this:
$(function() {
$('#main-menu').smartmenus({
subMenusSubOffsetX: 1,
subMenusSubOffsetY: -8,
markCurrentItem: true,
markCurrentTree: true,
hideOnClick: false
});
$("#main-menu").smartmenus("itemActivate", $("#main-menu").find("a.current").eq( - 1));
});
and it should work.
Cheers!