The following table summarizes the changes in accumulated other comprehensive income (loss), which is reported as a component of shareholders’ equity, for the years ended December 31, 2019 and 2018: | | | | | | | | Accumulated Other Comprehensive Income (Loss) | | Years ended | | December 31, 2019 | | December 31, 2018 | | $ | | $ | Balance, beginning of the year | (12,216 | ) | | 3,435 |
| | | | | Other comprehensive income (loss) before reclassifications | 12,865 |
| | (19,821 | ) | Loss on cash flow hedges reclassified from accumulated other comprehensive income (loss) to earnings were as follows: | | | | Cost of revenues | 279 |
| | 255 |
| Sales and marketing | 1,538 |
| | 1,224 |
| Research and development | 2,620 |
| | 2,063 |
| General and administrative | 744 |
| | 628 |
| Tax effect on unrealized gain (loss) on cash flow hedges | (4,784 | ) | | — |
| Other comprehensive income (loss), net of tax | 13,262 |
| | (15,651 | ) | Balance, end of the year | 1,046 |
| | (12,216 | ) |
|