Income Taxes (Tables)
12 Months Ended
Dec. 31, 2013
Income Taxes  
Schedule of domestic and foreign components of net income (loss) before income tax expense

The domestic and foreign components of net income (loss) before income tax expense consists of the following for the periods shown below (in thousands):

 
  Years Ended December 31,  
 
  2011   2012   2013  

Income (loss) before income taxes:

                   

Domestic

  $ (4,697 ) $ (4,055 ) $ 3,633  

Foreign

    812     473     118  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Total income (loss) before income taxes

  $ (3,885 ) $ (3,582 ) $ 3,751  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
               
Schedule of components of provision for income taxes

The provision for income taxes consisted of the following components (in thousands):

 
  Years Ended December 31,  
 
  2011   2012   2013  

Current:

                   

Domestic

                   

Federal

  $ —   $ 15   $ 64  

State

    —     57     53  

Foreign

    —     69     147  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Total current tax expense

    —     141     264  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Deferred:

                   

Domestic

                   

Federal

    (1,773 )   (710 )   1,572  

State

    (280 )   (65 )   44  

Foreign

    251     88     (16 )

Valuation allowance

    1,802     687     (1,616 )
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Total deferred tax benefit

    —     —     (16 )
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Total income tax expense

  $ —   $ 141   $ 248  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
               
Schedule of reconciliation from the U.S. statutory federal income tax rate to the effective income tax rate

A reconciliation from the U.S. statutory federal income tax rate to the effective income tax rate follows:

 
  Years Ended December 31,  
 
  2011   2012   2013  

Federal income tax rate

    (34.0 )%   (34.0 )%   34.0 %

State taxes, net of federal benefit

    (4.1 )   1.1     1.1  

Stock-based compensation

    9.1     15.0     22.7  

Stock warrant

    —     —     6.4  

Research and development credits

    (16.0 )   —     (18.3 )

Change in valuation allowance

    46.4     17.3     (42.0 )

Other, net

    (1.4 )   4.5     2.7  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Effective income tax rate

    0.0 %   3.9 %   6.6 %
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
               
Schedule of deferred tax assets and (liabilities)

Deferred tax assets and (liabilities) are comprised of the following (in thousands):

 
  December 31,  
 
  2012   2013  

Deferred Tax Assets:

             

Reserves and accruals

  $ 3,396   $ 2,146  

Inventories

    606     1,059  

Net operating loss carryforwards

    30,165     27,865  

Property, plant and equipment

    1,054     1,327  

Stock-based compensation

    783     1,233  

Research and development credit carryforwards

    3,254     4,091  

Other

    204     163  
           
​ ​ ​ ​ ​ ​ ​ ​

Total deferred tax assets

    39,462     37,884  

Valuation allowance

    (39,462 )   (37,842 )
           
​ ​ ​ ​ ​ ​ ​ ​

Total deferred tax assets

  $ —   $ 42  

Deferred Tax Liabilities:

   
 
   
 
 

Undistributed earnings of foreign subsidiaries

    —   $ (15 )

Property and equipment

    —     (11 )
           
​ ​ ​ ​ ​ ​ ​ ​

Total deferred tax liabilities

  $ —   $ (26 )
           
​ ​ ​ ​ ​ ​ ​ ​

Net deferred tax asset

  $ —   $ 16  
           
​ ​ ​ ​ ​ ​ ​ ​
​ ​ ​ ​ ​ ​ ​ ​
           
Schedule of net operating loss and tax credit carryforwards

Net operating loss and tax credit carryforwards as of December 31, 2013 are as follows (in thousands):

 
  Amount   Expiration Years

Net operating losses, federal

  $ 77,435   2023 - 2031

Net operating losses, state

    75,640   2018 - 2031

Tax credit carryforwards, federal

    3,158   2023 - 2033

Tax credit carryforwards, state

    1,413   2018 - 2028

Net operating losses, foreign

    21   None
Schedule of reconciliation of the changes in the gross balance of unrecognized tax benefits, excluding interest and penalties

The following is a reconciliation of the changes in the gross balance of unrecognized tax benefits, excluding interest and penalties (in thousands):

 
  Years Ended December 31,  
 
  2011   2012   2013  

Balance at the beginning of the period

  $ 1,862   $ 2,318   $ 2,318  

Current year additions

    456     —     625  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Balance at the end of the period

  $ 2,318   $ 2,318   $ 2,943  
               
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​