CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2015
Sep. 30, 2014
Operating activities    
Net income (loss) $ (999) $ 4,235
Adjustments to reconcile net income (loss) to net cash provided by operating activities:    
Depreciation expense 2,146 1,880
Amortization of intangible assets 1,113 330
Provision for doubtful accounts 281 271
Stock-based compensation 5,336 3,994
Excess tax benefit from exercise of options for common stock   (18)
Changes in assets and liabilities:    
Accounts receivable (2,097) (4,338)
Inventories (1,779) (175)
Restricted cash   (334)
Prepaid expenses and other current assets (566) (402)
Other assets (247) (24)
Accounts payable 342 956
Accrued liabilities (622) (2,072)
Deferred revenue 347 99
Other long-term liabilities (298) (26)
Net cash provided by operating activities 2,957 4,376
Investing activities    
Purchases of available-for-sale investments (49,095) (86,765)
Proceeds from sales of available-for-sale investments 2,018 2,850
Proceeds from maturities of available-for-sale investments 49,535 11,915
Purchases of property and equipment (2,917) (2,148)
Business acquisitions, net of cash acquired (8,380) (1,116)
Net cash used in investing activities (8,839) (75,264)
Financing activities    
Proceeds from exercise of options for common stock 1,127 4,630
Excess tax benefit from exercise of options for common stock   18
Repurchase of common stock (4,942)  
Repayment of notes payable (722) (847)
Net cash provided by (used in) financing activities (4,537) 3,801
Effect of exchange rate changes on cash and cash equivalents (31) (9)
Net decrease in cash and cash equivalents (10,450) (67,096)
Cash and cash equivalents at beginning of period 29,187 84,546
Cash and cash equivalents at end of period 18,737 17,450
Supplemental disclosure of cash flow information    
Cash paid for interest 85 150
Cash paid for taxes 431 227
Supplemental schedule of non-cash investing and financing activities    
Net unrealized losses on available-for-sale investments $ 65 $ 46