I also had the annoying ticking, on my '08 24" 2.8Ghz iMac.
As it was only a week old Apple gave me the choice of swapping it or getting it repaired. A difficult choice, but as the rest of the Mac, especially the screen, was good, I didn't want to risk swapping it for one with the reported screen problems.
So the good guys at Amsys (apple reseller et al in Croydon, London) took it in to the workshop. After much analysis the engineer told me that they solved the problem by simply removing and re-seating the fans, as the fans weren't faulty themselves.
Well I got my iMac back yesterday morning and it's been running full out since then and no ticking sounds whatsoever. So I'm very happy about that
I'm just hoping it doesn't return now.
Hopefully a simply re-seating of the fans will fix your ticking problems also.