var activitiesListId = 'activities';
var preworkListId = 'activitiesprework';

function resetActivitiesPage() {
  // change style of mouse cursor when navigating the activities/prework lists
  $('#' + activitiesListId + ' li').bind('mouseover', function() {
    document.body.style.cursor = 'pointer';
  });
  $('#' + activitiesListId + ' li').bind('mouseout', function() {
    document.body.style.cursor = 'default';
  });

  $('#' + preworkListId + ' li').bind('mouseover', function() {
    document.body.style.cursor = 'pointer';
  });
  $('#' + preworkListId + ' li').bind('mouseout', function() {
    document.body.style.cursor = 'default';
  });

  // select the activity's link on list item click
  $('#' + activitiesListId + ' li').bind('click', function(e) {
    // don't do anything if the actual link has been clicked
    if (e.target.nodeName != 'A') {
      window.location = $(this).find('A').attr('href');
    }
  });
  $('#' + preworkListId + ' li').bind('click', function(e) {
    // don't do anything if the actual link has been clicked
    if (e.target.nodeName != 'A') {
      window.location = $(this).find('A').attr('href');
    }
  });
}
