All parties do not have to be eligible.
From the irs:
First-Time Homebuyer Credit: Scenarios
S1. If a single person (Taxpayer A) qualifies as a first-time homebuyer at the time he/she purchases a home with someone (Taxpayer B) that is not a first-time homebuyer and then later that year they marry each other, is the credit still allowed?
A. Eligibility for the first-time homebuyer credit is determined on the date of purchase. If Taxpayer A, a first-time homebuyer, buys a house and then later that year marries Taxpayer B, not a first-time homebuyer, the credit is allowable to Taxpayer A. Taxpayer A may take the maximum credit.
S2. Taxpayer A is a single first-time home buyer. Taxpayer B (parent) cosigns for A and does not qualify. Both names are on the mortgage. Can Taxpayer A claim the credit and, if so, how much?
A. Yes. Taxpayer B is not a first-time homebuyer and cannot claim any portion of the credit, but A may claim the entire credit ($7,500 for purchase in 2008; $8,000 for purchase in 2009), if the home was purchased as Taxpayer A's primary residence.
For more scenarios check here: http://www.irs.gov/newsroom/article/0,,id=206294,00.html