$(function() { $('a[rel=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel // $('a').lightBox(); $('#menupontok a') .css( {backgroundPosition: "0px -32px"} ) .mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:300}) }) .mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0px 64px)"}, {duration:300, complete:function(){ $(this).css({backgroundPosition: "0px -32px"}); }}) }) });