http://clashofclans.wikia.com/wiki/Raids
"Gold/Elixir:
Gold and Elixir can be stolen from three types of Resource Buildings: storages, mines/collectors and the Town Hall.
Storages: The percentage of Gold/Elixir that can be stolen from storages until TH5 is 20% and is capped at 200,000. Starting at TH6, the percentage that can be stolen drops by 2% at each TH level. At TH7 and above the cap increases by 50k at each TH level. The following chart shows how this works:
TH Level % Available to be Stolen Cap Storage Amount to Reach Cap
1-5 20% 200k 1.000M
6 18% 200k 1.1111M
7 16% 250k 1.5625M
8 14% 300k 2.1428M
9 12% 350k 2.9167M
10 10% 400k 4.0000M