$(document).ready(function() { //start main  function

//Code for with nospam.js plugin
//Hides email from spam and robots
	$('a.email').nospam({ replaceText: true });

//rollover backgropund in top navigation
	$('ol#toc li').hover(function() {
     	$(this).addClass("current");
   	  },function(){
     	$(this).removeClass("current");
   });
	
// hides the handoutbox as soon as the DOM is ready
// (a little sooner than page load)
	$('div.b0').hide();
  	$('div.b1').hide();
    $('div.b2').hide();
    $('div.b3').hide();
// hides the gethandoutBox on clicking the noted link
    $('a.close0').click(function() {
    $('div.b0').hide();
	return false;
  });

  $('a.close1').click(function() {
    $('div.b1').hide();
	return false;
  });
  $('a.close2').click(function() {
    $('div.b2').hide();
	return false;
  });
  $('a.close3').click(function() {
    $('div.b3').hide();
	return false;
  });
  $('a.close4').click(function() {
    $('div.b4').hide();
	return false;
  });
 // toggles the handoutbox on clicking the noted link
  $('div.balloonBox a').click(function() {
  var thisClass = this.className.slice(0,2);
	$('div.'+ thisClass).toggle(0);
	return false;
  });
  
  //hint is text that appears and disappears within the input box
  $('input[title!=""]').hint();

}); //end main function