.hover problem with houverout

.hover problem with houverout

In this example a unique class for each item in a list is needed. To do this I added the index of the hovered item to the class "hov".
The code:

  1. $(function() {
  2.       var $items = $('#myitem');
  3.       $items.hover(function(){
  4.             var index = $items.index($(this));
  5.             $(this).addClass('hov'+ index);},function(){$(this).removeClass('hov' + index);});
  6.  });
The hoverout (.removeClass) does not remove the class. I don't know why.
Please help. Is there a better way to do that? And why the remove does not work?

jbobbele