Could possibly be loose battery cables, but Id think it was an alternator first. Usually when your lights dim, it means the alternator isnt producing enough charge for the battery...hense the bad alternator. Just a thought though.
Failure is simply the opportunity to begin again, this time more intelligently.