Avoid transiting through US at all costs, I have nearly missed my flight a couple of times due to long immigration queues - they are terrible.
Even if you pay a bit more to transit though a European airport (may be Madrid), you probably don't need any visa (check that) as they have the concept of transit in their airports and you most likely don't even go through immigration at all (check that).
US does not have this concept of transit, you have to go out through immigration and then re-enter !? (They can't stand anyone set foot on their territory without checking them out good and proper... LOL).