Income taxes (Narrative) (Details) (USD $)
0 Months Ended 12 Months Ended
Jun. 30, 2013
Dec. 31, 2014
Dec. 31, 2013
Dec. 31, 2012
Jun. 30, 2013
Operating Loss Carryforwards [Line Items]          
Effective income tax rate   4.50%      
Company's pretax income   $ 3,915,000 $ 699,000 $ 6,030,000  
Federal tax rate   34.00%      
Anticipated future tax rate   35.00%      
Nondeductible merger related costs   974,000 0 0  
Income tax expense (benefit)   178,000 (50,146,000) 79,000  
Reversal of valuation allowance 41,600,000 0 (41,632,000) 0  
Previously written off section 382 deferred tax benefits 8,500,000       8,500,000
Deferred tax assets, operating loss carryforwards   32,100,000 27,400,000    
Deferred tax assets, operating loss carryforwards state and local   6,600,000 5,700,000    
Deferred tax assets, charitable contribution carryforwards   800,000 700,000    
Deferred tax assets, federal tax credit carryforwards   1,300,000 1,000,000    
Deferred tax assets, state tax credit carryforwards   100,000 100,000    
Charitable contribution carryforward amount   2,100,000      
Valuation allowance for deferred tax assets   (78,000) (74,000) (41,700,000)  
Proceeds from Issuance of Common Stock   177,000,000      
Domestic Tax Authority [Member]          
Operating Loss Carryforwards [Line Items]          
Operating loss carryforwards   91,700,000      
Tax credit carryforward   1,300,000      
State and Local Jurisdiction [Member]          
Operating Loss Carryforwards [Line Items]          
Operating loss carryforwards   147,000,000      
Tax credit carryforward   $ 200,000