// Definição de função documentReady() - Função que retarda a execução de um código para depois do carregamento do DOM !(function (t, e) { "use strict"; (t = t || "docReady"), (e = e || window); var n = [], o = !1, d = !1; function a() { if (!o) { o = !0; for (var t = 0; t < n.length; t++) n[t].fn.call(window, n[t].ctx); n = []; } } function c() { "complete" === document.readyState && a(); } e[t] = function (t, e) { if ("function" != typeof t) throw new TypeError("callback for docReady(fn) must be a function"); o ? setTimeout(function () { t(e); }, 1) : (n.push({ fn: t, ctx: e, }), "complete" === document.readyState || (!document.attachEvent && "interactive" === document.readyState) ? setTimeout(a, 1) : d || (document.addEventListener ? (document.addEventListener("DOMContentLoaded", a, !1), window.addEventListener("load", a, !1)) : (document.attachEvent("onreadystatechange", c), window.attachEvent("onload", a)), (d = !0))); }; })("documentReady", window); documentReady(function () { document.querySelectorAll(".product.shelf-item img").forEach((item, index) => { setTimeout(() => { let newAltText = item.getAttribute("alt"); if (newAltText) { newAltText = newAltText.replace(/-/g, " "); newAltText = newAltText.replace(/\b\w/g, (l) => l.toUpperCase()); item.setAttribute("alt", newAltText); } }, 200); }); });