I'm building a fairly simple site, and I need to alter a background image based on what section the user is in. The main menu only has 2 levels. I'm unsure where I should hook into in order to be able to get the current section (i.e. the root menu item of the current page, see example below) so I can adjust the classes on the page. I was looking at this article as a possible solution, but I only want to alter CSS classes, and that seems like an awful lot of code for such a simple task.
Main Manu:
-- Section 1
--- Page A
--- Page B
--- Page C
-- Section 2
--- Page D
--- Page E <- Active page, CSS class "section_2"
--- Page F
<body>
element, and in classes on all<div>
elements. Open your site in Firebug or similar tool and see. Maybe the classes you need are already there?