Short-term borrowings (Details 1) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2015
Dec. 31, 2014
Dec. 31, 2013
Summary of securities sold under agreements to repurchase      
Average balance during the year $ 71,779 $ 71,573 $ 90,951
Average interest rate during the year 0.07% 0.04% 0.04%
Maximum month-end balance during the year $ 89,574 $ 78,972 $ 100,462
Weighted average year-end interest rate 0.06% 0.06% 0.06%
Balance at year-end $ 75,482 $ 58,786 $ 75,267