STOCK-BASED COMPENSATION - Allocation of Share-based Compensation (Details) - USD ($)
$ in Thousands
3 Months Ended 9 Months Ended
Sep. 30, 2016
Sep. 30, 2015
Sep. 30, 2016
Sep. 30, 2015
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense $ 1,527 $ 4,955 $ 5,381 $ 8,863
Cost of revenue        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 44 200 124 517
Research and development        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 85 374 396 673
Sales and marketing        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 341 1,672 1,283 3,143
General and administrative        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 1,057 2,709 3,578 4,530
Employees        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 1,519 4,907 5,367 8,638
Non-employees        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 8 48 14 225
Stock options        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 819 3,279 2,135 4,388
Restricted stock        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 346 0 692 0
Restricted stock units (RSUs)        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense 262 1,590 2,261 4,259
Employee Stock Purchase Plan        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Allocated stock-based compensation expense $ 100 $ 86 $ 293 $ 216