Stock-Based Compensation (Details - Options)
$ / shares in Units, $ in Thousands
6 Months Ended
Jun. 30, 2017
USD ($)
$ / shares
shares
Shares  
Options Outstanding, Shares, Beginning of Period | shares 4,486,416
Options Outstanding, Shares, Options Exercised | shares (1,018,437)
Options Outstanding, Shares, Options Canceled | shares (78)
Options Outstanding, Shares, Options Forfeited | shares (1,761)
Options Outstanding, Shares, End of Period | shares 3,466,140
Options Outstanding, Shares, Vested and Expected to Vest | shares 3,466,140
Options Outstanding, Shares, Exercisable | shares 3,390,360
Weighted Average Exercise Price Per Share  
Options Outstanding, Weighted Average Exercise Price, Beginning of Period, USD per Share | $ / shares $ 9.59
Options Outstanding, Weighted Average Exercise Price, Options Exercised, USD per Share | $ / shares 7.88
Options Outstanding, Weighted Average Exercise Price, Options Canceled, USD per Share | $ / shares 9.30
Options Outstanding, Weighted Average Exercise Price, Options Forfeited, USD per Share | $ / shares 26.38
Options Outstanding, Weighted Average Exercise Price, End of Period, USD per Share | $ / shares 10.09
Options Outstanding, Weighted Average Exercise Price Per Share, Vested and Expected to Vest, USD per Share | $ / shares 10.09
Options Outstanding, Weighted Average Exercise Price Per Share, Exercisable, USD per Share | $ / shares $ 9.09
Share-based Compensation Arrangement by Share-based Payment Award, Options, Additional Disclosures [Abstract]  
Options Outstanding, Weighted Average Remaining Contractual Term, End of Period (in years) 4 years 10 months 19 days
Options Outstanding, Weighted Average Remaining Contractual Term, Vested and Expected to Vest (in years) 4 years 10 months 19 days
Options Outstanding, Weighted Average Remaining Contractual Term, Exercisable (in years) 4 years 9 months 14 days
Options Outstanding, Aggregate Intrinsic Value, End of Period | $ $ 177,403
Options Outstanding, Aggregate Intrinsic Value, Vested and Expected to Vest | $ 177,403
Options Outstanding, Aggregate Intrinsic Value, Exercisable | $ $ 176,917