Code to paste at the very bottom of your product.liquid template to make clicks on thumbnails update selected variants.