Conditional menu behavior in Drupal

I added some code to the page.tpl.php to change the behavior of the elearning page on ODT for logged in vs anonymous viewers.

path=="elearning"){?>
    $(document).ready(function() {
uid) {?>
				$('.expanded').each( function(){Drupal.dhtmlMenu.toggleMenu($(this));}); //Close all
				Drupal.dhtmlMenu.toggleMenu($('#skillport-login')); //Open login button section

				$('.collapsed').each( function(){Drupal.dhtmlMenu.toggleMenu($(this));}); //Open all

		});
		

(more…)