// setup the onclick events
function init_sidebar() {
  $('#about,#research,#database,#electro').each(function(){
    $(this).click(function (e) {
      var dropdown = $(this).parent().next();
      if( $(dropdown).css('display') == 'none') {
        $(dropdown).show();
      }
      else {
        $(dropdown).hide();
      } 
      e.preventDefault(); 
    });
  });
};

// fire this when the document loads
$(document).ready(function(){ init_sidebar(); });

