Loans and reserve for credit losses (Allowance for Credit Losses on Financing Receivables) (Details) (USD $)
In Thousands, unless otherwise specified
12 Months Ended
Dec. 31, 2014
Dec. 31, 2013
Dec. 31, 2012
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period $ 20,857    
Loan loss provision (credit) 0 1,000 1,100
Balance at end of period 22,053 20,857  
Total reserve for credit losses 22,493 21,297 27,701
Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 20,857 27,261 43,905
Loan loss provision (credit) 0 1,000 1,100
Recoveries 6,439 5,132 4,449
Loans charged off (5,243) (12,536) (22,193)
Balance at end of period 22,053 20,857 27,261
Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 440 440 1,550
Loan loss provision (credit) 0 0 (1,110)
Balance at end of period 440 440 440
Commercial real estate      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 5,614 9,565  
Total reserve for credit losses 5,662 9,613 11,644
Commercial real estate | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 9,565 11,596 21,648
Loan loss provision (credit) (4,484) 203 2,829
Recoveries 1,801 1,034 198
Loans charged off (1,268) (3,268) (13,079)
Balance at end of period 5,614 9,565 11,596
Commercial real estate | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 48 48 28
Loan loss provision (credit) 0 0 20
Balance at end of period 48 48 48
Construction      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 1,133 535  
Total reserve for credit losses 1,401 803 1,851
Construction | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 535 1,583 5,398
Loan loss provision (credit) (348) 159 (4,135)
Recoveries 1,242 708 584
Loans charged off (296) (1,915) (264)
Balance at end of period 1,133 535 1,583
Construction | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 268 268 29
Loan loss provision (credit) 0 0 239
Balance at end of period 268 268 268
Residential real estate      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 2,121 2,381  
Total reserve for credit losses 2,146 2,406 3,576
Residential real estate | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 2,381 3,551 3,259
Loan loss provision (credit) (315) (1,013) 2,650
Recoveries 929 433 262
Loans charged off (874) (590) (2,620)
Balance at end of period 2,121 2,381 3,551
Residential real estate | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 25 25 184
Loan loss provision (credit) 0 0 (159)
Balance at end of period 25 25 25
Commercial and industrial      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 6,844 6,261  
Total reserve for credit losses 6,919 6,336 7,342
Commercial and industrial | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 6,261 7,267 11,291
Loan loss provision (credit) (12) 1,808 (2,094)
Recoveries 2,158 2,694 3,094
Loans charged off (1,563) (5,508) (5,024)
Balance at end of period 6,844 6,261 7,267
Commercial and industrial | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 75 75 487
Loan loss provision (credit) 0 0 (412)
Balance at end of period 75 75 75
Consumer      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 1,047 1,401  
Total reserve for credit losses 1,071 1,425 2,201
Consumer | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 1,401 2,177 2,292
Loan loss provision (credit) 579 216 780
Recoveries 309 263 311
Loans charged off (1,242) (1,255) (1,206)
Balance at end of period 1,047 1,401 2,177
Consumer | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 24 24 822
Loan loss provision (credit) 0 0 (798)
Balance at end of period 24 24 24
Unallocated      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at end of period 5,294 714  
Total reserve for credit losses 5,294 714 1,087
Unallocated | Loan Losses      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 714 1,087 17
Loan loss provision (credit) 4,580 (373) 1,070
Recoveries 0 0 0
Loans charged off 0 0 0
Balance at end of period 5,294 714 1,087
Unallocated | Unfunded Lending Commitments      
Allowance for Loan and Lease Losses [Roll Forward]      
Balance at beginning of period 0 0 0
Loan loss provision (credit) 0 0 0
Balance at end of period $ 0 $ 0 $ 0