Gear Animation Help...

Well, I would like to know how can I animate a horizontal and a vertical gear:



As well as how can I animate a gear with a moving object:

Here is good Gear tutorial:

That should get me working, thanks!