';
}
$('#price-field').html(newHtml); // update price field
} else {
// variant doesn't exist
$('#productinfo #detail #purchase').addClass('disabled').attr('disabled', 'disabled'); // set add-to-cart button to unavailable class and disable button
var message = variant ? "Sold Out" : "Unavailable";
$('#price-field').text(message); // update price-field message
}
};
//Set up product inputs
$(function() {
new Shopify.OptionSelectors("product-select", { product: {"id":7406620161,"title":"Freewater Mandy","handle":"freewater-womens-mandy","description":"\u003cdiv\u003e\u003cstrong\u003e25% OFF!\u003c\/strong\u003e\u003c\/div\u003e\n\u003cul\u003e\n\u003cli\u003eGive your summer style an overhaul with the sweet Freewaters® Mandy sandal!\u003c\/li\u003e\n\u003cli\u003eTextile strap for a soft feel.\u003c\/li\u003e\n\u003cli\u003eWoven logo patch adorns strap.\u003c\/li\u003e\n\u003cli\u003ePillowed mosaic footbed with arch support for all-day comfort.\u003c\/li\u003e\n\u003cli\u003eRubber outsole for durable wear.\u003c\/li\u003e\n\u003cli\u003eImported.\u003c\/li\u003e\n\u003cli class=\"measurements\"\u003eWeight: 3 oz\u003c\/li\u003e\n\u003c\/ul\u003e","published_at":"2016-08-12T17:15:00-04:00","created_at":"2016-08-12T17:18:33-04:00","vendor":"Freewaters","type":"Footwear","tags":["Freewater"],"price":2625,"price_min":2625,"price_max":2625,"available":true,"price_varies":false,"compare_at_price":3500,"compare_at_price_min":3500,"compare_at_price_max":3500,"compare_at_price_varies":false,"variants":[{"id":23338752449,"title":"5","option1":"5","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Freewater Mandy - 5","public_title":"5","options":["5"],"price":2625,"weight":454,"compare_at_price":3500,"inventory_quantity":1,"inventory_management":"shopify","inventory_policy":"deny","barcode":"847273032754"},{"id":23338752513,"title":"10","option1":"10","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Freewater Mandy - 10","public_title":"10","options":["10"],"price":2625,"weight":454,"compare_at_price":3500,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"847273032808"}],"images":["\/\/http:\/\/cdn.shopify.com\/s\/files\/1\/0203\/7856\/products\/3061425-p-MULTIVIEW.jpg?v=1471036714"],"featured_image":"\/\/http:\/\/cdn.shopify.com\/s\/files\/1\/0203\/7856\/products\/3061425-p-MULTIVIEW.jpg?v=1471036714","options":["Size"],"content":"\u003cdiv\u003e\u003cstrong\u003e25% OFF!\u003c\/strong\u003e\u003c\/div\u003e\n\u003cul\u003e\n\u003cli\u003eGive your summer style an overhaul with the sweet Freewaters® Mandy sandal!\u003c\/li\u003e\n\u003cli\u003eTextile strap for a soft feel.\u003c\/li\u003e\n\u003cli\u003eWoven logo patch adorns strap.\u003c\/li\u003e\n\u003cli\u003ePillowed mosaic footbed with arch support for all-day comfort.\u003c\/li\u003e\n\u003cli\u003eRubber outsole for durable wear.\u003c\/li\u003e\n\u003cli\u003eImported.\u003c\/li\u003e\n\u003cli class=\"measurements\"\u003eWeight: 3 oz\u003c\/li\u003e\n\u003c\/ul\u003e"}, onVariantSelected: selectCallback });
jQuery('.single-option-selector:eq(' + 0 + ')').val("5").trigger('change');
//Hide original option label if we now have multiple options
if($('.selector-wrapper .single-option-selector').length != 1) {
$('#product-select').siblings('label[for="product-select"]').hide();
}
//Style any added select dropdowns
$.selectReplace();
});