// load scripts for replaced elements var isExecuteLoad = false; document.addEventListener('swup:pageView', function(e) { $( document ).trigger('inizialize'); if (isExecuteLoad) { $( document ).trigger('executeReady'); $( window ).trigger('load'); } else { $('.transition-fade').addClass('finished'); } isExecuteLoad = true; }); document.addEventListener('swup:transitionStart', function(e) { $('.transition-fade').removeClass('finished'); $(document).trigger('removeEvent'); }); document.addEventListener("swup:transitionEnd", function(e){ $('.transition-fade').addClass('finished'); }); $.fn.isInViewport = function(offset) { var $el = $(this); if (offset === undefined) offset = 50; var elementTop = $el.offset().top; var elementBottom = elementTop + ($el.outerHeight() * offset / 100); var viewportHeight = $(window).height(); var viewportToll = 15; var viewportTop = $(window).scrollTop() - viewportToll; var viewportBottom = viewportTop + viewportHeight + (viewportToll * 2.0); if (offset < 0) return elementTop < viewportBottom && elementBottom < viewportBottom; else { return elementBottom >= viewportTop && elementTop < viewportBottom && elementBottom < viewportBottom; } }; var loadScript = function (path) { var result = $.Deferred(); var script = document.createElement("script"); script.async = "async"; script.type = "text/javascript"; script.src = path; script.onload = script.onreadystatechange = function(_, isAbort) { if (!script.readyState || /loaded|complete/.test(script.readyState)) { if (isAbort) result.reject(); else result.resolve(); } }; script.onerror = function () { result.reject(); }; $("head")[0].appendChild(script); return result.promise(); } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie.replace(/\+/g, ' ')); var ca = decodedCookie.split(';'); for(var i = 0; i ') }); $('.clm-recaptcha').each(function( index ) { recaptcha_form = $(this).closest("form"); // recupera la callback success per il recaptcha di google del form, // se non esiste mette quella di default if (recaptcha_form.data('gcallback') === undefined) gcallback = onSuccessRecaptcha; else gcallback = window[recaptcha_form.data('gcallback')]; // render il recaptcha clmrecaptchaID[index] = this.id; clmrecaptchaFunc[index] = grecaptcha.render(this.id, { 'sitekey' : '6Lc9mKwUAAAAAA5XTk4VEvutTA14ReeYJmy6pmPR', 'callback' : gcallback, 'error-callback' : onErrorRecaptcha, 'size' : 'invisible' }); }); }; $(window).on("load resize scroll", function() { if ($(".googlemaps").length > 0) { if ($(".googlemaps").isInViewport(0) && !isMapsLoaded) { isMapsLoaded = true; var lang = getCookie('lang'); loadScript("https://www.arredilsrl.it/js/gmap.js.php").then(function() { var googleMap = document.createElement("script"); googleMap.src = "//maps.googleapis.com/maps/api/js?key=AIzaSyBkv_BqQttjm90XtidI7XuErbHWqOHxtug&callback=mapsCallback&language="+lang; googleMap.async = true; googleMap.defer = true; document.body.appendChild(googleMap); }); } } }); function adsBlocked(callback){ var testURL = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' var myInit = { method: 'HEAD', mode: 'no-cors' }; try { var myRequest = new Request(testURL, myInit); fetch(myRequest).then(function(response) { return response; }).then(function(response) { callback(false) }).catch(function(e){ callback(true) }); } catch (e) { callback(false) }; } function showStatusCookie() { var policyCookieConsent = getCookie('policyCookieConsent'); var policyCookiePreferences = getCookie('policyCookiePreferences'); var policyCookieStatistics = getCookie('policyCookieStatistics'); var policyCookieMarketing = getCookie('policyCookieMarketing'); var policyCookieUnique = getCookie('policyCookieUnique'); var policyCookieLanguage = 0; if (getCookie('lang_id') != 1) policyCookieLanguage = 1; var txtPolicyCookieStatusDeclineDef = ['Rifiuta', 'Reject']; var txtPolicyCookieStatusConfirmDef = ['Accetta selezionati', 'Allow selection']; var txtPolicyCookieStatusNecessaryDef = ['Tecnici', 'Technical']; var txtPolicyCookieStatusPreferencesDef = ['Preferenze', 'Preference']; var txtPolicyCookieStatusStatisticsDef = ['Statistici', 'Statistical']; var txtPolicyCookieStatusMarketingDef = ['Marketing', 'Marketing']; var txtPolicyCookieStatus = "---"; var txtPolicyCookieStatusSelect = ""; var txtPolicyCookieDate = '---'; var txtPolicyCookieUnique = '---'; if (policyCookieConsent == "") { $('.cookie-btn-erase').hide(); } else if (policyCookieConsent == "0") { txtPolicyCookieStatus = txtPolicyCookieStatusDeclineDef[policyCookieLanguage]; txtPolicyCookieStatusSelect = '('+txtPolicyCookieStatusNecessaryDef[policyCookieLanguage]+')'; txtPolicyCookieDate = getCookie('policyCookieDate'); } else if (policyCookieConsent == "1") { txtPolicyCookieStatus = txtPolicyCookieStatusConfirmDef[policyCookieLanguage]; txtPolicyCookieStatusSelect = '('+txtPolicyCookieStatusNecessaryDef[policyCookieLanguage]; if (policyCookiePreferences == "1") txtPolicyCookieStatusSelect += ', '+txtPolicyCookieStatusPreferencesDef[policyCookieLanguage]; if (policyCookieStatistics == "1") txtPolicyCookieStatusSelect += ', '+txtPolicyCookieStatusStatisticsDef[policyCookieLanguage]; if (policyCookieMarketing == "1") txtPolicyCookieStatusSelect += ', '+txtPolicyCookieStatusMarketingDef[policyCookieLanguage]; txtPolicyCookieStatusSelect += ')'; txtPolicyCookieDate = getCookie('policyCookieDate'); } if (policyCookieUnique != "") txtPolicyCookieUnique = policyCookieUnique; $('.statusConsent').html(txtPolicyCookieStatus + ' ' +txtPolicyCookieStatusSelect); $('.dateConsent').html(txtPolicyCookieDate); $('.dateUniqueId').html(txtPolicyCookieUnique); } $(window).on("load", function() { showStatusCookie(); $(window).off('eventCookieUpdate'); $(window).on('eventCookieUpdate', function() { var policyCookieUnique = getCookie('policyCookieUnique'); var sendInfo = { 'p': !window.policyCookiePreferences, 's': !window.policyCookieStatistics, 'm': !window.policyCookieMarketing, 'i': '80.88.87.42', 'u': 'www.arredilsrl.it', 't': 0, }; if (policyCookieUnique != "") sendInfo['uq'] = policyCookieUnique; if (policyCookieRequired1 == '0') sendInfo['d'] = true; $.ajax({ type: "PUT", url: 'https://registro-cookie.colombo3000.com/api/update', beforeSend: function (xhr) { xhr.setRequestHeader('Authorization', 'Bearer t-7614f875-8423-4f20-a674-d7cf3096290e'); }, data: JSON.stringify(sendInfo), contentType: "application/json; charset=utf-8", }) .done(function(datiJSON){ SetCookie('policyCookieUnique', datiJSON.uq, 365); $('.dateUniqueId').html(datiJSON.uq); }) .fail(function(data, textStatus, errorThrown) { }); }); var lang = getCookie('lang'); $('form input, form select, form textarea, form button').bind('focus.recaptcha', function() { loadScript("https://www.arredilsrl.it/js/recaptcha.js.php").then(function() { var googleRecaptcha = document.createElement("script"); googleRecaptcha.src = "https://www.google.com/recaptcha/api.js?hl="+lang+"&onload=onloadCallback&render=explicit"; googleRecaptcha.async = true; googleRecaptcha.defer = true; document.body.appendChild(googleRecaptcha); adsBlocked(function(blocked){ var exdate = new Date() var n = document.location.hostname.split("."); var e = n.slice(1).join("."); exdate.setDate(exdate.getDate() + 1) var value = 0; if (blocked) value = 1; document.cookie = "adblock=" + escape(value) + ";path=/;expires="+exdate.toGMTString(); }) }); $('form input, form select, form textarea, form button').unbind('focus.recaptcha'); }); }); lazyExecute = function(el) { $(el).lazy({ delay:-1, afterLoad: function(element) { $.event.trigger({ type: "lazyAfterLoad", time: new Date(), element : element }); $(window).trigger('resize'); }, onFinishedAll: function() { $.event.trigger({ type: "lazyComplete", time: new Date() }); $(window).trigger('resize'); } }); } $(window).on('load', function() { $('.lazy').each(function() { if ($(this).closest('.waitLazyLoad').length == 0) { lazyExecute(this); } }); }); // lunghezza calcolata al caricamento della pagina e ad ogni resize della schermata var actualWidth; $( document ).ready(function() { $(document).trigger('executeReady'); }); $( document ).on('executeReady', function() { $(document).on('change', '[type="radio"]', function() { var name = $(this).attr('name'); $('[name="'+name+'"]').removeAttr('required'); }); $("#bottom-to-top").click(function() { $("html, body").animate({ scrollTop: 0 }, "slow"); return false; }); $('[data-toggle="tooltip"]').tooltip(); $( ".table" ).each(function( index ) { if (!$(this).parent().hasClass("table-responsive")) { $(this).wrap( "
" ); } }); $('.carousel').carousel(); $('.modal').modal('hide'); $('.dropdown-submenu > a').on("click", function(e) { e.preventDefault(); var submenu = $(this); var isShow = submenu.next('.dropdown-menu').hasClass('show'); $('.dropdown-submenu .dropdown-menu').removeClass('show'); if (!isShow) { submenu.next('.dropdown-menu').addClass('show'); } e.stopPropagation(); }); $('.dropdown').on("hidden.bs.dropdown", function() { // hide any open menus when parent closes $('.dropdown-menu.show').removeClass('show'); }); //One Animated /* var is_iOS = ( /iPhone|iPad|iPod/i.test(navigator.userAgent) ); // le animazioni waypoint laterali estendono la pagina causando problemi di visualizzazione nei sistemi operativi IOS // le animazioni waypoint disabilitate if(is_iOS) { $('.animated').css("opacity", "1"); } else { */ $('.animated:not([data-delay],[data-order])').each(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); var offset = $element.data('offset'); if (typeof offset === 'undefined') offset = 80; var context = window; var horizontal = false; var data_context = $element.data('context'); if (data_context !== undefined) { context = document.getElementById(data_context) horizontal = true; } $(this).waypoint(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); var myAnimated = $element.data('animated'); var oneSomeAnimated = $element.data('oneanimated'); // animazione da eseguire una singola volta if (oneSomeAnimated == true) { // animazione non e' stata gia' eseguita in tal caso la esegue if (!($element.hasClass(myAnimated))) $element.toggleClass($element.data('animated')).css("opacity", "1"); // animazione da eseguire sempre } else $element.toggleClass($element.data('animated')); }, { offset: offset+'%', context: context, horizontal: horizontal, }); }); $('.animated[data-order="0"]').each(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); var offset = $element.data('offset'); if (typeof offset === 'undefined') offset = 80; var context = window; var horizontal = false; var data_context = $element.data('context'); if (data_context !== undefined) { context = document.getElementById(data_context) horizontal = true; } $(this).waypoint(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); if ($element.hasClass('execute')) return; var myAnimated = $element.data('animated'); var group = $element.data('group'); $element.addClass("execute").addClass($element.data('animated')).css("opacity", "1"); $('[data-group="'+group+'"]').each(function( index ) { var el = $(this); var delay = el.data('delay') * el.data('order'); setTimeout( function() { el.addClass("execute").addClass(el.data('animated')).css("opacity", "1"); }, delay, el); }); }, { offset: offset+'%', context: context, horizontal: horizontal, }); }); $('.animated[data-delay="0"]').each(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); var offset = $element.data('offset'); if (typeof offset === 'undefined') offset = 80; var context = window; var horizontal = false; var data_context = $element.data('context'); if (data_context !== undefined) { context = document.getElementById(data_context) horizontal = true; } $(this).waypoint(function() { var element = this.element; if (element === undefined) $element = $(this); else $element = $(element); if ($element.hasClass('execute')) return; var myAnimated = $element.data('animated'); var group = $element.data('group'); $element.addClass("execute").addClass($element.data('animated')).css("opacity", "1"); $('[data-group="'+group+'"]').each(function( index ) { var el = $(this); var delay = el.data('delay'); setTimeout( function() { el.addClass("execute").addClass(el.data('animated')).css("opacity", "1"); }, delay, el); }); }, { offset: offset+'%', context: context, horizontal: horizontal, }); }); /* } */ // Effect input $(document).on("blur", 'form input, form textarea, form select', function(){ if($(this).val().length !== 0) { $(this).addClass('filled'); } else { $(this).removeClass('filled'); } }); }); // Inizializza l'effetto input function init_form(form_id) { $.each($('input, textarea, select', '#'+form_id),function(e){ if($(this).val().length !== 0) { $(this).addClass('filled'); } else { $(this).removeClass('filled'); } }) } var sendVirtualEvent = function(eventForce, eventItem) { if (eventForce === undefined) eventForce = ""; if (eventItem === undefined) eventItem = null; $.post({ url: "https://www.arredilsrl.it/admin/includes/ajax/ajax_frontend.php", data: { "type": "sendVirtualEvent", "url" : window.location.href, "lang" : getCookie('lang'), "eventForce" : eventForce, "eventItem" : eventItem, } }) .done(function(data ) { datiJSON = JSON.parse(data); if (datiJSON.event != "") { window.dataLayer.push({ event: datiJSON.event, event_name: datiJSON.event_name, item: datiJSON.item, }); } }); } var app = app || {}; (function ($) { 'use strict'; app.scrolling = { _raf : null, _positionY : 0, _velocityY : 0, _targetPositionY : 0, _targetPositionYWithOffset : 0, _direction : 0, _offset : null, _top : null, _friction : 0.6, // 1 - .3 _acceleration: .04, goToCalculatetargetPositionY : function() { if (app.scrolling._offset == 0) return app.scrolling._targetPositionY = 0; return app.scrolling._targetPositionY = Math.round(app.scrolling._offset.getBoundingClientRect().top + window.pageYOffset - app.scrolling._top); }, goToAnimate : function () { var distance = app.scrolling.goToUpdate(); app.scrolling.goToRender(); app.scrolling.goToCalculatetargetPositionY(); app.scrolling._targetPositionYWithOffset = app.scrolling._targetPositionY + app.scrolling._direction; if (app.scrolling._direction === 1 && app.scrolling._targetPositionY > app.scrolling._positionY || app.scrolling._direction === -1 && app.scrolling._targetPositionY < app.scrolling._positionY) { // calculate next position app.scrolling._raf = requestAnimationFrame(app.scrolling.goToAnimate); } else { // finish and set position to the final position app.scrolling._positionY = app.scrolling._targetPositionY; app.scrolling.goToRender(); app.scrolling._raf = null; } }, goToUpdate : function() { var distance = app.scrolling._targetPositionYWithOffset - app.scrolling._positionY; var attraction = distance * app.scrolling._acceleration; app.scrolling._velocityY += attraction; app.scrolling._velocityY *= app.scrolling._friction; app.scrolling._positionY += app.scrolling._velocityY; return Math.abs(distance); }, goToRender : function() { window.scrollTo(0, app.scrolling._positionY); }, goToScrollTo : function(offset, top) { if (typeof functionOffset !== 'undefined' && typeof functionOffset === 'function') { top += functionOffset(); } app.scrolling._offset = offset; app.scrolling._top = top; if (app.scrolling._offset && app.scrolling._offset.nodeType) { // the offset is element //app.scrolling._targetPositionY = Math.round(offset.getBoundingClientRect().top + window.pageYOffset); app.scrolling.goToCalculatetargetPositionY(); } else if (parseInt(app.scrolling._targetPositionY) === app.scrolling._targetPositionY) { // the offset is a number app.scrolling._targetPositionY = Math.round(app.scrolling._offset); } else { console.error('Argument must be a number or an element.'); return; } // don't animate beyond the document height if (app.scrolling._targetPositionY > document.documentElement.scrollHeight - window.innerHeight) { app.scrolling._targetPositionY = document.documentElement.scrollHeight - window.innerHeight; } // calculated required values app.scrolling._positionY = document.body.scrollTop || document.documentElement.scrollTop; app.scrolling._direction = app.scrolling._positionY > app.scrolling._targetPositionY ? -1 : 1; app.scrolling._targetPositionYWithOffset = app.scrolling._targetPositionY + app.scrolling._direction; app.scrolling._velocityY = 0; if (app.scrolling._positionY !== app.scrolling._targetPositionY) { // start animation app.scrolling.goToAnimate(); } }, } })(jQuery); function updateFileList() { var filesToUpload = $(' #filesToUpload ') var fileList = $(' #fileList ').html(''); fileList.html(''); if (filesToUpload[0].files.length == 0) { fileList.append('
  • Nessun file selezionato
  • '); } else { for (var i = 0; i < filesToUpload[0].files.length; i++) fileList.append('
  • ' + filesToUpload[0].files[i].name + '
  • '); } } function errorFileList(msg) { var fileList = $(' #fileList ').html(''); $("#filesToUpload").val(''); fileList.html(''); fileList.append('
  • ' + msg + '
  • '); } // carica l'immagine $("#filesToUpload").on('change', function(event) { var num_files = event.target.files.length; var type_mime = ""; if (num_files > 3){ errorFileList('ERRORE: Puoi caricare massimo 3 file'); return; } for (i = 0; i < num_files; i++) { var file = event.target.files[i]; if(file.size>=2*1024*1024) { errorFileList('File: '+file.name+' - ERRORE: Dimensione massima di 2 Mb'); return; } var matchAccepter = $( this ).attr('accept').split(','); var accept_ok = false; for (a=0; a < matchAccepter.length; a++) { if (file.type.match(matchAccepter[a])) accept_ok = true; } if (!accept_ok) { errorFileList('File: '+file.name+' - ERRORE: Formato del file non valido'); return; } } if ( window.FileReader && window.File && window.FileList && window.Blob ) { [].forEach.call(event.target.files, function(file) { var reader = new FileReader(); reader.readAsArrayBuffer(file); }); } updateFileList(); }); var supportsCssVariables = (window.CSS && window.CSS.supports && window.CSS.supports('--fake-var', 0)); function functionOffset() { var top = $('#top_content').outerHeight(true); if ($(window).outerWidth() < 992) top += 120; return top; } if (window.location.hash && window.location.hash.indexOf('gid') == -1 ) { var section = $(window.location.hash)[0]; $('html, body').scrollTop(0); app.scrolling.goToScrollTo(section, 0); } $(window).on('load', function() { $(document).on('click', 'a', function(event){ var hash = this.hash; if (hash != "" ) { var aLink = this.href.split("#"); var aLocation = window.location.href.split("#"); if (aLink[0] == aLocation[0]) { event.preventDefault(); var section = $(hash)[0]; $('html, body').scrollTop(0); app.scrolling.goToScrollTo(section, 0); return false; } } }); mainTopHandler(); products_show_hide_element(); $(document).on('click', "#box_struttura .circle", function(e) { $('#box_struttura .testo').removeClass('hover'); $('#box_struttura .circle').removeClass('hover'); $('.testo'+$(this).data('id')).addClass('hover'); }); $(document).on('click', "#box_struttura .testo", function(e) { $('#box_struttura .testo').removeClass('hover'); $('#box_struttura .circle').removeClass('hover'); }); if ($('.pswp').length > 0) { loadScript("https://www.arredilsrl.it/js/jquery.photoswipe.min.js").then(function() { loadScript("https://www.arredilsrl.it/js/simple-gallery.min.js").then(function() {}); }); } /*PRODOTTI*/ $('#product-category-btn-bottom').click(function() { $('#product-category-box-mb').toggleClass('open'); $(this).toggleClass('open'); }); $('.btn-toggle').click(function() { var el = $(this); var toggle = $('#toggle'); var top_content = $('#top_content'); if (toggle.hasClass('active')) { toggle.removeClass('active') $('.overlay').removeClass('open'); top_content.removeClass('overlay-top'); } else { var top_contentH = top_content.outerHeight(); top_content.addClass('overlay-top'); $('#toggle').addClass('active'); var overlayName = el.data('overlay'); var overlay = $('#'+overlayName); overlay.css({'top':top_contentH+'px','height':'calc(100% - '+top_contentH+'px)'}).addClass('open'); } }); $(".overlay").each(function(){ var id = this.id; $("#"+id+" > .overlay-menu > ul > li").each(function(index){ if (index > 0) { var delay = 150*(1+index); if (supportsCssVariables) { this.style.setProperty('--delay', delay + 'ms'); } else { $(this).css({'-webkit-animation-delay' : delay+'ms', 'animation-delay' : delay+'ms'}); } } }); $("#"+id+" .dropdown-menu > li").each(function(index){ if (index > 0) { var delay = 150*(1+index); if (supportsCssVariables) { this.style.setProperty('--delay', delay + 'ms'); } else { $(this).css({'-webkit-animation-delay' : delay+'ms', 'animation-delay' : delay+'ms'}); } } }); }); /*SCROLL*/ var waypoints = $('body:not(.noslide) header').waypoint(function(direction) { if( direction === 'down' ) { $('header').addClass('sftop'); } else if( direction === 'up'){ $('header').removeClass('sftop'); } }, { offset: function() { return ($('header').outerHeight() - ($('#top_content').outerHeight() / 2)); } }); /*MODAL*/ if($("#modalHome").length > 0) { setTimeout(function() { $("#modalHome").modal("show"); }, 500); } }); $(window).on('scroll', function() { mainTopHandler(); }); $(window).on('resize', function() { mainTopHandler(); products_show_hide_element(); }); /*MAIN PADDING TOP*/ function mainTopHandler() { /*if($(".noslide").length > 0) { setTimeout(function() { var menu = $("#top_content"); var main = $("main"); var menuH = menu.innerHeight(); main.css({"padding-top" : menuH + "px"}); },500); }*/ } /*PRODUCT HANDLER*/ function products_show_hide_element() { if ($(window).outerWidth() < 992) { var product_category_box = $('#product-category-box').detach(); $('#product-category-box-mb').append(product_category_box); } else { var product_category_box = $('#product-category-box').detach(); $('#product-category-box-dk').append(product_category_box); } }var isSliderLoadedservicenoe = false; $( document ).on('inizialize', function() { isSliderLoadedservicenoe = false; }); $(window).on("load resize scroll", function() { if ($(".slider_servicenoe").length > 0) { if ($(".slider_servicenoe").isInViewport(-10) && !isSliderLoadedservicenoe) { $('', { rel: 'stylesheet', type: 'text/css', href: 'https://www.arredilsrl.it/modules/servicenoe/css/slick.min.css' }).appendTo('head'); $('', { rel: 'stylesheet', type: 'text/css', href: 'https://www.arredilsrl.it/modules/servicenoe/css/slick-theme.min.css' }).appendTo('head'); isSliderLoadedservicenoe = true; loadScript("https://www.arredilsrl.it/modules/servicenoe/js/slick.min.js").then(function() { loadScript("https://www.arredilsrl.it/modules/servicenoe/js/slick.clm.min.js.php").then(function() {}); }); } } });function arredil_r700_positive_response(element, datiJSON, value_class_hide) { $('#form_box_arredil_r700_ajax')[0].reset(); $('#form_box_arredil_r700_ajax [name="type_user"]').attr('required','required'); $('#form_box_arredil_r700_ajax .input-radio').attr('required','required') /* $('#form_box_arredil_r700_ajax .input-check').addClass('no-send'); $('#form_box_arredil_r700_ajax .input-qty').removeAttr('required').addClass('no-send').attr('disabled','disabled'); */ $('#form_box_arredil_r700_ajax .input-qty').addClass('no-send'); $('#modal_result_arredil_r700 .modal-body').html(datiJSON.positive_response); $('#modal_result_arredil_r700').modal('show'); setTimeout(function() {$('#modal_result_arredil_r700').modal('hide');}, 6000); } $(window).on('load', function(){ $('input[name="type"]').on('change', function() { $('input[name="type"]').removeAttr('required'); }) $('.input-qty').on('change', function() { if ($(this).val() != "") { $(this).removeClass('no-send'); } else { $(this).addClass('no-send'); } }); /* $('.col-check input').on('change', function() { var id = $(this).attr('data-id'); if ($(this)[0].checked) { $('#qty_'+id).removeAttr('disabled').removeClass('no-send').attr('required','required').focus(); } else { $('#qty_'+id).removeAttr('required').addClass('no-send').attr('disabled','disabled'); } }); */ $('.col-color i').on('click', function() { $(this).next().toggleClass('show'); }); $('.col-color .img').on('click', function() { $(this).removeClass('show'); }); });$(window).on('load', function(){ }); var isSliderLoadedarredilproduct = false; $( document ).on('inizialize', function() { isSliderLoadedarredilproduct = false; }); $( window ).on('load resize scroll',function() { if ($(".slider_arredilproduct").length > 0) { if ($(".slider_arredilproduct").isInViewport(-20) && !isSliderLoadedarredilproduct) { $('', { rel: 'stylesheet', type: 'text/css', href: 'https://www.arredilsrl.it/modules/arredilproduct/css/slick.min.css' }).appendTo('head'); $('', { rel: 'stylesheet', type: 'text/css', href: 'https://www.arredilsrl.it/modules/arredilproduct/css/slick-theme.min.css' }).appendTo('head'); isSliderLoadedarredilproduct = true; loadScript("https://www.arredilsrl.it/modules/arredilproduct/js/slick.min.js").then(function() { loadScript("https://www.arredilsrl.it/modules/arredilproduct/js/slick.clm.min.js.php").then(function() {}); }); } } }); $(window).on('load', function() { var catId = $("input.category-id").val(); $("#heading-category-" + catId).addClass("catActive"); });$(window).on('load', function(){ });$(window).on('load', function(){ $( ".simple-gallery-no-slide" ).gallery(".simple-gallery-no-slide", { w_prop : 4, // proporzione per la lunghezza h_prop : 3, // proporzione per l'altezza outer_div : true, // true: non è richiusa all'interno del wrapper, false è rinchiusa all'interno del wrapper breakpoint : [ // percentuali da applicare in base alla larghezza minima della pagina // >min-width // | width % // | | margin px // | | | [ 1200, 25, 5], [ 768, 33, 5], [ 480, 50, 5], [ 0, 100, 5] ] }); });$(window).on('load', function(){ });