You might want to consider using the WordPress function body_class()
<body <?php body_class($class); ?>>
Then you could use the body class as your current page reference.
This function is for example used by the Twenty-Twelve theme.
For a single post it will become
<body class="single single-post ...">
and for the home page:
<body class="home blog ...">
You can read more about this function in the Codex here:
http://codex.wordpress.org/Function_Reference/body_class
Edit:
I know you can do this with for example body_class() if you want to
add classes to BODY. But how do I do this with a DIV?
You could use it in your div
tag:
<div <?php body_class(); ?>></div>
but it should be sufficient to have this only in the body
tag.