var MYOFFICE = {

		init: function () {
				MYOFFICE.findHeaders();
		},
		
		/**
		 * Search the content for the headers (h3 s with id values) and add them to the navigation (as list items) 
		 * underneath the current selection, with links         
		 */
		findHeaders: function () 
		{
		return;
				var h2 = $('#content h2');
				
				if (h2.length > 0 && h2[0].id !== undefined)
				{
				
  			  var current = $('#sub-nav a').contains( h2[0].id );
  				
				  if (current !== undefined)
				  {
  				
  			  var list = '<ul>';

				  $('#content h3').each(function (i) 
				      {
						  var id = $(this).attr("id");
						  if (id !== undefined) 
						    {
								  list += '<li><a href="#' + id + '">' + $(this).text() + '</a></li>';
						    }
				      }
				   );

				  list += '</ul>';
				  current.append(list);
				  }
				}
		}
		
}

$(document).ready(function () 
                  {
	                  MYOFFICE.init();
                  }
                 );
