title: How to make this shake effect behave?
body: <p>I have the following piece of code:</p>
  
  <pre><code>jQuery.fn.shake = function(intShakes, intDistance, intDuration) {
      this.each(function() {
          $(this).css("position","relative"); 
          for (var x=1; x&lt;=intShakes; x++) {
          $(this).animate({left:(intDistance*-1)}, (((intDuration/intShakes)/4)))
           .animate({left:intDistance}, ((intDuration/intShakes)/2))
           .animate({left:0}, (((intDuration/intShakes)/4)));
          }
      });
  return this;
  };
  </code></pre>
  
  <p>The problem is that when I apply it, if the object is positioned absolutely in the center, it makes the object jump to the left of the page.</p>
  
  <p>Can this be fixed? and how if it can?</p>