I would recommend not using a dimmer, but rather a ceiling fan speed control (a similar device, but it may cost a little more). Something about "Resistive" loads vs. "Inductive" loads. Hook it up as Scottish Lad said.
A real electrician could give you a better explaination, I'm sure!