You need to remove .top
after it ends the animation like this
$(this).stop(true, true).animate({
marginTop: "5px",
marginBottom: "5px",
marginLeft: "5px",
marginRight: "5px"
}, 800,function(){
$(this).removeClass("top");
});