$(document).ready(function() { $(".news").hover(function() { //On hover... //Set a background image(thumbOver) on the <a> tag //Animate the image to 0 opacity (fade it out) $(this).stop().animate({ backgroundColor: '#cccccc' }, 1000); //$("#gallery").css({marginLeft:0}); } , function() { //on hover out... //Animate the image back to 100% opacity (fade it back in) //$("#gallery").css({marginLeft:-180}); $(this).stop().animate({ backgroundColor: '#f0f0f0' }, 1000); }); });