/* script to expand the subject specified in the url */

$(document).ready(function(){
  if($("#subjectID")) {
      var exposedId = $("#subjectID").attr("value");
      $("#" + exposedId).addClass("highlightSubject");
      var branch = $("#" + exposedId);
      if (branch.parent().attr("id") != "subjectTree"){
      	branch = branch.parent().parent();
      }
      branch.addClass("open");
  }
  
  $("#subjectTree").treeview({collapsed: true});
  
});
      