Sorry, I'm not really sure what exactly should be done (and there is already a pure CSS solution). Anyhow, inside of function renderMenuItem($i) you can access the menu level of the current page like so:

<!-- startpage.css - Only included for first page - Important, must be included as second last css! -->
<?php if ($s === 0):?>
<?php echo '<link rel="stylesheet" type="text/css" href="'.$pth['folder']['template'].'startpage.css">'."\n"; ?>
<?php endif;?>

Then there are other adjustments to make, for example the "searchform" install elsewhere.