Stock-based compensation (Details) (USD $)
12 Months Ended
Dec. 31, 2014
item
Dec. 31, 2013
Dec. 31, 2012
Stock-based compensation      
Total stock-based compensation expense $ 12,112,000 $ 10,393,000 $ 7,400,000
Liability classified stock-based compensation awards 469,000 717,000  
Number of equity compensation plans 2    
Vesting percentage in one year from vesting start date 25.00%    
Vesting period for twenty five percent from grant date 1 year    
Vesting percentage in equal quarterly installment 6.25%    
Vesting period for six and a quarter vesting percentage 3 months    
Expiration term 10 years    
Research and development      
Stock-based compensation      
Total stock-based compensation expense 3,727,000 3,575,000 2,956,000
General and administrative      
Stock-based compensation      
Total stock-based compensation expense $ 8,385,000 $ 6,818,000 $ 4,444,000