jQuery animate() method is not working with the array elements.

jQuery animate() method is not working with the array elements.

I'm trying to use animate method on array elements, yet it is not working. Those array elements are storing the images and I need to redefine the margin for all of them.
This is a task that I've to perform to form a image gallery slider.
Please help!