http://www.legalmatch.com/law-library/article/contingency-fee.html
The percentage of the fee varies. Commonly the fee is 1/3 of what you recover. Some lawyers offer a sliding percentage scale depending on how far the case goes before it’s settled. If you agree to a contingency fee you should found out if your lawyer calculates the fee before or after the expenses.
http://law.freeadvice.com/litigation/litigation/lawyer_contingency_fee.htm
The basic concept of the contingency fee agreement is that the client is out little or no upfront expenses; you as a client do not pay legal fees unless and until you win, and then the lawyer receives a percentage of your recovery as his or her fee. If you lose your case, there is no legal fee at all for the lawyer.
In this case, the Martin lawyers probably raised cain, wrote increasingly threatening letters, filed a lawsuit for maybe $5 million and took depositions from witnesses. Probably spent $3000 and made $300,000. The home owners association insurance paid rather than possibly losing.
The Martin's must have had some chance of winning.
I was sued for a million dollars one time. Even though I was , in my mind, completely innocent, when I was faced with the prospect of losing everything I owned, I became very desirous of have my insurance company pay $100,000 to settle. Which they did. I real eye opener for me.