2004 Hyundai Sonata

Electrical problem
2004 Hyundai Sonata 4 cyl Front Wheel Drive Automatic 105000 miles

just purchased a battery 2 days ago. Drove to work this morning. And when I shut it off it was dead.( Made battery dead clicking noise ) waited appx 3 hours. Went back out and it cranked !
seems like while driving the battery is being drained. Notice clock lights on inside dim and windows roll down slow when acclerating. But somehow recharges after being off.
November 9, 2010.

Possibilities here could be the starter motor, starter relay, transmission range switch and ignition switch-Double check battery and connections

Nov 9, 2010.