var _cspt = (function () { function cspt() { } cspt.selector = '.woocommerce-loop-product__title,.collection_title > h3'; cspt.offset = 0; cspt.height = 0; cspt.index = function () { if (screen.width < 500) return; cspt.height = 0; var ele_list = document.querySelectorAll(cspt.selector); if (ele_list) { ele_list.forEach(n => { n.style.height = 'unset'; n.style.minHeight = 'unset'; var h = n.clientHeight; if (h > cspt.height) cspt.height = h; }) ele_list.forEach(n => { n.style.height = (cspt.offset + cspt.height) + 'px' }) } } cspt.start= function (offset, selector) { cspt.offset = offset === void 0 || isNaN(parseFloat(offset)) ? 0 : parseFloat(offset); selector && (cspt.selector = selector); window.addEventListener('load', function () { cspt.index() }); window.addEventListener('resize', function () { cspt.index(); }); setTimeout(() => { cspt.index(); }, 500); } return cspt; }()) _cspt.start(); var ajust_product_image = function () { function api() {} api.max_height = 800; api.selector = '.opstore-img-after img-effect'; api.class = 'auto_ajust_img_height'; api.height = 0; api.times = 0; api.start = function () { var img_list = document.querySelectorAll(this.selector); if (!img_list) return; this.times++; img_list.forEach(n => { var h = n.height; if (h > this.height) { this.height = h; } }) if (this.height <= 50) { if (this.times < 10) { setTimeout(function () { api.start(); }, 5000); } return; } img_list.forEach(n => { n.style.height = this.height + "px"; n.style.maxHeight = this.max_height + 'px'; n.classList.add(this.class); }) } api.load = function () { if(screen.width <600) return; window.addEventListener('load', function () { api.start(); }) setTimeout(function () { api.start(); }, 1000); } return api; }(); ajust_product_image.load(); jQuery(function ($) { $('.search-form').append("") if ((screen.width <= 1100) && (screen.width > 934)) { $("li.menu-item-has-children>a").one("click", function (event) { event.preventDefault(); }); } if(document.body.clientHeight < window.innerHeight){ var maincontent = document.querySelector('main#main'); if(maincontent){maincontent.style.minHeight = (window.innerHeight - document.body.clientHeight +maincontent.clientHeight ) +"px"; } } }); jQuery(function ($) { var md_size_chart_modal = $('#md-size-chart-modal'); if(md_size_chart_modal){ $('body').append(md_size_chart_modal); } })