Short-term borrowings (Details 2) - USD ($)
$ in Thousands
Dec. 31, 2015
Dec. 31, 2014
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings $ 225,832 $ 69,136
Repurchase agreement    
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings 75,482  
Repurchase agreement | Collateralized mortgage obligations    
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings 7,175  
Repurchase agreement | U.S. Treasury and U.S. government sponsored entities    
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings 5,276  
Repurchase agreement | State and political subdivisions    
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings 2,640  
Repurchase agreement | Mortgage-backed securities - residential    
Assets Sold Under Agreements To Repurchase [Line Items]    
Total borrowings $ 60,391