Will the 24-70mm Nikon AF on a D5100?

I Want to buy soon the Nikon 24-70mm AF-S… Does anybody know if the lens will AF In my camera?

Since you have to ask (and since you don't know that all AF-S lenses are fully compatible with your camera), you don't need an $1, 800 lens.
The 24-70 is meant for FF cameras; yes it will work 100% fine with your 5100, BUT the wide-angle end of the 24-70's is NOT wide enough to be a good walk around on a crop-sensor. You should either save your money & spend some time learning about photography or buy a 17-55 2.8.

Yes, and it's absolutely fine on your camera.
a 24-70 will take photos similar to a 35-105 on your camera, which is a great wide-to-tele range. I honestly don't know what the other fellow is on about.
Lenses, you keep forever. Bodies come and go. The D5100 is a perfectly capable everyday DSLR, and this lens will make a big difference in your photography over the standard lens, especially in portraits and shots with the sky in them.
The other lens would be fine too. But if you upgrade your body later to a full-frame, it won't be compatible and you'll have to let it go with your old body. Since lens shopping is about forward-thinking, I'd stick with the FX lens.