it doesn't sound like a loose connection. do Hyundais ever get those?
i'm starting to think they're the most reliable car on the road.
the battery's 5 years old and you're in a part of the world that's heading towards winter. a battery that's starting to fail will become obvious in cold weather.
i'd be 99% sure that replacing the battery will be warranted so you could either just buy one from the cheapest place or get an auto electrician to check it and then replace it at a higher price.
For the latest weather where i am click
http://members.iinet.net.au/~farmerjim/