Be the first to review this product
SHARE:
Regular Price: $155.00
Special Price $145.00
'+ '
'; } }.bind(this)); } }.bind(this)); imageBox.innerHTML = imageHTML; imageBox.show(); } else if (imageMode==4) { // Overlay Main Image var mainImage = this.getMainImage(); if (mainImage) { if (!mainImage.src) { mainImage = mainImage.down('img'); if (!mainImage) return; } // remove prev overlay_image if (el.type=='radio') { var radios = el.up(2).getElementsByClassName('radio'); for (i=0; i < radios.length; i++) { if (!radios[i].checked) { var overlayImage = $('overlay_image_' + radios[i].value); if (overlayImage) overlayImage.remove(); } } } else if (el.type=='checkbox') { if (!el.checked) { var overlayImage = $('overlay_image_' + el.value); if (overlayImage) overlayImage.remove(); } } else { // drop-down, multiselect for (i=0; i < el.options.length; i++) { if (!el.options[i].selected && el.options[i].value) { var overlayImage = $('overlay_image_' + el.options[i].value); if (overlayImage) overlayImage.remove(); } } } if (((el.type=='checkbox' || el.type=='radio') && el.checked && !el.disabled) || ((el.type=='select-one' || el.type=='select-multiple') && el.value!='')) { // overlay option image elValueArr.each(function(optionValueId) { if (optionValueId!='' && opConfig.config[optionId][optionValueId] && opConfig.config[optionId][optionValueId].images) { opConfig.config[optionId][optionValueId].images.each(function(image, index) { if (((excludeFirstImage==0 && index==0) || index > 0) && image[1]) { var overlayImageId = 'overlay_image_' + optionValueId; var overlayImage = $(overlayImageId); if (!overlayImage) { mainImage.up(1).style.position = 'relative'; var overlayImage = new Image(); overlayImage.width = mainImage.width; overlayImage.height = mainImage.height; overlayImage.style.display = 'none'; overlayImage.style.position = 'absolute'; overlayImage.style.top = 0; overlayImage.style.left = 0; overlayImage.style.zIndex = this.overlayZIndex; this.overlayZIndex++; overlayImage.id = overlayImageId; overlayImage.src = image[1]; Element.insert(mainImage, {'after':overlayImage}); overlayImage.show(); } } }.bind(this)); } }.bind(this)); } } } else { // replace and append variant var ul = $$(this.ulId.join(', ')).first(); var optionClass = 'option-image-'+optionId; if (el.type=='checkbox') optionClass += '-' + el.value; var productImageLis = $$(this.ulId.join(' li.li-product-image, ') + ' li.li-product-image'); // hide product gallery if (imageMode==2 && productImageLis) { productImageLis.each(function(li) { li.hide(); }); } // remove option images $$('li.' + optionClass).each(function(li) { li.remove(); }); if (typeof(ProductMediaManager)=='undefined') { $$('img.' + optionClass).each(function(img) { img.remove(); }); } // set default main image this.newMainImageUrl = this.mainImageUrl; this.newMainImageTitle = this.mainImageTitle; this.newMainImageThumbnail = this.mainImageThumbnail; this.newMainImageIndex = 0; if (((el.type=='checkbox' || el.type=='radio') && el.checked && !el.disabled) || ((el.type=='select-one' || el.type=='select-multiple') && el.value!='')) { var liHtml = ''; if (ul) { // var li = ul.down('li'); var li = productImageLis.last(); if (this.dataImageIndex===false) this.dataImageIndex = $$(this.ulId.join(' li, ') + ' li').length; if (li) { liHtml = ul.down('li').innerHTML; liHtml = liHtml.replace(/(data\-image\-index\=[\'\"])[0-9]+?([\'\"])/,"$1{{data_image_index}}$2"); if (typeof(ProductMediaManager)=='undefined') liHtml = liHtml.replace(/https?\:\/\/.+?([\'\"])/,"{{big_image_url}}$1"); liHtml = liHtml.replace(/https?\:\/\/.+?([\'\"])/g,"{{small_image_url}}$1"); liHtml = liHtml.replace(/(\s(?:title|alt)\=[\'\"]).*?([\'\"])/g,"$1{{title}}$2"); liHtml = '
'; } } var imageBox = $('customoptions_images_' + optionId); if (imageBox) imageBox.hide(); // append option images elValueArr.each(function(optionValueId) { if (optionValueId!='' && opConfig.config[optionId][optionValueId] && opConfig.config[optionId][optionValueId].images) { opConfig.config[optionId][optionValueId].images.each(function(image, index) { if ((excludeFirstImage==0 && index==0) || index > 0) { if (liHtml) { if (image[1]) { imageHTML += liHtml.replace(new RegExp("{{data_image_index}}",'g'), this.dataImageIndex).replace(new RegExp("{{big_image_url}}",'g'), image[1]).replace(new RegExp("{{small_image_url}}",'g'), image[0]).replace(new RegExp("{{title}}",'g'), opConfig.config[optionId][optionValueId].title); if (typeof(ProductMediaManager)!='undefined') mainImageHTML += ''; this.dataImageIndex++; } } else { if (index==0 || (excludeFirstImage==1 && index==1)) { this.newMainImageUrl = image[1]; this.newMainImageThumbnail = image[1]; this.newMainImageTitle = opConfig.config[optionId][optionValueId].title; } } } else if (el.type=='select-one' || el.type=='select-multiple') { if (imageBox) { imageBox.hide(); imageBox.innerHTML = ''+ ''+ '';; imageBox.show(); } } }.bind(this)); } }.bind(this)); if (imageHTML) ul.innerHTML += imageHTML; // for ProductMediaManager if (mainImageHTML) { var mainImageDiv = this.getMainImage().up('div'); if (mainImageDiv) mainImageDiv.innerHTML += mainImageHTML; } } // show product gallery if (!this.hasOptionImages() && productImageLis) { productImageLis.each(function(li) { li.show(); }); } $$('.cloud-zoom-gallery').each(function(a) { if (a.up('li').style.display=='') a.up('li').style.display = 'list-item'; a.addClassName('cboxElement'); jQuery(a).CloudZoom(); }); if (typeof(ProductMediaManager)!='undefined') ProductMediaManager.init(); // change main image if (imageMode==2) { if (typeof(ProductMediaManager)=='undefined') this.changeMainImage(); else setTimeout('optionImages.changeMainImage()', 100); } } }, markProduct: function() { $$(this.ulId.join(' li, ') + ' li').each(function(li) { li.addClassName('li-product-image'); }); if (this.mainImageUrl=='') { var mainImage = this.getMainImage(); if (mainImage) { if (mainImage.hasClassName('MagicToolboxContainer')) { var elA = mainImage.down('a'); if (elA) { this.mainImageUrl = elA.href; var elImg = elA.down('img'); if (elImg.width) this.mainImageWidth = elImg.width; this.mainImageThumbnail = elImg.src; this.mainImageTitle = elImg.alt; } } else if (mainImage.hasClassName('zoom-image') || (mainImage.up('a') && mainImage.up('a').hasClassName('cloud-zoom'))) { // Easy Zoom 1.0 - jQuery plugin // Cloud Zoom V1.0.2 var elA = mainImage.up('a'); if (elA) { this.mainImageUrl = elA.href; } else { this.mainImageUrl = mainImage.src; } this.mainImageTitle = mainImage.alt; this.mainImageThumbnail = mainImage.src } else { this.mainImageUrl = mainImage.src; this.mainImageTitle = mainImage.alt; } } } this.prevMainImageUrl = this.mainImageUrl; }, getMainImage: function() { return $$('div.product-img-box div.MagicToolboxContainer', 'div.product-img-box div.main-image img', 'div.product-img-box .product-image img', '#image', '#image-main', 'div.img-box .product-image img').first(); }, changeMainImage: function() { if (!this.newMainImageUrl || this.newMainImageUrl==this.prevMainImageUrl) return; var mainImage = this.getMainImage(); if (!mainImage) return; if (!this.pageLoaded) { mainImage.hide(); setTimeout('optionImages.changeMainImage()', 100); return; } if (mainImage.hasClassName('MagicToolboxContainer')) { var elA = mainImage.down('a'); if (elA) { elA.down('img').width = this.mainImageWidth; MagicZoomPlus.update(elA.id, this.newMainImageUrl, this.newMainImageThumbnail, 'show-title: false; drag-mode: false'); } } else if (typeof(ProductMediaManager)!='undefined') { $$(this.ulId.join(' li, ') + ' li').each(function(li) { var elA = li.down('a'); if (elA && elA.readAttribute('data-image-index')==this.newMainImageIndex) { elA.click(); } }.bind(this)); } else if (mainImage.hasClassName('zoom-image')) { // Easy Zoom 1.0 - jQuery plugin var elA = mainImage.up('a'); if (elA) elA.href = this.newMainImageUrl; mainImage.src = this.newMainImageUrl; mainImage.alt = this.newMainImageTitle; mainImage.title = this.newMainImageTitle; jQuery('#zoom').easyZoom({parent: 'div.zoom-container',preload: '', lightboxBtn: '.lightbox-btn .lightbox'}).data('easyZoom').gallery('a.zoom-thumbnail'); } else if (mainImage.up('a') && mainImage.up('a').hasClassName('cloud-zoom')) { // ultimo + Cloud Zoom V1.0.2 var elA = mainImage.up('a'); if (elA) elA.href = this.newMainImageUrl; mainImage.src = this.newMainImageUrl; mainImage.alt = this.newMainImageTitle; mainImage.title = this.newMainImageTitle; if ($("zoom-btn")) { $("zoom-btn").href = this.newMainImageUrl; $("zoom-btn").title = this.newMainImageTitle; } jQuery("#"+elA.id).CloudZoom(); } else { mainImage.src = this.newMainImageUrl; mainImage.alt = this.newMainImageTitle; mainImage.title = this.newMainImageTitle; } this.prevMainImageUrl = this.newMainImageUrl; mainImage.show(); }, hasOptionImages: function() { var result = false; var firstImageUrl = ''; $$(this.ulId.join(' li, ') + ' li').each(function(li) { if (li.hasClassName('li-product-image')==false) { // change main image if (!firstImageUrl) { var firstImageMatch = li.innerHTML.match(/(https?\:\/\/.+?)[\'\"]/); if (firstImageMatch) firstImageUrl = firstImageMatch[1]; this.newMainImageUrl = firstImageUrl; this.newMainImageThumbnail = firstImageUrl; this.newMainImageTitle = li.down('img').alt; if (typeof(ProductMediaManager)!='undefined') this.newMainImageIndex = li.down('a').readAttribute('data-image-index'); } result = true; } }.bind(this)); return result; } }; Event.observe(window, 'load', function() { opConfig.reloadPrice(); }); // Change Qty Input Invetory var optionsInventory = { changeInputQty: function(el) { if (!el) { return false; } var optionId = this._getOptionId(el); var valueId = el.value; if (el.type == 'radio') { var optionQty = $('options_'+optionId+'_qty'); } else if (el.type == 'checkbox') { var optionQty = $('options_'+optionId+'_'+valueId+'_qty'); } if (!optionQty) { return; } var minQty = 1; if (valueId != '' && opConfig.config[optionId][valueId].min_qty) { minQty = opConfig.config[optionId][valueId].min_qty; } $(optionQty).addClassName('validate-greater-than-zero'); if (!el.checked) { minQty = 0; $(optionQty).removeClassName('validate-greater-than-zero'); } this._changeDisabledQty(el, optionQty); optionQty.value = minQty; }, changeSelectQty: function(el) { if (!el) { return false; } var optionId = this._getOptionId(el); var valueIds = this._getValueIds(el); var optionQty = $('options_'+optionId+'_qty'); if (!optionQty) { return; } for (i=0; i < valueIds.length; i++) { var valueId = valueIds[i]; var minQty = 1; if (opConfig.config[optionId][valueId].min_qty) { minQty = opConfig.config[optionId][valueId].min_qty; } optionQty.value = minQty; } $(optionQty).addClassName('validate-greater-than-zero'); }, changeMultiSelectQty: function(optionId, valueId, selected) { var optionQty = $('options_'+ optionId +'_'+ valueId +'_qty'); if (!optionQty) { return; } optionQty.disabled = !selected; if (selected) { var minQty = 1; if (opConfig.config[optionId][valueId].min_qty) { minQty = opConfig.config[optionId][valueId].min_qty; } if (optionQty.value<=0) { optionQty.value = minQty; } $(optionQty).addClassName('validate-greater-than-zero'); } else { $(optionQty).removeClassName('validate-greater-than-zero'); } }, _getValueIds: function(el) { var ids = []; for (i=0; i < el.options.length; i++) { if (el.options[i].selected && el.options[i].value != '') { ids.push(el.options[i].value); } } return ids; }, _getOptionId: function(el) { var optionId = 0; el.name.sub(/[0-9]+/, function(match){ optionId = match[0]; }); return optionId; }, _changeDisabledQty: function(el, qty) { qty.disabled=!el.checked; }, }; Event.observe(window, 'load', function() { $$("input[type^='checkbox'].product-custom-option, input[type^='radio'].product-custom-option").each(function(element){ Event.observe(element, 'change', function() { optionsInventory.changeInputQty(element); opConfig.reloadPrice(); }); }); $$("select[id^='select_'].product-custom-option").each(function(element){ Event.observe(element, 'change', function() { optionsInventory.changeSelectQty(element); opConfig.reloadPrice(); }); }); }); function checkboxchange() { if (!jQuery("#chb_advanced_options").attr("checked")) { jQuery("#advselect").css('display', 'none'); opConfig.reloadPrice(); //customdays(); } else if (jQuery("#chb_advanced_options").attr("checked")) { jQuery("#advselect").css('display', 'block'); } } function customdays(){ jQuery('#product-options-wrapper .custom-days').each(function () { dd = parseInt(jQuery(this).text().trim().replace('+', '').replace('days', ''), 10); if (dd) { tdays = Math.max(dd, tdays); } }); //console.log(tdays); if(tdays>0){ jQuery(".customday").css("display","inline"); jQuery(".customu").css("display","none"); jQuery(".customday .sp").html("+"+tdays+" days"); }else{ jQuery(".customday .sp").html("+0 days"); jQuery(".customday").css("display","none"); jQuery(".customu").css("display","block"); } } jQuery(document).ready(function(){ jQuery('.advoption-save').on('click', function(){ jQuery("#advselect").css('display', 'none'); }); }); // end Change Qty Input Invetory //]]>