Did they hire a pro? If so, talk with the pro to ask how he feels about you taking photos of the event he/she was hired for. They might not like you encroaching on their territory, so to speak. In fact, most pros have something in their contract that states they can leave the event with no refund if they have to compete with another photographer for the couple's attention.
I'd be careful about potentially stepping on the pro's foot if you're in there catching any pre-ceremony shots. I've shot weddings before, and while I'm usually lenient about others using their cameras, I'm not afraid to "banish" a family member or friend from the room if I feel they're hampering my ability to capture shots that I'm being paid good money for.
If you're the only person shooting, well.. Given that you asked about which flash to use, tells me you're not familiar with flash photography. A wedding is hardly a place to experiment using flash photography, especially on someone's special day.
If you're still adamant about shooting the wedding, get a 580 and a backup body, and practice with your new camera BEFORE you shoot. Shoot in similar situations where you will be in, so you can get an idea of how to use your flash. Learn to bounce your flash off the ceiling if you can, and use a bounce card instead of a Gary Fong, which is essentially a big power waster.
If it's outdoors, you should be right at home since you do a lot of motorsports, but don't forget to use your flash to fill in any harsh shadows.
Read the manual when you do get your flash though. You'll need a backup to that 40D and a backup flash and about 30 gigs of memory if you plan to make weddings part of your income.