It will work (autofocus) if it is an AF-S lens. Otherwise, there is no focus motor directly in the body of this camera but the lens will still allow you to manual focus. It is a wonderful device though, and would be a solid upgrade from the D5000.
The lens in my d5000 says AF-S Nikkor 18-55mm. So I'm guessing its all good?
This price is tempting.