A much easier way to keep your battery always charged is to go this route, however if you have the other parts available already then go that route. Or follow the first one for a cleaner and more useful setup since it also allows you to use USB for your phone.
Parts:
Charger:
Or do this.
This is a great way to keep your battery maintained.
First thing grab a cheap trickle charger from Harbor Freight
http://www.harborfreight.com/automatic-battery-float-charger-69955.html
Cut off the ends and install a regular 12 volt dc plug

Should look like this
Install a dc accessory outlet. I decided to flush mount it into my Battery Box. Connect the leads directly to the positive and negative battery leads.
Installed and working
As soon as you plug in the connector the power goes straight to your battery. So after you are done riding, pull up and plug it in and keep your battery maintained.
Contributor: Cobie Szigety