Do not just go an replace the battery. I did this when I had the same type of problem, I wanted to purchase a new optima one anyways, but after I had it replaced the shop checked the old battery and said it was fine. I then had the same problems and found out it was the alternator...so def. get it checked before you go and and buy things that aren't necessary.
Good luck with it though!
-- Kyle --
The difference between school and life? In school, you're taught a lesson and then given a test. In life, you're given a test that teaches you a lesson.