+ $a->page['nav'] .= '<div id="panel" style="display: none;"></div>' ;
+
+ /**
+ *
+ * Our network is distributed, and as you visit friends some of the
+ * sites look exactly the same - it isn't always easy to know where you are.
+ * Display the current site location as a navigation aid.
+ *
+ */
+
+ $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
+
+ $sitelocation = $myident . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 );
+
+
+ // nav links: array of array('href', 'text', 'extra css classes', 'title')
+ $nav = Array();
+
+ /**
+ * Display login or logout
+ */
+
+ $nav['usermenu']=array();
+ $userinfo = null;
+
+ if(local_user()) {
+ $nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
+
+ // user menu
+ $nav['usermenu'][] = Array('profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations'));
+ $nav['usermenu'][] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
+ $nav['usermenu'][] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
+ $nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events'));
+ $nav['usermenu'][] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
+
+ // user info
+ $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
+ $userinfo = array(
+ 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
+ 'name' => $a->user['username'],
+ );
+
+ }
+ else {
+ $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in'));
+ }
+
+
+ /**
+ * "Home" should also take you home from an authenticated remote profile connection
+ */
+
+ $homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : '');