$(document).ready(function(){

  // Category Suckerfish menus
  $("#nav_categories li").hover(
    function() { $("ul", this).fadeIn("fast"); }, 
    function() { } 
  );
  if (document.all) $("#nav_categories li").hoverClass("sfhover");
  
  // Right align any old images that don't use CSS
  // and clean out any old hspace and vspace attributes
  $("img[align='right']").addClass('right');
  $('img').attr('vspace',0).attr('hspace',0);
  
  // Default the search box and email me fields
  $('#search .text_field').defaultInput();
  $('#sidebar_home #subscribe .text_field').defaultInput();

});

$.fn.hoverClass = function(c) {
  return this.each(function(){
    $(this).hover( 
      function() { $(this).addClass(c);  },
      function() { $(this).removeClass(c); }
    );
  });
};