$(document).ready(function(){  
   $("#bilingual").qtip({
      content: {
      text: 'This is a bilingual English/Spanish book. The first measure listed is for the English-language content of the book and the second measure is for the Spanish-language content. Translated text is not necessarily written at the same level so Spanish and English measures can differ.  <a href="/bilingual-books/">Learn More</a>',
      title: {
         text: 'Bilingual Book',
         button: '<a onclick="return false;">X</a>'
         }
      }, 
      hide: 'mousedown',    
      style: { 
         width: 400,
         name: 'light'
         },
      show: 'click'
   
   });
   
   $('#categories_toggle').click(function(){  
     if ($('#categories').attr('class') == "hidden"){
      $('#categories').attr('class','');
      $('#categories_toggle').html('(Hide)');
     } else {
      $('#categories').attr('class','hidden');
      $('#categories_toggle').html('(Show)');
     }
   });
   
   
   $('#award_toggle').click(function(){  
     if ($('#awards').attr('class') == "hidden"){
      $('#awards').attr('class','');
      $('#award_toggle').html('(Hide)');
     } else {
      $('#awards').attr('class','hidden');
      $('#award_toggle').html('(Show)');
     }
   });

   $("#calculator_help").dialog({title:'Lexile Calculator',
			      width: '400px',
			      buttons: {
			      OK: function() {
				  $(this).dialog('close');
			      }},
			      autoOpen:false});   
			      
   $("#calculator_help_link").click(function() {
      $("#calculator_help").dialog('open');
   });
   
});


