Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.
var optionSelectors = new Shopify.OptionSelectors...
// Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.
optionSelectors.selectVariant({{ product.selected_or_first_available_variant.id }});