'); jButton.click(function () { window.location.href = 'https://cem.com/en/request4quote/quote/add/product/' + productVal + qtyInp; return false; }); if ($jpprR4q('body.wishlist-shared-index').length && $jpprR4q(this).closest('.my-wishlist').length) { $jpprR4q(this).closest('tr').find('.link-wishlist').closest('td').append(jButton); } else { var nextDiv = getActionsDivRfq($jpprR4q(this), true); if (nextDiv.length > 0) { nextDiv.addClass('btn-cart-view'); nextDiv.after(jButton); } } } $jpprR4q(this).remove(); }); $jpprR4q('input[name="r4q_hidecart"]').each(function () { if (!$jpprR4q('#wishlist-view-form').length) { if ($jpprR4q(this).val() == '1') { var hasR4q = false; $jpprR4q(this).parents('.item, .product-shop-container, .product-view, .product-shop, .product-shop-row, .add-to-row, .product_info_left').find('.btn-cart, .btn-cart1, .btn-cart-res, .btn-cart-view, .btn-primary, .addtocart').each(function () { if (!$jpprR4q(this).hasClass('btn-r4q')) { $jpprR4q(this).remove(); } else { hasR4q = true; } }); if (!hasR4q) { $jpprR4q('#qty').hide(); } } } }); $jpprR4q(document).on("keyup keypress", ":input:not(textarea):not([type=submit])", function (e) { if (e.keyCode == 13) { e.preventDefault(); return false; } }); $$('.btn-r4q, .btn-cart').each(function (el) { $(el).up('div').setStyle({ 'position': 'static' }); }); $$('.btn-r4q').each(function (el) { var myclickfunc = $(el).readAttribute('clickfunc'); Event.observe($(el), 'click', function () { eval(myclickfunc); }); }); $jpprR4q('.btn-r4q').mouseover(function () { setTimeout(putClick, 10); }); $jpprR4q('.btn-r4q').mouseout(function () { setTimeout(putClick, 10); }); adjustHeightOfGridList(); }); putClick = function () { $jpprR4q('.btn-r4q').removeAttr('onclick'); } sendForm = function (url) { var productAddToCartFormValid = new VarienForm('product_addtocart_form') if (productAddToCartFormValid.validator.validate()) { var form = $('product_addtocart_form'); var oldUrl = form.action; if (url) { form.action = url; } var e = null; try { form.submit(); } catch (e) { } form.action = oldUrl; if (e) { throw e; } } }; (function (open) { XMLHttpRequest.prototype.open = function (method, url, async, user, pass) { this.addEventListener("readystatechange", function () { if (this.readyState == 4) { if (typeof this.responseURL != 'undefined' && this.responseURL != '') { setTimeout(function () { $jpprR4q('input[name="r4q_quote_enabled"]').each(function () { if (!$jpprR4q('#wishlist-view-form').length) { $jpprR4q(this).nextAll('input[name="r4q_quote_enabled"]').remove(); var qtyInp = '/from_listing/1'; var productVal = $jpprR4q(this).val(); var jButton = $jpprR4q('