If a taxpayer has a net capital gain for any taxable year, the tax imposed by this section for such taxable year shall not exceed the sum of—
(A) a tax computed at the rates and in the same manner as if this subsection had not been enacted on the greater of—
(B) 5 percent (0 percent in the case of taxable years beginning after 2007) of so much of the adjusted net capital gain (or, if less, taxable income) as does not exceed the excess (if any) of—
(i) the amount of taxable income which would (without regard to this paragraph) be taxed at a rate below 25 percent, over
(ii) the taxable income reduced by the adjusted net capital gain;