Loans and allowance for loan losses (Details 7) - USD ($)
$ in Thousands
3 Months Ended 9 Months Ended 12 Months Ended
Sep. 30, 2016
Sep. 30, 2015
Sep. 30, 2016
Sep. 30, 2015
Dec. 31, 2015
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance $ 3,523 $ 5,567 $ 3,562 $ 5,729 $ 5,729
Provision for (Recovery of) Loan Losses 0 0 0 0 (2,000)
Charge-offs (224) (141) (466) (784) (816)
Recoveries 120 70 323 551 649
Ending balance 3,419 5,496 3,419 5,496 3,562
Residential [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 31 92 30 34 34
Provision for (Recovery of) Loan Losses 12 (9) 12 48 (6)
Charge-offs 0 0 0 0 0
Recoveries 0 0 1 1 2
Ending balance 43 83 43 83 30
Commercial [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 259 369 291 202 202
Provision for (Recovery of) Loan Losses 22 113 (10) 443 292
Charge-offs (10) (67) (10) (252) (252)
Recoveries 5 0 5 22 49
Ending balance 276 415 276 415 291
Commercial Real Estate [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 1,204 2,562 1,695 2,651 2,651
Provision for (Recovery of) Loan Losses 39 (145) (571) (109) (866)
Charge-offs (58) 0 (66) (127) (127)
Recoveries 51 35 178 37 37
Ending balance 1,236 2,452 1,236 2,452 1,695
Home equity lines [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 259 441 448 469 469
Provision for (Recovery of) Loan Losses 4 59 (134) 70 36
Charge-offs 0 (14) (53) (54) (62)
Recoveries 1 1 3 2 5
Ending balance 264 487 264 487 448
Construction and Land Development [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 290 461 321 236 236
Provision for (Recovery of) Loan Losses 34 104 2 491 286
Charge-offs (10) (67) (10) (252) (252)
Recoveries 5 0 6 23 51
Ending balance 319 498 319 498 321
Owner Occupied [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 711 1,687 1,167 1,837 1,837
Provision for (Recovery of) Loan Losses (17) (151) (464) (173) (576)
Charge-offs (57) 0 (66) (127) (127)
Recoveries 0 33 0 33 33
Ending balance 637 1,569 637 1,569 1,167
Non-Owner Occupied [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 437 639 460 607 607
Provision for (Recovery of) Loan Losses 53 51 27 81 (151)
Charge-offs (1) 0 0 0 0
Recoveries 51 2 53 4 4
Ending balance 540 692 540 692 460
Multifamily [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 54 109 51 77 77
Provision for (Recovery of) Loan Losses 2 3 5 34 (26)
Charge-offs 0 0 0 0 0
Recoveries 0 0 0 0 0
Ending balance 56 112 56 112 51
Farmland [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 2 127 17 130 130
Provision for (Recovery of) Loan Losses 1 (48) (139) (51) (113)
Charge-offs 0 0 0 0 0
Recoveries 0 0 125 0 0
Ending balance 3 79 3 79 17
First Deed of Trust [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 490 1,192 602 1,345 1,345
Provision for (Recovery of) Loan Losses 79 72 (20) (384) (1,020)
Charge-offs (113) (37) (140) (103) (103)
Recoveries 6 5 20 374 380
Ending balance 462 1,232 462 1,232 602
Second Deed of Trust [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 133 250 111 275 275
Provision for (Recovery of) Loan Losses (11) (17) 23 0 (159)
Charge-offs 0 0 (25) (55) (55)
Recoveries 6 12 19 25 50
Ending balance 128 245 128 245 111
Consumer Real Estate [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 882 1,883 1,161 2,089 2,089
Provision for (Recovery of) Loan Losses 72 114 (131) (314) (1,143)
Charge-offs (113) (51) (218) (212) (220)
Recoveries 13 18 42 401 435
Ending balance 854 1,964 854 1,964 1,161
Commercial and industrial loans (except those secured by real estate) [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 226 382 94 506 506
Provision for (Recovery of) Loan Losses (46) (67) 42 (87) (350)
Charge-offs (15) 0 (15) (162) (162)
Recoveries 46 15 90 73 100
Ending balance 211 330 211 330 94
Guaranteed student loans [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 191 253 230 217 217
Provision for (Recovery of) Loan Losses 13 (21) 101 14 13
Charge-offs (16) (2) (143) (1) 0
Recoveries 0 0 0 0 0
Ending balance 188 230 188 230 230
Consumer And Other [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 8 26 2 30 30
Provision for (Recovery of) Loan Losses 7 15 13 5 1
Charge-offs (12) (21) (14) (30) (55)
Recoveries 5 2 7 17 26
Ending balance 8 $ 22 8 22 2
Unallocated [Member]          
Financing Receivable, Allowance for Credit Losses [Line Items]          
Beginning balance 722   59 $ 0 0
Provision for (Recovery of) Loan Losses (119)   544   59
Charge-offs 0   0   0
Recoveries 0   0   0
Ending balance $ 603   $ 603   $ 59