';
var is_color = false;
var is_circle = 'circle';
if (/Color|Colour/i.test(product.options[i])) {
is_color = true;
}
if (swatch_color_type == '2') {
is_color = false;
is_circle = '';
}
var optionValues = new Array();
for (var j = 0; j < product.variants.length; j++) {
var variant = product.variants[j];
var value = variant.options[i];
if(variant.featured_image && woodmart_settings.product_data.product_swatch_setting == '2'){
var img = variant.featured_image.src.lastIndexOf(".");
var vimg = variant.featured_image.src.slice(0, img) + "_50x50_crop_center" + variant.featured_image.src.slice(img);
}
var valueHandle = convertToSlug(value);
var forText = 'swatch-6204681748653-' + i + '-' + valueHandle;
if (optionValues.indexOf(value) < 0) {
options += '
';
if (is_color) {
options += '
' + value + '
';
}
options += '
';
if (is_color) {
if(vimg && woodmart_settings.product_data.product_swatch_setting == '2'){
options += '
';
}else{
options += '
';
}
} else {
options += '
';
}
options += '
';
if (variant.available) {
$('#product-form-quick-6204681748653 .swatch[data-option-index="' + i + '"] .' + valueHandle).removeClass('soldout').addClass('available').find(':radio').removeAttr('disabled');
}
optionValues.push(value);
}
}
options += '