For some tiny thema tweaks in a multisite project I needed to add the domain as class to the body..
I'm not that good in php but i fiddled around and came with this solution for in the template.php:

// add domain as class to body
function THEMENAME_preprocess_html(&$vars) {
	$site = preg_replace('!^[^.]*\\.!','', $_SERVER['HTTP_HOST']); 
	$site = str_replace ( '.', '-', $site );
        $vars['classes_array'][] = 'domain-' . $site;	  
}

It works for me now :) but maybe it is in desperate need of some modification so I put it here :)
And for future reference...