Retrieving new value of margin-left that has already been changed with jQuery

Retrieving new value of margin-left that has already been changed with jQuery

I'm developing a horizontal slideshow in jQuery and have run into a problem.  The slideshow works, fundamentally, by filling an overflow-hidden div (#ss_inner) with images, and decreasing the left margin into negative territoy to advance the show.  My slideshow processing loop calls a function with the following logic:
  1.     var current_margin = $("#ss_inner").css('margin-left').replace('px','');
  2.     var new_margin = ((current_margin - 316) + 'px');
  3.     var current_width = $("#ss_inner").width();
  4.     var new_width = ((current_width + 316) + 'px');
  5.     $("#ss_inner").css({
  6.             'width':new_width
  7.     })
  8.     .animate({
  9.             'margin-left':new_margin
  10.     }, 2000)
  11.     ;
  12. });
My problem is that the value returned for current_margin on line 1 is the same each time the loop runs - 960px, the value that is specified in the CSS.
  1. Is there another way to retrieve margin-left so as to return the current, calculated value rather than the value specified in the CSS?
  2. If not, should I simply set new_margin as a persistent variable and substitute it for the retrieved value in subsequent runs of the loop?
Thanks!