| Balances of commitments and contingencies | 
   
   
   |  |  |  |  |  |  |  |  |  |  |  |  |  |  
   |  |  | September 30, |  |  | December 31, |  |  | September 30, |  |  
   |  |  | 2012 |  |  | 2011 |  |  | 2011 |  |  
   | Commitments with off-balance sheet risk: |  |  |  |  |  |  |  |  |  |  |  |  |  
   | Commitments to extend credit 
   (1) |  | $ | 844,190 |  |  | $ | 720,317 |  |  | $ | 735,129 |  |  
   | Standby letters of credit |  |  | 46,861 |  |  |  | 38,068 |  |  |  | 40,242 |  |  
   | Mortgage loan rate lock commitments |  |  | 172,316 |  |  |  | 45,820 |  |  |  | 132,691 |  |  
   |  |  |   |   |  |  |   |   |  |  |   |   |  |  
   | Total commitments with off-balance sheet risk |  | $ | 1,063,367 |  |  | $ | 804,205 |  |  | $ | 908,062 |  |  
   |  |  |   |   |  |  |   |   |  |  |   |   |  |  
   | Commitments with balance sheet risk: |  |  |  |  |  |  |  |  |  |  |  |  |  
   | Loans held for sale |  | $ | 141,965 |  |  | $ | 74,823 |  |  | $ | 61,786 |  |  
   |  |  |   |   |  |  |   |   |  |  |   |   |  |  
   | Total other commitments |  | $ | 1,205,332 |  |  | $ | 879,028 |  |  | $ | 969,848 |  |  
   |  |  |   |   |  |  |   |   |  |  |   |   |  |    
   
   | (1) | Includes unfunded overdraft protection. |  |