I'm new to jquery and just stuck at this.
  <script type="text/javascript">
      $(document).ready(function()
      {
        $(".f:nth-of-type(1)").hover(function(){
           $(this).parent(this).toggleClass('fa');
        });
        $(".f:nth-of-type(2)").hover(function(){
           $(this).parent(this).toggleClass('fb');
        });
        $(".f:nth-of-type(3)").hover(function(){
           $(this).parent(this).toggleClass('fc');
        });
        $(".f:nth-of-type(4)").hover(function(){
           $(this).parent(this).toggleClass('fd');
        });
      });    
   </script>
how can I shorten this code so that i only have to write the function for once and it works the same.
 
     
    