If you're on Snow Leopard, you need to open Software Update and make sure you have iTunes 10.5 installed. Then plug in your iPhone, open iTunes, go to the Summary tab, and tick in the "Sync over wi-fi connection" box. As soon as you do that, you can unplug your phone and iTunes will still treat it exactly as if it were connected - you can add files, sync, etc.