v2.4.0.8

FAIR VALUE MEASUREMENTS (Measured on Recurring Basis) (Details) (Fair Value, Measurements, Recurring [Member], USD $) In Thousands, unless otherwise specified |  |  |  |  |  |  |  |  | 3 Months Ended |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Sep. 30, 2013 Catalyst lease obligations [Member] Level 1 [Member] | Dec. 31, 2012 Catalyst lease obligations [Member] Level 1 [Member] | Sep. 30, 2013 Catalyst lease obligations [Member] Level 2 [Member] | Dec. 31, 2012 Catalyst lease obligations [Member] Level 2 [Member] | Sep. 30, 2013 Catalyst lease obligations [Member] Level 3 [Member] | Dec. 31, 2012 Catalyst lease obligations [Member] Level 3 [Member] | Sep. 30, 2013 Catalyst lease obligations [Member] Total [Member] | Dec. 31, 2012 Catalyst lease obligations [Member] Total [Member] | Dec. 31, 2012 Contingent consideration for refinery acquisition [Member] Level 1 [Member] | Dec. 31, 2012 Contingent consideration for refinery acquisition [Member] Level 2 [Member] | Dec. 31, 2012 Contingent consideration for refinery acquisition [Member] Level 3 [Member] | Sep. 30, 2013 Contingent consideration for refinery acquisition [Member] Level 3 [Member] Discounted Cash Flow [Member] | Dec. 31, 2012 Contingent consideration for refinery acquisition [Member] Total [Member] | Sep. 30, 2013 Commodity contract [Member] Level 1 [Member] | Dec. 31, 2012 Commodity contract [Member] Level 1 [Member] | Dec. 31, 2012 Commodity contract [Member] Level 2 [Member] | Dec. 31, 2012 Commodity contract [Member] Level 3 [Member] | Dec. 31, 2012 Commodity contract [Member] Total [Member] | Sep. 30, 2013 Inventory Intermediation Agreement Obligation [Member] Level 1 [Member] | Sep. 30, 2013 Inventory Intermediation Agreement Obligation [Member] Level 2 [Member] | Sep. 30, 2013 Inventory Intermediation Agreement Obligation [Member] Level 3 [Member] | Sep. 30, 2013 Inventory Intermediation Agreement Obligation [Member] Total [Member] | Sep. 30, 2013 Inventory Supply Arrangement Obligation [Member] Level 1 [Member] | Dec. 31, 2012 Inventory Supply Arrangement Obligation [Member] Level 1 [Member] | Sep. 30, 2013 Inventory Supply Arrangement Obligation [Member] Level 2 [Member] | Dec. 31, 2012 Inventory Supply Arrangement Obligation [Member] Level 2 [Member] | Sep. 30, 2013 Inventory Supply Arrangement Obligation [Member] Level 3 [Member] | Dec. 31, 2012 Inventory Supply Arrangement Obligation [Member] Level 3 [Member] | Sep. 30, 2013 Inventory Supply and Offtake Arrangements [Member] Total [Member] | Dec. 31, 2012 Inventory Supply and Offtake Arrangements [Member] Total [Member] | Sep. 30, 2013 Money market funds [Member] Level 1 [Member] | Dec. 31, 2012 Money market funds [Member] Level 1 [Member] | Sep. 30, 2013 Money market funds [Member] Level 2 [Member] | Dec. 31, 2012 Money market funds [Member] Level 2 [Member] | Sep. 30, 2013 Money market funds [Member] Level 3 [Member] | Dec. 31, 2012 Money market funds [Member] Level 3 [Member] | Sep. 30, 2013 Money market funds [Member] Total [Member] | Dec. 31, 2012 Money market funds [Member] Total [Member] | Dec. 31, 2012 Commodity contract [Member] Level 1 [Member] | Sep. 30, 2013 Commodity contract [Member] Level 2 [Member] | Dec. 31, 2012 Commodity contract [Member] Level 2 [Member] | Sep. 30, 2013 Commodity contract [Member] Level 3 [Member] | Dec. 31, 2012 Commodity contract [Member] Level 3 [Member] | Sep. 30, 2013 Commodity contract [Member] Total [Member] | Dec. 31, 2012 Commodity contract [Member] Total [Member]
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Assets |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 8,319 |  |  |  |  |  |  |  |  | $ 0 | $ 0 | $ 29,563 | $ 5,595 | $ 0 | $ 0 |  |  | $ 5,856 | $ 175,786 | $ 0 | $ 0 | $ 0 | $ 0 | $ 5,856 | $ 175,786 | $ 3,303 | $ 0 | $ 0 | $ 0 | $ 0 | $ 8,319 | $ 3,303
Liabilities | $ 0 | $ 0 | $ 40,323 | $ 43,442 | $ 0 | $ 0 | $ 40,323 | $ 43,442 | $ 0 | $ 0 | $ 21,358 |  | $ 21,358 | $ 0 | $ 0 | $ 1,872 | $ 0 | $ 1,872 | $ 0 | $ 1,291 | $ 0 | $ 1,291 |  |  |  |  |  |  | $ 29,563 | $ 5,595 |  |  |  |  |  |  |  |  |  | $ 14,587 |  | $ 0 |  | $ 14,587 |
Valuation method used to measure financial instruments [Abstract] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Risk free interest rate |  |  |  |  |  |  |  |  |  |  |  | 0.16% |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Credit rate spread |  |  |  |  |  |  |  |  |  |  |  | 4.38% |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Discount rate |  |  |  |  |  |  |  |  |  |  |  | 4.54% |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |

X
- Definition This element represents the aggregate of the assets reported on the balance sheet at period end measured at fair value by the entity. This element is intended to be used in connection with the fair value disclosures required in the footnote disclosures to the financial statements. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=7578670&loc=d3e19207-110258 + Details
Name: | us-gaap_AssetsFairValueDisclosure
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Details
Name: | us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Risk-free interest rate assumption used in valuing an instrument. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (e) -URI http://asc.fasb.org/extlink&oid=7578670&loc=d3e19207-110258 + Details
Name: | us-gaap_FairValueAssumptionsRiskFreeInterestRate
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_FairValueInputsAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Interest rate used to find the present value of an amount to be paid or received in the future as an input to measure fair value. For example, but not limited to, weighted average cost of capital (WACC), cost of capital, cost of equity and cost of debt. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (bbb) -URI http://asc.fasb.org/extlink&oid=7578670&loc=d3e19207-110258 + Details
Name: | us-gaap_FairValueInputsDiscountRate
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Risk associated with risk of default, credit spread risk and downgrade risk, expressed as a percentage, used as an input to measure fair value. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (bbb) -URI http://asc.fasb.org/extlink&oid=7578670&loc=d3e19207-110258 + Details
Name: | us-gaap_FairValueInputsEntityCreditRisk
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition This element represents the aggregate of the liabilities reported on the balance sheet at period end measured at fair value by the entity. This element is intended to be used in connection with the fair value disclosures required in the footnote disclosures to the financial statements. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=7578670&loc=d3e19207-110258 + Details
Name: | us-gaap_LiabilitiesFairValueDisclosure
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant