$(document).ready(function(){

  //add events to form elements
  $("button, input:enabled, textarea")
    .mouseover(function(){ $(this).addClass("hover") })
    .mouseout(function(){ $(this).removeClass("hover") })
    .focus(function(){ $(this).addClass("focus") })
    .blur(function(){ $(this).removeClass("focus") });

});