The IRS site has a page which related to the tax credit when it was available in 2008. See it in the link below. I believe that once you sell the home the recapture of the tax credit is accelerated so that the full amount becomes due (and not parceled out by $500 per year). But you're repayment is also limited to the capital gains (as determined by the IRS formula).
As always, seek the advice of a tax professional. And when you talk to them, show them a copy of the IRS instructions (see link).