As Maureen stated, you should definately contact your Realtor and real estate attorney. They will be able to explain what happens if you choose to cancel the contract. Typically you will loose the deposit or earnest moneys you put down, but you may be able to negotiate with the seller. Depending on how quickly you are looking to leave, the seller may agree to list the property for sale again and as long as it is under contract with a new buyer prior to your departure, you either get a portion of or all of your deposit back.
Jason Ewing, GRI/CNS
Coldwell Banker Triad, Realtors