var sellink;

function resetAll() {
  $(".choice").each(function(){
    $(this).css("font-weight", "normal");
    $(this).css("color", "#000");
  })
}

function set(which) {
  sellink = which
  $("#" + which).css("font-weight","bold");  
  $("#" + which).css("color","#c00");  
}

$(function() {
  $(".choice").each(function(){
    var id = this.id;
    $(this).mouseover(function() {
      if (id != sellink)
        $(this).css("font-weight", "bold");
    })
    $(this).mouseout(function() {
      if (id != sellink)
        $(this).css("font-weight", "normal");
    })
    $(this).click(function() {
      if (id == "slides" && !slides_loaded && 
          !confirm("Downloads an MP4 video of size " + movie_size))
        return;
      $.get( "camp/"+id+".html", null, //minimally, set choice in session
        function(data) {
          if (id == "slides")
            location.reload();
          else
            $("#campcontent").html(data)
        }
      )
      resetAll(); 
      set(id);
    })
  })

})
