Extract moving images into jquery plugin