4 Gift Rule Tags
');}else{vt_secondary.removeClass('hide');vt_secondary_select.removeClass('hide');}}function loadTertiaryValues(value1, value2){var trigger_change = false;var html = '
';$.each(prices_data.primary_dimensions, function(i, primary){if ( primary.name == value1 ){$.each(primary.secondary_dimensions, function(j, secondary){if ( secondary.name == value2 ){if(secondary.tertiary_dimensions.length == 1) // If there is only one option available, we want it to be selected by default{$.each(secondary.tertiary_dimensions, function (k, tertiary) {html += '
';});trigger_change = true;}else{$.each(secondary.tertiary_dimensions, function(k, tertiary){html += '
';})}}});}});$('#viewerToolNotext select[name^="tertiary_dimension"]').html(html).removeAttr('disabled');var vt_tertiary = $('#viewerToolNotext').find('.vt-line-tertiary');var vt_tertiary_select = $('#viewerToolNotext select[name^="tertiary_dimension"]');if(vt_tertiary.length > 0){vt_tertiary.find('.tertiary-label').remove();}if(trigger_change === true){vt_tertiary_select.trigger('change');vt_tertiary.removeClass('hide');// vt_tertiary_select.addClass('hide');vt_tertiary.find('.main-field').addClass('hide');vt_tertiary.find('.main-field').after('
' + $('#viewerToolNotext select[name^="tertiary_dimension"] option:selected').text() + '
');vt_tertiary_select.trigger('change');}else{vt_tertiary.removeClass('hide');// vt_tertiary_select.removeClass('hide');vt_tertiary.find('.main-field').removeClass('hide');}}function clearSecondaryValues(){$('#viewerToolNotext').find('.vt-line-secondary').addClass('hide');$('#viewerToolNotext select[name^="secondary_dimension"]').html('
').attr('disabled', 'disabled');}function clearTertiaryValues(){// Need to add 'hide' back into the option line because if the primary option is changed, this line is dependent on the// secondary option value and the line needs to return to not being visible until that has been selected.$('#viewerToolNotext').find('.vt-line-tertiary').addClass('hide');$('#viewerToolNotext select[name^="tertiary_dimension"]').html('
').attr('disabled', 'disabled');console.log('clear tertiary values');}function primaryChange(){if ( dimensions_data.length > 1 ){var secondary_value = $('#viewerToolNotext select[name^="secondary_dimension"]').val() || '';var value = $(this).val();if ( value != '' ){loadSecondaryValues(value);var new_secondary_value = $('#viewerToolNotext select[name^="secondary_dimension"]').val() || '';if ( secondary_value != '' && new_secondary_value == ''){$('#viewerToolNotext select[name^="secondary_dimension"] option[value="' + secondary_value + '"]').prop('selected', true);$('#viewerToolNotext select[name^="secondary_dimension"]').change();}}else{clearSecondaryValues();clearTertiaryValues();}}toggleAdditionals();updatePrice();}function secondaryChange(){if ( dimensions_data.length > 2 ){var tertiary_value = $('#viewerToolNotext select[name^="tertiary_dimension"]').val() || '';var value = $(this).val();if ( value != '' ){loadTertiaryValues($('#viewerToolNotext select[name^="primary_dimension"]').val(), value);var new_tertiary_value = $('#viewerToolNotext select[name^="tertiary_dimension"]').val() || '';if ( tertiary_value != '' && new_tertiary_value == ''){$('#viewerToolNotext select[name^="tertiary_dimension"] option[value="' + tertiary_value + '"]').prop('selected', true);$('#viewerToolNotext select[name^="tertiary_dimension"]').change();}}else{clearTertiaryValues();}}toggleAdditionals();updatePrice();}function tertiaryChange(){toggleAdditionals();updatePrice();}function updatePrice(){var html = '';var pricePerBase = 0;var pricePerAdditional = 0;var priceTotal = 0;var price_flag = true;var line_route = {};// Only one 'line', so set this appropriatelyvar vt_options = [];var line_number = 1;if ( dimensions_data.length > 0 ){html += '' + dimensions_data[0].attribute_label + ': ' + $('#viewerToolNotext select[name^="primary_dimension"]').val() + '
';if ( dimensions_data.length >= 2 ){html += '' + dimensions_data[1].attribute_label + ': ' + $('#viewerToolNotext select[name^="secondary_dimension"]').val() + '
';}if ( dimensions_data.length >= 3 ){html += '' + dimensions_data[2].attribute_label + ': ' + $('#viewerToolNotext select[name^="tertiary_dimension"]').val() + '
';}var select1 = $('#viewerToolNotext select[name^="primary_dimension"]').val(),select2 = $('#viewerToolNotext select[name^="secondary_dimension"]').val(),select3 = $('#viewerToolNotext select[name^="tertiary_dimension"]').val();if ( dimensions_data.length == 1 && select1 != '' ){$.each(prices_data.primary_dimensions, function(i, primary){if ( primary.name == select1 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[0].attribute_id+":"+primary.id ));pricePerBase += Number(primary.price);}});}else if ( dimensions_data.length == 2 && select1 != '' && select2 != '' ){$.each(prices_data.primary_dimensions, function(i, primary){if ( primary.name == select1 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[0].attribute_id+":"+primary.id ));$.each(primary.secondary_dimensions, function(j, secondary){if ( secondary.name == select2 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[1].attribute_id+":"+secondary.id ));pricePerBase += Number(secondary.price);}})}});}else if ( dimensions_data.length == 3 && select1 != '' && select2 != '' && select3 != '' ){$.each(prices_data.primary_dimensions, function(i, primary){if ( primary.name == select1 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[0].attribute_id+":"+primary.id ));$.each(primary.secondary_dimensions, function(j, secondary){if ( secondary.name == select2 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[1].attribute_id+":"+secondary.id ));$.each(secondary.tertiary_dimensions, function(k, tertiary){if ( tertiary.name == select3 ){// Set chosen filter options - time to shipvt_options.push(md5Hash.md5( "vtat"+":"+dimensions_data[2].attribute_id+":"+tertiary.id ));pricePerBase += Number(tertiary.price);}})}})}});}else{price_flag = false;}} // end if ( dimensions )// additionals$('#viewerToolNotext .dd:visible select[name^="additional"], #viewerToolNotext .dd:visible input[name^="additional"]').each(function(){if ( $(this).is('select') || $(this).is(':checked') || $(this).attr('type') == 'text' ){if ( $(this).attr('type') != 'text' ){// json decode itvar option = urldecode($(this).val() || '{}').evalJSON();// Set chosen filter options (for additional) - time to shipvar add_id = $(this).attr('name').split("_").last();if( !$.isEmptyObject(option) ){vt_options.push(md5Hash.md5( "vtad"+":"+add_id+":"+option.id ));}// its a numberif ( Number(option.price) && option.price != '0.00' ){var pric = option.price_type == 'percent' ? pricePerBase * Number(option.price) : Number(option.price);pricePerAdditional += pric;}}html += '' + $(this).closest('.dd').prev().find('label').text().replace(/[^a-zA-Z0-9_ ]/g, '') + ': ';if ( $(this).is('select') ){html += $.trim($(this).find(':selected').text());}else if ( $(this).is(':checked') ){html += $.trim($(this).parent().text());}else if ( $(this).attr('type') == 'text' ){html += $.trim(this.value.replace(/\';}});// Set all chosen options to numbered line - time to shipline_route[line_number] = vt_options;priceTotal += pricePerBase + pricePerAdditional;// Pass chosen options per line, to calculate time to ship$j(opConfig).data('timetoshipOptions',{vt : line_route});$('#options_' + option_id + '_complex').val(price_flag ? html : '');if ( typeof opConfig.config != 'undefined' ){priceFinal = price_flag ? priceTotal : 0;priceObject = {price: priceFinal,};opConfig.config[option_id] = priceObject;price = price_flag ? priceTotal : 0;opConfig.reloadPrice();}else{price = price_flag ? priceTotal : 0;}}function validateOption(){$(this).closest('.dd').removeClass('has-error').find('div.validation-advice').remove();var error = false;if ( $(this).is('select') ){error = $(this).val() == '';}else if ( $(this).is('input[type="radio"]') ){error = $(this).closest('.dd').find('input:checked').length == 0;}else if ( $(this).is('input[type="text"]') ){error = $.trim($(this).val()) == '';}// there was an error and it was required!if ( error && $(this).closest('.dd').prev().find('label em').length > 0 ){$(this).closest('.dd').addClass('has-error');$(this).closest('.dd').find('.main-field').after('
This is a required field.
');}}function validate(callback){var errorFlag = false;if ( validateThis ){if ( dimensions_data.length >= 1 ){if ( $('#viewerToolNotext select[name^="primary_dimension"]').val() == '' ){validateOption.call($('#viewerToolNotext select[name^="primary_dimension"]').get(0));errorFlag = true;}}if ( dimensions_data.length >= 2 ){if ( $('#viewerToolNotext select[name^="secondary_dimension"]').val() == '' ){validateOption.call($('#viewerToolNotext select[name^="secondary_dimension"]').get(0));errorFlag = true;}}if ( dimensions_data.length >= 3 ){if ( $('#viewerToolNotext select[name^="tertiary_dimension"]').val() == '' ){validateOption.call($('#viewerToolNotext select[name^="tertiary_dimension"]').get(0));errorFlag = true;}}// now check the additionals$('#viewerToolNotext [class*="additional_"]:visible').each(function(){if ( $(this).prev().find('label em').length == 0 )return;var el = $(this).find('[name^="additional"]');if ( (el.is('select') && el.val() == '') ||(el.attr('type') == 'radio' && el.is(':checked')) ||(el.attr('type') == 'text' && $.trim(el.val()) == '') ){validateOption.call($(this).find('select, input').get(0));errorFlag = true;}});}// successif ( !errorFlag ){updatePrice();submit(callback);}}function submit(callback){// insert into the hidden objectvar text = {};text.product_id = 178009;text.option_id = 526663;text.base_url = base_url;text.version = 2;text.type = 'notext';text.price = price.toFixed(2);text.lines = [];var line = {};// Set line id - time to ship// Only one 'line', so set this appropriatelyline.uid = 1;$('.vt-line-option').find('.dd:visible').each(function(){var name = $(this).find('input[type="text"], input[type="radio"], select').attr('name');if ( name == undefined ){return;}// get the value according to the typeif ( $(this).find('input[type="text"], select').length > 0 ){line[name] = $(this).find('input[type="text"], select').val() || '';}else if ( $(this).find('input[type="radio"]').length > 0 ){// if this is an additional radio, we need change the name. We remove the timestamp off the endname = $(this).find('input[type="radio"]').attr('name').split('_');name.pop();name = name.join('_');line[name] = $(this).find('input[type="radio"]:checked').val() || '';}// escapeif (typeof(line[name]) !== 'undefined') line[name] = urlencode($.trim(line[name]));});// Set all option filter data to variable, to save and pass later - time to shipline.option_filters = $j(opConfig).data('timetoshipOptions').vt[line.uid];// add to the text configtext.lines.push(line);// save it to the hidden input$('.dd-my-text input[type="hidden"]').val('WMIShops_ViewerTool_Model_HiddenPriceHandler~' + Object.toJSON(text));if ( typeof callback == 'function' ){callback();}else{if ( typeof productAddToCartForm == 'object' ){productAddToCartForm.submit($j('form#product_addtocart_form .btn-cart')[0]);}else{var vf = new VarienForm('product_addtocart_form');vf.submit = function(){if ( this.validator.validate() ){this.form.submit();}}.bind(vf);vf.submit();}}}function toggleAdditionals(){//var lineOptions = el[el.hasClass('vt_line') ? 'find' : 'closest']('.vt_lineOptions');var visible = [];var additional_ids = [];for ( var additional_id in additionals_childof ){var additional = $('#viewerToolNotext .additional_' + additional_id);if ( additional.is(':visible') ){visible.push(additional_id);}additional.closest('.vt-line-option').addClass('hide');}$('#viewerToolNotext select, #viewerToolNotext input:checked').each(function(){_toggleAdditionals($(this))})function _toggleAdditionals(el){if ( el.length == 0 ) return;if ( !el.closest('.dd').is(':visible') ) return;el = el.get(0).tagName == 'SELECT' ? el.find('option:selected') : el;// lets find what additionals or primary/secondary/tertiary have this valuefor ( var additional_id in additionals_childof ){var childof = additionals_childof[additional_id];if ( !childof || !childof.values )continue;for ( var i = 0, value; value = childof.values[i++]; ){if ( el.hasClass(value.type_id) && el.closest('.vt-line-option').hasClass('vt-line-' + childof.type) ){_toggleAdditionals($('#viewerToolNotext .additional_' + additional_id).closest('.vt-line-option').removeClass('hide').filter('select, input:checked'));if ( $.inArray(additional_id, visible) == -1 ){additional_ids.push(additional_id);}break;}if($('.additional_' + additional_id).is(':visible') && $('.vt-addl-' + additional_id).find('.dd.additional-label').length > 0){$('.vt-addl-' + additional_id).find('.dd.additional-label').removeClass('hide');}else{$('.vt-addl-' + additional_id).find('.dd.additional-label').addClass('hide');}}}}// for ( var i = 0, additional_id; additional_id = additional_ids[i++]; )// {// $('#viewerToolNotext dt.additional_' + additional_id).stop().css('background-color', '#f3d97b').animate({ backgroundColor : 'transparent' }, 1500);// }}function selectedAdditional(value, name, position){var el = $('#viewerToolNotext [name="' + name + '"]');value = urldecode(value).evalJSON();(el.is('select') ? el.find('option') : el).each(function(){var val = urldecode(this.value || '{}').evalJSON();if ( val.id == value.id ){this[$(this).is('option') ? 'selected' : 'checked'] = true;// Check and update Color 'faux select' if needed.if ($j(el).prev().find(".faux-select-content [data-id='" + value.id + "']").length === 0) {$j(el).prev().find(".faux-select-content").html($j(el).prev().find(".faux-select-options a[data-id='" + value.id + "']").html());}}})toggleAdditionals();$.magnificPopup.close();}function preLoad(){var vt_element = $('#viewerToolNotext');var fInputs = $(vt_element).find("input, select");var path = window.location.search;$.urlParams = function(url){var result = {};var searchIndex = url.indexOf("?");if (searchIndex == -1 ) return result;var sPageURL = url.substring(searchIndex +1);var sURLVariables = sPageURL.split('&');for (var i = 0; i < sURLVariables.length; i++){var sParameterName = sURLVariables[i].split('=');result[decodeURIComponent(sParameterName[0])] = decodeURIComponent(sParameterName[1]);}return result;};var params = $.urlParams(path);if( Object.keys(params).length <= 0){ return; }var imageSet = false;$(vt_element).each(function(){var thisone = $(this);var orderedParams = [];for( var pk in params ){if(pk == "SID"){continue;}if(pk == "price_start"){continue;}if(pk == "item_image"){if( imageSet === true ){continue;}var pseudoImagePath = 'https://www.craftcuts.com/media/pseudo_images/feed/'+params[pk];var pseudoImagePathLarge = 'https://www.craftcuts.com/media/pseudo_images/resize/800x800/'+params[pk];var pseudoImagePathSmall = 'https://www.craftcuts.com/media/pseudo_images/resize/150x150/'+params[pk];var swiperMain = $j('.product-essential .media-col .swiper-container .swiper-wrapper > div[data-hash="slide-0"] a');if( swiperMain.length <= 0){continue;}// Using new markup, add image to list$j("").on("load",function(event){var theSwiperWeDeserveButDontNeed = (myBigSwiper == 0) ? mySmallSwiper : myBigSwiper;theSwiperWeDeserveButDontNeed.slideTo(0); //reset to first slide, if #slide is set in urlswiperMain.children('img').css("opacity",".2");swiperMain.attr({"href": pseudoImagePath,"title": "4 Gift Rule Tags "});// Make sure resized images can load// Note: Need to make sure the images load before setting anything, otherwise it can fail to replace the images correctly.//////////////////////// Small ///////////////////////////////////$j("").on("load",function(smallevent){//////////////////////////////////// Small Load, Large ///////////////////////////////////////////////$j("").on("load",function(largeevent){///////////////////////////////////////// Small Load, Large Load ////////////////////////////////////////////////////// Set Resized LargeswiperMain.children('img').attr({"src": pseudoImagePathLarge,"alt": "4 Gift Rule Tags "});// Set Resized SmallswiperMain.parent().attr({"data-thumb": pseudoImagePathSmall});// Set new slide html and remove firstvar new_slide_html = $j(swiperMain).parent()[0].outerHTML;theSwiperWeDeserveButDontNeed.removeSlide(0);theSwiperWeDeserveButDontNeed.prependSlide(new_slide_html);$j('.product-essential .media-col .swiper-thumbnail-pagination li img.0').attr({"src": pseudoImagePathSmall});theSwiperWeDeserveButDontNeed.slideTo(0);$j('.product-essential .media-col .swiper-container .swiper-wrapper > div[data-hash="slide-0"] img').animate({"opacity": 1}, 500);}).on("error",function(largeevent){////////////////////////////////////////// Small Load, Large Error /////////////////////////////////////////////////////// Set Default LargeswiperMain.children('img').attr({"src": pseudoImagePath,"alt": "4 Gift Rule Tags "});// Set Resized SmallswiperMain.parent().attr({"data-thumb": pseudoImagePathSmall});// Set new slide html and remove firstvar new_slide_html = $j(swiperMain).parent()[0].outerHTML;theSwiperWeDeserveButDontNeed.removeSlide(0);// theSwiperWeDeserveButDontNeed.prependSlide(old_slide_html); // Add the unaltered original slide backtheSwiperWeDeserveButDontNeed.prependSlide(new_slide_html);$j('.product-essential .media-col .swiper-thumbnail-pagination li img.0').attr({"src": pseudoImagePathSmall});theSwiperWeDeserveButDontNeed.slideTo(0);$j('.product-essential .media-col .swiper-container .swiper-wrapper > div[data-hash="slide-0"] img').animate({"opacity": 1}, 500);}).attr("src",pseudoImagePathLarge).each(function(){// Cache fix for browsers that don't trigger .load()if(this.complete){$j(this).trigger('load');}});}).on("error",function(smallevent){///////////////////////////////////// Small Error, Large ////////////////////////////////////////////////$j("").on("load",function(largeevent){////////////////////////////////////////// Small Error, Large Load /////////////////////////////////////////////////////// Set Resized LargeswiperMain.children('img').attr({"src": pseudoImagePathLarge,"alt": "4 Gift Rule Tags "});// Set Default SmallswiperMain.parent().attr({"data-thumb": pseudoImagePath});// Set new slide html and remove firstvar new_slide_html = $j(swiperMain).parent()[0].outerHTML;theSwiperWeDeserveButDontNeed.removeSlide(0);// theSwiperWeDeserveButDontNeed.prependSlide(old_slide_html); // Add the unaltered original slide backtheSwiperWeDeserveButDontNeed.prependSlide(new_slide_html);$j('.product-essential .media-col .swiper-thumbnail-pagination li img.0').attr({"src": pseudoImagePath});theSwiperWeDeserveButDontNeed.slideTo(0);$j('.product-essential .media-col .swiper-container .swiper-wrapper > div[data-hash="slide-0"] img').animate({"opacity": 1}, 500);}).on("error",function(largeevent){/////////////////////////////////////////// Small Error, Large Error //////////////////////////////////////////////////////// Set Default LargeswiperMain.children('img').attr({"src": pseudoImagePath,"alt": "4 Gift Rule Tags "});// Set Default SmallswiperMain.parent().attr({"data-thumb": pseudoImagePath});// Set new slide html and remove firstvar new_slide_html = $j(swiperMain).parent()[0].outerHTML;theSwiperWeDeserveButDontNeed.removeSlide(0);// theSwiperWeDeserveButDontNeed.prependSlide(old_slide_html); // Add the unaltered original slide backtheSwiperWeDeserveButDontNeed.prependSlide(new_slide_html);$j('.product-essential .media-col .swiper-thumbnail-pagination li img.0').attr({"src": pseudoImagePath});theSwiperWeDeserveButDontNeed.slideTo(0);$j('.product-essential .media-col .swiper-container .swiper-wrapper > div[data-hash="slide-0"] img').animate({"opacity": 1}, 500);}).attr("src",pseudoImagePathLarge).each(function(){// Cache fix for browsers that don't trigger .load()if(this.complete){$j(this).trigger('load');}});}).attr("src",pseudoImagePathSmall).each(function(){// Cache fix for browsers that don't trigger .load()if(this.complete){$j(this).trigger('load');}});}).on("error",function(event){// Pseudo image could not load. Do nothing.}).attr("src",pseudoImagePath).each(function(){// Cache fix for browsers that don't trigger .load()if(this.complete){$j(this).trigger('load');}});imageSet = true;continue;}// For regular inputs: text, radio, and checkbox primarily.var item = $(this).find('input[name="'+pk+'"]');if(item.length > 0){var pk2 = item.attr('name');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['name',pk2,params[pk],'value'];continue;}// For primary dimensionitem = $(this).find('[name^="primary_dimension_'+pk+'_"]');if(item.length > 0){var pk2 = item.attr('name');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['name',pk2,params[pk],'value'];continue;}// For secondary dimensionitem = $(this).find('[name^="secondary_dimension_'+pk+'_"]');if(item.length > 0){var pk2 = item.attr('name');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['name',pk2,params[pk],'value'];continue;}// For tertiary dimensionitem = $(this).find('[name^="tertiary_dimension_'+pk+'_"]');if(item.length > 0){var pk2 = item.attr('name');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['name',pk2,params[pk],'value'];continue;}// For additionals of the select varietyitem = $(this).find('select[data-vt-additional="'+pk+'"] option').filter(function(){return $(this).html() == params[pk];});if(item.length > 0){var pk2 = item.parent().attr('data-vt-additional');var parKey = $(fInputs).index(item.parent());orderedParams[parKey] = ['data-vt-additional',pk2,params[pk],'html-select'];continue;}// For additionals of the text varietyitem = $(this).find('input[data-vt-additional="'+pk+'"][type="text"]');if(item.length > 0){var pk2 = item.attr('name');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['name',pk2,params[pk],'value'];continue;}// For additionals of the radio varietyitem = $(this).find('.dd[class^=additional_] > :contains("'+params[pk]+'"):eq(0) input[data-vt-additional="'+pk+'"][type="radio"]');if(item.length > 0){var pk2 = item.attr('data-vt-additional');var parKey = $(fInputs).index(item);orderedParams[parKey] = ['data-vt-additional',pk2,params[pk],'html-check'];continue;}// For regular selects, only uses html content not valueitem = $(this).find('select[name="'+pk+'"] option').filter(function(){return $(this).html() == params[pk];});if(item.length > 0){var pk2 = item.parent().attr('name');var parKey = $(fInputs).index(item.parent());orderedParams[parKey] = ['name',pk2,params[pk],'html-select'];continue;}}$.each(orderedParams, function(index,param){if(typeof param === 'undefined'){ return; }switch(param[3]){case "value":$(thisone).find('['+ param[0] +'="'+param[1]+'"]').val(param[2]).change();break;case "check":$(thisone).find('input['+param[0]+'="'+param[1]+'"][value="'+param[2]+'"]').attr('checked','checked').click();break;case "html-select":var item = $(thisone).find('select['+ param[0] +'="'+param[1]+'"] option').filter(function(){return $(this).html() == param[2];});if(item.length > 0){item.attr('selected','selected').change();}break;case "html-check":var item = $(thisone).find('.dd[class^=additional_] > :contains("'+param[2]+'"):eq(0) input['+param[0]+'="'+param[1]+'"][type="radio"]');if(item.length > 0){item.attr('checked','checked').click();}break;}});});}this.load = load;this.loadFromHidden = loadFromHidden;this.validate = validate;this.toggleAdditionals = toggleAdditionals;this.selectedAdditional = selectedAdditional;this.preLoad = preLoad;this.submit = submit;}var vt = new ViewerTool($j || jQuery);$j(document).ready( function(){vt.load();vt.preLoad();// This dumb code is triggering the initial error message on load. WHY???if($j('select[name^="primary_dimension_"] option').length === 2){$j('select[name^="primary_dimension_"]').trigger('change');}});$j(function(){$j('form#product_addtocart_form .btn-cart').prop( "onclick", null ).click(vt.validate);$j('form#product_addtocart_form').on('submit', function(e){e.preventDefault();vt.validate();});$j('.dt-my-text, .dd-my-text').addClass('hide');});
* Required Fields
$20.95