When buying a home, many people do not realize they will be responsible for the downpayment on a home AND for closing cost. Closing cost consist of several fees associated with the the purchase of a home that can range from 2-7% of the price of a home.
In some situations, it is beneficial to both you and the lender to conduct a short-sale rather than proceed with foreclosure. For the seller, it is definitely beneficial in that it is a slap on your hand credit-wise as opposed to a major hit like foreclosure. The down side of a short sale is that the process takes from 3-7 months depending on the lender.