Multiple values in rel attribute doesn't work

Multiple values in rel attribute doesn't work

I've got the following code (from this tutorial: http://www.webstuffshare.com/2010/05/filter-image-view-using-jquery/ ):
  1. thisItem     = $(this).attr('rel');
  2.       if(thisItem != "all") {
  3.       $('.item li[rel='+thisItem+']').stop()
  4.       .animate({
  5.       'opacity' : 1
  6.       });                                               
  7. $('.pf_item li[rel!='+thisItem+']').stop()
  8.       .animate({
  9.       'opacity' : 0
  10.       });
  11. } else {
  12.       $('.item li').stop()
  13.       .animate({
  14.       'opacity' : 1,
  15.       });
  16.                     }
  17.                 })
  18.                
  19.                 $('.item li img').animate({'opacity' : 0.5}).hover(function() {
  20.                     $(this).animate({'opacity' : 1});
  21.                 }, function() {
  22.                     $(this).animate({'opacity' : 0.5});
  23.                 });
  24.             });
then I create HTML for navigation:

  1. <ul class="nav">
  2. <li><a href="#" rel="abc">abc</a></li>
  3. <li><a href="#" rel="abc2">abc2</a></li>
  4. </ul>
and finally HTML for elements to appear and disappear:
  1. <ul class="item">
  2. <li rel="abc">Some content here</li>
  3. <li rel="abc abc2">Some content here</li>
  4. </ul>

and it works perfect but only when I use single category for rel="". In this case rel="abc" works and rel="abc abc2" doesn't work.

There must be something with $('.pf_item li[rel!='+thisItem+']') but since I don't know jQuery I can't solve it myself. I just want to change this line into something that is able to work with multiple attributes in rel.

It would be great if anyone could help me with that!