Spice Jars (I got mine from Williams Sonoma but you can get cheaper/different ones)
Magnets (Mine are from K&J Magnetics)
Dremel or Drill
Measuring tape (if you're anal about measurements)
Epoxy or superglue
Step 1: Preparation
I laid out my magnets on my spice jars. The tops are metal (steel?) so the magnets stick, but you want to make sure that your magnets are all pointing the same direction.
I also made a quick and dirty template for drilling my holes by tracing the bottles on a piece of cardboard and stabbing it with a knife.
Step 2: Tracing Holes and Drilling
I used the burr setting on my Dremel in order to make short, shallow holes wide enough for the magnets and deep enough for the magnets to lay flush once they're glued.
Step 3: EPOXY
It is also important to use epoxy in a well-ventilated space as it will eat your brain tissue and turn you into a zombie.
Smear epoxy into the holes, just enough for there to be a base. Let the epoxy set for about a minute, and then push the magnets into the epoxy in order to set them. Make sure to place the magnets into the holes such that they adhere to the magnets on the lid of the jars, if not, your magnets won't stick (they will repel, in fact!). Then, apply epoxy over the magnets in order to seal them into the holes.
Next, very carefully move the magnets underneath the top of the jar so that they are in the same position as they were previously. You need to make sure they're in the same position so that they magnetically adhere to the magnets you just glued in.