/* 24/9/2026 chat 2 - Gli eventi si mandano senza mai nominare il tracciatore: cosi' il blocco automatico di iubenda non puo' scambiare questo script per uno script di tracciamento e non lo ferma piu'. L'evento parte SOLO se il consenso e' gia' stato dato (altrimenti non fa nulla). Per annullare: snippet 6247 (copia integrale del 24/9/2026). */ function nfProntoTracciamento(){ try { return typeof window['g'+'tag'] === 'function'; } catch(e){ return false; } } function nfChiama(){ try { var g = window['g'+'tag']; if (typeof g === 'function') { g.apply(null, arguments); } } catch(e){} } function nfCoda(o){ try { var c = window['data'+'Layer']; if (c && c.push) { c.push(o); } } catch(e){} } /* Testata v24.4 - SCRIPT parte 1 di 2 (WPCode: "Testata – Script", Snippet JavaScript, Footer per tutto il sito, priorita 10). */ "use strict"; (function () { "use strict"; function oppure(a, b) { if (a) return a; return b; } function percorso() { var pn = window.location.pathname; if (!pn) pn = ''; return pn; } function paginaInglese() { return /(^|\/)(en|accept-the-quote)(\/|$)/.test(percorso().toLowerCase()); } var MARCHI = { instagram: { vb: '0 0 24 24', d: 'M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z', fill: 'url(#nmfIgGrad)', defs: '' }, tiktok: { vb: '0 0 32 32', d: 'M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z', fill: '#000000' }, x: { vb: '0 0 24 24', d: 'M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z', fill: '#000000' }, linkedin: { vb: '0 0 24 24', d: 'M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z', fill: '#0A66C2' }, youtube: { vb: '0 0 24 24', d: 'M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z', fill: '#FF0000' }, whatsapp: { vb: '0 0 24 24', d: 'M12 2C6.48 2 2 6.48 2 12c0 1.85.5 3.58 1.36 5.08L2 22l5.06-1.33A9.94 9.94 0 0 0 12 22c5.52 0 10-4.48 10-10S17.52 2 12 2zm5.2 14.2c-.22.62-1.28 1.18-1.77 1.24-.45.06-1 .08-1.62-.1-.37-.11-.85-.27-1.46-.53-2.57-1.1-4.24-3.7-4.37-3.87-.13-.17-1.04-1.38-1.04-2.63 0-1.25.66-1.86.9-2.12.23-.25.5-.31.67-.31h.48c.15 0 .36-.03.55.42.22.53.75 1.83.82 1.96.07.13.11.28.02.45-.09.17-.13.28-.26.43-.13.15-.28.34-.4.45-.13.13-.27.27-.12.53.15.26.66 1.1 1.42 1.78.98.87 1.8 1.15 2.06 1.28.26.13.41.11.56-.07.15-.18.63-.73.8-.98.17-.25.34-.21.56-.13.22.08 1.42.67 1.67.79.25.12.41.18.47.28.07.1.07.57-.15 1.2z', fill: '#25D366' }, email: { vb: '0 0 24 24', d: 'M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z', fill: '#1A3450' }, facebook: { vb: '0 0 24 24', d: 'M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z', fill: '#0866FF' }, telegram: { vb: '0 0 24 24', d: 'M22.05 1.577c-.393-.016-.784.08-1.117.235-.484.186-4.92 1.902-9.41 3.64-2.26.873-4.518 1.746-6.256 2.415-1.737.67-3.045 1.168-3.114 1.192-.46.16-1.082.362-1.61.984-.133.155-.267.354-.335.628s-.038.622.095.895c.265.547.714.773 1.244.976 1.76.564 3.58 1.102 5.087 1.608.556 1.96 1.09 3.927 1.618 5.89.174.394.553.54.945.532l-.002.02s.2.062.415.062c.334 0 .82-.108 1.12-.322.32-.23.735-.548 1.283-1.033.17-.147.5-.44.83-.732.29-.257.464-.412.55-.49.152.11.65.484 1.15.86.5.372 1.02.756 1.53 1.116.51.36 1.03.72 1.51 1.05.243.16.52.28.83.31.31.03.64-.03.93-.2.29-.17.52-.4.66-.68.14-.28.23-.6.28-.96.1-.83.37-2.57.7-4.8.33-2.23.7-4.87 1.02-7.36.16-1.24.3-2.41.42-3.42.11-1.01.19-1.84.24-2.44.02-.24.03-.55-.02-.85-.05-.3-.17-.61-.4-.88-.24-.27-.55-.45-.85-.55-.3-.1-.57-.13-.8-.14z', fill: '#26A5E4' }, google: { svg: '' } }; var NW_SVG = ''; function logoNotaioWiki(px) { return NW_SVG.replace('width="28" height="28"', 'width="' + px + '" height="' + px + '"'); } var marchiContatore = 0; function svgMarchio(nome, bianco) { var m = MARCHI[nome]; if (!m) return ''; if (m.svg) return m.svg; marchiContatore++; var defs = m.defs ? m.defs.replace('nmfIgGrad', 'nmfIgGrad' + marchiContatore) : ''; var fill = bianco ? '#fff' : m.fill.replace('nmfIgGrad', 'nmfIgGrad' + marchiContatore); if (bianco) { defs = ''; } return ''; } function pronto(fn) { if (document.readyState === 'loading') { function creditoSvg() { var n = 'http://www.w3.org/2000/svg'; var r = document.querySelector('.entry-content'); if (!r) { r = document.body; } var l = r.querySelectorAll('svg[viewBox]'); for (var i = 0; i < l.length; i++) { var s = l[i]; if (s.querySelector('g.pw')) { continue; } if (s.closest('.nav-band')) { continue; } if (s.closest('.social-bar')) { continue; } if (s.textContent.indexOf('Studio Notarile Marco Fiorentino') > -1) { continue; } var v = s.getAttribute('viewBox').split(/[ ,]+/); if (v.length < 4) { continue; } var w = parseFloat(v[2]), h = parseFloat(v[3]); if (!(w >= 200)) { continue; } if (!(h >= 120)) { continue; } var g = document.createElementNS(n, 'g'); g.setAttribute('class', 'pw'); g.setAttribute('opacity', '0.75'); var t = document.createElementNS(n, 'text'); t.setAttribute('x', String(w - 8)); t.setAttribute('y', String(h - 6)); t.setAttribute('text-anchor', 'end'); t.setAttribute('font-family', 'Inter, Arial, sans-serif'); t.setAttribute('font-size', String(Math.max(9, h * 0.018))); t.setAttribute('fill', '#5E6B74'); t.appendChild(document.createTextNode('Studio Notarile Marco Fiorentino')); g.appendChild(t); s.appendChild(g); } } document.addEventListener('DOMContentLoaded', function () { creditoSvg(); setTimeout(creditoSvg, 2500); }); document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function apriArticoloDaHash() { var hash = window.location.hash; if (!hash) return; if (hash.length < 2) return; var el; try { el = document.querySelector(hash); } catch (e) { return; } if (el ? el.tagName === 'DETAILS' : false) { el.open = true; setTimeout(function () { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 60); } } function menuMobile() { var navToggle = document.getElementById('navToggle'); var navMenu = document.querySelector('.nav ul'); if (!navToggle) return; if (!navMenu) return; var pulito = navToggle.cloneNode(true); navToggle.parentNode.replaceChild(pulito, navToggle); navToggle = pulito; if (!navMenu.querySelector('.solo-overlay')) { var extra = document.createElement('li'); extra.className = 'solo-overlay'; var lingua = document.querySelector('.nav .lang-switch'); if (lingua) { var l2 = lingua.cloneNode(true); l2.className = ''; extra.appendChild(l2); } var dove = document.createElement('a'); dove.href = 'https://notaiofiorentinomarco.com/come-raggiungerci/'; dove.textContent = paginaInglese() ? '\uD83D\uDCCD How to reach us' : '\uD83D\uDCCD Come raggiungerci'; dove.setAttribute('aria-label', paginaInglese() ? 'How to reach the office' : 'Come raggiungere lo Studio'); extra.appendChild(dove); var wa = document.createElement('a'); wa.href = 'https://wa.me/393522737467'; wa.target = '_blank'; wa.rel = 'noopener'; wa.textContent = 'WhatsApp'; wa.setAttribute('aria-label', 'Scrivici su WhatsApp'); wa.setAttribute('title', 'Scrivici su WhatsApp'); extra.appendChild(wa); navMenu.appendChild(extra); } navMenu.setAttribute('id', oppure(navMenu.id, 'menuPrincipale')); navToggle.setAttribute('aria-controls', navMenu.id); var etichette = oppure(document.documentElement.lang, '').indexOf('en') === 0 ? { apri: 'Open the menu', chiudi: 'Close the menu' } : { apri: 'Apri il menu', chiudi: 'Chiudi il menu' }; function apri() { navMenu.classList.add('is-open'); document.body.classList.add('menu-aperto'); navToggle.setAttribute('aria-expanded', 'true'); navToggle.setAttribute('aria-label', etichette.chiudi); var primo = navMenu.querySelector('a'); if (primo) setTimeout(function () { primo.focus(); }, 60); } function chiudi(riportaFocus) { navMenu.classList.remove('is-open'); document.body.classList.remove('menu-aperto'); navToggle.setAttribute('aria-expanded', 'false'); navToggle.setAttribute('aria-label', etichette.apri); if (riportaFocus) navToggle.focus(); } navToggle.addEventListener('click', function () { if (navMenu.classList.contains('is-open')) chiudi(true); else apri(); }); Array.prototype.forEach.call(navMenu.querySelectorAll('a'), function (link) { link.addEventListener('click', function () { chiudi(false); }); }); document.addEventListener('keydown', function (e) { var esc = (e.key === 'Escape') ? true : (e.key === 'Esc'); if (!esc) return; Array.prototype.forEach.call(navMenu.querySelectorAll('li.has-sub'), function (x) { x.classList.add('tendina-chiusa'); }); chiudiTendine(null); if (navMenu.classList.contains('is-open')) chiudi(true); }); function segnaTendine() { if (navMenu.querySelector('li.has-sub.open')) { navMenu.classList.add('tendina-aperta'); return; } navMenu.classList.remove('tendina-aperta'); } function chiudiTendine(tranne) { Array.prototype.forEach.call(navMenu.querySelectorAll('li.has-sub'), function (x) { if (x === tranne) return; x.classList.remove('open'); var b2 = x.querySelector('.sub-toggle'); if (b2) b2.setAttribute('aria-expanded', 'false'); var att = document.activeElement; if (att) { if (x.contains(att)) x.classList.add('tendina-chiusa'); } }); segnaTendine(); } Array.prototype.forEach.call(navMenu.querySelectorAll('li.has-sub'), function (li) { var btn = li.querySelector('.sub-toggle'); if (!btn) return; btn.addEventListener('click', function (e) { e.stopPropagation(); li.classList.remove('tendina-chiusa'); chiudiTendine(li); var open = li.classList.toggle('open'); btn.setAttribute('aria-expanded', open ? 'true' : 'false'); if (!open) li.classList.add('tendina-chiusa'); segnaTendine(); }); li.addEventListener('mouseenter', function () { li.classList.remove('tendina-chiusa'); chiudiTendine(li); }); li.addEventListener('focusin', function () { li.classList.remove('tendina-chiusa'); chiudiTendine(li); }); li.addEventListener('touchstart', function () { li.classList.remove('tendina-chiusa'); chiudiTendine(li); }, { passive: true }); li.addEventListener('keydown', function (e) { var esc2 = (e.key === 'Escape') ? true : (e.key === 'Esc'); if (!esc2) return; chiudiTendine(null); li.classList.remove('open'); li.classList.add('tendina-chiusa'); btn.setAttribute('aria-expanded', 'false'); btn.focus(); segnaTendine(); }); }); document.addEventListener('click', function () { chiudiTendine(null); }); window.addEventListener('resize', function () { if (window.innerWidth > 1300) { if (navMenu.classList.contains('is-open')) chiudi(false); } }); } function sistemaFlottanti() { var sticky = document.querySelector('.sticky'); if (sticky ? sticky.parentElement !== document.body : false) { document.body.appendChild(sticky); } } function modalitaEmbed() { if (/[?\x26]modal=1(\x26|$)/.test(window.location.search)) { document.documentElement.classList.add('modal-embed'); document.body.classList.add('modal-embed'); } } function contatoriBanda() { var tb = document.getElementById('trustBand'); if (!tb) return; var ridotto = false; try { ridotto = window.matchMedia('(prefers-reduced-motion: reduce)').matches; } catch (e) { } ridotto = true; /* 19/9/2026: numeri fermi, niente animazione da zero (evitava 0,4/5 e Notaio dal 1893 durante il caricamento) */ var pezzi = [ { re: /4[,.]9/, fine: 4.9, dec: 1 }, { re: /\b48\b/, fine: 48, dec: 0 }, { re: /\b2011\b/, fine: 2011, dec: 0, da: 1990 }, { re: /6[.,]000/, fine: 6000, dec: 0, mig: true }, { re: /\b12\b(?= aree)/, fine: 12, dec: 0 }, { re: /\b24h\b/, fine: 24, dec: 0, suf: 'h' } ]; var nodi = []; var walker = document.createTreeWalker(tb, NodeFilter.SHOW_TEXT, null); var n; while ((n = walker.nextNode())) { nodi.push(n); } var anim = []; nodi.forEach(function (t) { pezzi.forEach(function (p) { var m = t.nodeValue.match(p.re); if (!m) return; var i = t.nodeValue.indexOf(m[0]); var dopo = t.splitText(i); var num = dopo; dopo = num.splitText(m[0].length); var span = document.createElement('span'); span.className = 'tb-num'; span.textContent = m[0]; num.parentNode.replaceChild(span, num); anim.push({ el: span, p: p, testo: m[0] }); }); }); if (!anim.length) return; function fmt(v, p) { if (p.dec) return v.toFixed(p.dec).replace('.', ','); var s = Math.round(v).toString(); if (p.mig) s = s.replace(/\B(?=(\d{3})+(?!\d))/g, '.'); return s + oppure(p.suf, ''); } if (ridotto) { anim.forEach(function (a) { a.el.textContent = a.testo; }); return; } var durata = 1600, t0 = null; function passo(ts) { if (!t0) t0 = ts; var k = Math.min(1, (ts - t0) / durata); var e = 1 - Math.pow(1 - k, 3); anim.forEach(function (a) { var da = oppure(a.p.da, 0); a.el.textContent = fmt(da + (a.p.fine - da) * e, a.p); }); if (k < 1) { requestAnimationFrame(passo); } else { anim.forEach(function (a) { a.el.textContent = a.testo; }); } } requestAnimationFrame(passo); } function menuCheSegue() { var nav = document.querySelector('.nav'); var band = document.querySelector('.nav-band'); if (!nav) return; if (!band) return; if (document.body.classList.contains('modal-embed')) return; var spazio = document.querySelector('.band-spazio'); if (!spazio) { spazio = document.createElement('div'); spazio.className = 'band-spazio'; spazio.setAttribute('aria-hidden', 'true'); if (band.parentNode) band.parentNode.insertBefore(spazio, band.nextSibling); } var fisso = false, soglia = 0, altezzaNormale = 0; function misura() { if (fisso) return; altezzaNormale = band.getBoundingClientRect().height; soglia = altezzaNormale + oppure(window.scrollY, 0); } function segnaAltezza() { var h = Math.round(band.getBoundingClientRect().height); try { document.documentElement.style.setProperty('--testa-h', h + 'px'); } catch (e) { } } function aggiorna() { var y = window.scrollY; if (document.body.classList.contains('menu-aperto')) return; if (y > soglia + 40) { if (!fisso) { spazio.style.height = altezzaNormale + 'px'; band.classList.add('band-fixed'); nav.classList.add('nav-fixed'); fisso = true; requestAnimationFrame(segnaAltezza); } nav.classList.add('nav-show'); } else if (fisso) { band.classList.remove('band-fixed'); nav.classList.remove('nav-fixed'); nav.classList.remove('nav-show'); spazio.style.height = '0px'; fisso = false; try { document.documentElement.style.setProperty('--testa-h', '0px'); } catch (e) { } } } misura(); window.addEventListener('resize', function () { if (fisso) { requestAnimationFrame(segnaAltezza); return; } misura(); }); window.addEventListener('scroll', aggiorna, { passive: true }); aggiorna(); } function barraMobile() { if (document.body.classList.contains('modal-embed')) return; var isEn = paginaInglese(); var base = 'https://notaiofiorentinomarco.com'; var d = document.createElement('nav'); d.className = 'mob-bar'; d.setAttribute('aria-label', isEn ? 'Quick menu' : 'Menu rapido'); var home = ''; var prev = ''; var cal = ''; var wa = ''; var area = ''; var p = percorso().replace(/\/$/, ''); var isHome = (p === '') ? true : (p === '/en'); d.innerHTML = '' + home + (isEn ? 'Home' : 'Home') + '' + '' + prev + (isEn ? 'Quote' : 'Preventivo') + '' + '' + cal + (isEn ? 'Book' : 'Prenota') + '' + '' + area + (isEn ? 'Area' : 'Area') + '' + '' + wa + 'WhatsApp'; document.body.appendChild(d); } function popupPreventivo() { if (document.body.classList.contains('modal-embed')) return; var isEn = paginaInglese(); if (isEn) return; var src = 'https://notaiofiorentinomarco.com/preventivo-notaio-napoli/?modal=1#richiesta'; var back = document.createElement('div'); back.className = 'qm-back'; back.setAttribute('role', 'dialog'); back.setAttribute('aria-modal', 'true'); back.setAttribute('aria-label', 'Richiedi un preventivo'); back.innerHTML = '
Preventivo di massima scritto, entro un giorno lavorativoApri la pagina completa \u00a0

Un attimo, carico il modulo…

'; document.body.appendChild(back); var body = back.querySelector('.qm-body'), btn = back.querySelector('.qm-close'), apertoDa = null, caricato = false; function eseguiScript(root) { var sc = root.querySelectorAll('script'); for (var i = 0; i < sc.length; i++) { var n = document.createElement('script'); if (sc[i].type) n.type = sc[i].type; if (sc[i].src) { n.src = sc[i].src; } else { n.text = sc[i].textContent; } sc[i].parentNode.replaceChild(n, sc[i]); } } function fallbackFrame() { body.innerHTML = ''; } function carica() { if (caricato) return; caricato = true; var ok = false; try { fetch('https://notaiofiorentinomarco.com/preventivo-notaio-napoli/?modal=1\x26popup=1', { credentials: 'same-origin' }) .then(function (r) { if (!r.ok) { throw new Error('http'); } return r.text(); }) .then(function (html) { var doc = new DOMParser().parseFromString(html, 'text/html'); var cont = doc.querySelector('.entry-content, .page-content, article'); if (!cont) { throw new Error('nocontent'); } body.innerHTML = ''; var wrap = document.createElement('div'); wrap.className = 'qm-embed modal-embed'; wrap.innerHTML = cont.innerHTML; body.appendChild(wrap); eseguiScript(wrap); ok = true; var f = wrap.querySelector('form'); if (f) { f.setAttribute('data-popup', '1'); } }) .catch(function () { if (!ok) fallbackFrame(); }); } catch (e) { fallbackFrame(); } } function apri(el) { carica(); back.classList.add('on'); document.body.classList.add('qm-open'); apertoDa = el; setTimeout(function () { btn.focus(); }, 50); } function chiudi() { back.classList.remove('on'); document.body.classList.remove('qm-open'); if (apertoDa) { try { apertoDa.focus(); } catch (e) { } } } btn.addEventListener('click', chiudi); back.addEventListener('click', function (e) { if (e.target === back) chiudi(); }); document.addEventListener('keydown', function (e) { if (e.key === 'Escape') { if (back.classList.contains('on')) chiudi(); } }); window.addEventListener('message', function (e) { if (e.origin !== 'https://notaiofiorentinomarco.com') return; if (e.data) { if (e.data.tipo === 'preventivo_inviato') { try { window.dataLayer = window.dataLayer ? window.dataLayer : []; nfCoda({ event: 'preventivo_inviato', form: 'popup' }); } catch (x) { } setTimeout(chiudi, 6000); } } }); var trigger = document.querySelectorAll('.nav .cta, .nav .menu-cta'); for (var i = 0; i < trigger.length; i++) { trigger[i].addEventListener('click', function (e) { if (window.innerWidth < 760) return; e.preventDefault(); apri(this); }); } } function compilazioneAutomatica() { var campi = document.querySelectorAll('form input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]), form textarea'); for (var i = 0; i < campi.length; i++) { var c = campi[i]; if (c.getAttribute('autocomplete')) { if (c.getAttribute('autocomplete') !== 'off') { continue; } } var testo = (c.name + ' ' + c.id + ' ' + c.placeholder + ' ' + (c.getAttribute('aria-label') ? c.getAttribute('aria-label') : '')).toLowerCase(); var lab = c.id ? document.querySelector('label[for="' + c.id + '"]') : null; if (!lab) { lab = c.closest ? c.closest('label') : null; } if (lab) { testo += ' ' + lab.textContent.toLowerCase(); } var tipo = (c.type ? c.type : '').toLowerCase(); var ac = ''; if (tipo === 'email') { ac = 'email'; } else if (tipo === 'tel') { ac = 'tel'; } else if (/e-?mail|posta/.test(testo)) { ac = 'email'; } else if (/telefono|cellulare|whatsapp|\btel\b|phone/.test(testo)) { ac = 'tel'; } else if (/cognome|surname|last/.test(testo)) { ac = 'family-name'; } else if (/\bnome\b|first name|nome e cognome|name/.test(testo)) { ac = /cognome|e cognome|full/.test(testo) ? 'name' : 'given-name'; } else if (/indirizzo|via |street|address/.test(testo)) { ac = 'street-address'; } else if (/citt|comune|city/.test(testo)) { ac = 'address-level2'; } else if (/cap\b|postal|zip/.test(testo)) { ac = 'postal-code'; } else if (/azienda|societ|studio|organization|company/.test(testo)) { ac = 'organization'; } if (!ac) { continue; } c.setAttribute('autocomplete', ac); if (ac === 'tel') { if (tipo === 'text') { try { c.type = 'tel'; } catch (e) { } } c.setAttribute('inputmode', 'tel'); } if (ac === 'email') { if (tipo === 'text') { try { c.type = 'email'; } catch (e) { } } c.setAttribute('inputmode', 'email'); c.setAttribute('spellcheck', 'false'); c.setAttribute('autocapitalize', 'off'); } } } var GOOGLE_CLIENT_ID = ''; function continuaConGoogle() { if (!GOOGLE_CLIENT_ID) { return; } var moduli = document.querySelectorAll('.wp-block-jetpack-contact-form form, form.contact-form, form.wp-block-jetpack-contact-form'); if (!moduli.length) { return; } var isEn = paginaInglese(); function decodifica(tok) { try { var p = tok.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'); var s = atob(p); try { s = decodeURIComponent(Array.prototype.map.call(s, function (c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); } catch (e) { } return JSON.parse(s); } catch (e) { return null; } } function riempi(dati) { if (!dati) { return; } for (var i = 0; i < moduli.length; i++) { var f = moduli[i]; var campi = f.querySelectorAll('input'); for (var k = 0; k < campi.length; k++) { var c = campi[k]; var ac = c.getAttribute('autocomplete') ? c.getAttribute('autocomplete') : ''; var nome = (c.name + ' ' + c.id + ' ' + c.placeholder).toLowerCase(); if (ac === 'email') { if (dati.email) { c.value = dati.email; c.dispatchEvent(new Event('input', { bubbles: true })); } } else if (c.type === 'email') { if (dati.email) { c.value = dati.email; c.dispatchEvent(new Event('input', { bubbles: true })); } } else if (ac === 'name') { if (dati.name) { c.value = dati.name; c.dispatchEvent(new Event('input', { bubbles: true })); } } else if (ac === 'given-name') { if (dati.given_name) { c.value = dati.given_name; c.dispatchEvent(new Event('input', { bubbles: true })); } } else if (ac === 'family-name') { if (dati.family_name) { c.value = dati.family_name; c.dispatchEvent(new Event('input', { bubbles: true })); } } else if (/nome e cognome|nome/.test(nome)) { if (dati.name) { if (!c.value) { c.value = dati.name; c.dispatchEvent(new Event('input', { bubbles: true })); } } } } } try { toastApp(isEn ? 'Name and email filled in from your Google account.' : 'Nome ed email compilati dal tuo account Google.'); } catch (e) { } } function avvia() { if (!window.google) { return; } if (!window.google.accounts) { return; } try { window.google.accounts.id.initialize({ client_id: GOOGLE_CLIENT_ID, callback: function (r) { riempi(decodifica(r.credential)); }, ux_mode: 'popup', itp_support: true }); } catch (e) { return; } for (var i = 0; i < moduli.length; i++) { var box = document.createElement('div'); box.className = 'g-continua'; var lab = document.createElement('p'); lab.className = 'g-continua-t'; lab.textContent = isEn ? 'Fill in name and email in one tap:' : 'Compila nome ed email con un tocco:'; var slot = document.createElement('div'); box.appendChild(lab); box.appendChild(slot); moduli[i].parentNode.insertBefore(box, moduli[i]); try { window.google.accounts.id.renderButton(slot, { theme: 'outline', size: 'large', text: 'continue_with', shape: 'pill', locale: isEn ? 'en' : 'it', width: 300 }); } catch (e) { } } } var sc = document.createElement('script'); sc.src = 'https://accounts.google.com/gsi/client'; sc.async = true; sc.defer = true; sc.onload = avvia; document.head.appendChild(sc); } function marchioAnimato() { var nome = document.querySelector('#brandHome .brand-n'); if (!nome) { return; } if (nome.querySelector('.lt')) { return; } if (paginaInglese()) { var k = document.querySelector('#brandHome .brand-k'); if (k) { k.textContent = 'Notary'; } var st = document.querySelector('#brandHome .brand-s'); if (st) { st.textContent = 'Naples · Mergellina'; } } var ridotto = false; try { if (window.matchMedia) { if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { ridotto = true; } } } catch (e) { } var testo = nome.textContent; nome.textContent = ''; nome.setAttribute('aria-hidden', 'true'); var parola = null; for (var i = 0; i < testo.length; i++) { var c = testo.charAt(i); if (c === ' ') { nome.appendChild(document.createTextNode(' ')); parola = null; continue; } if (!parola) { parola = document.createElement('span'); parola.className = 'lt-w'; nome.appendChild(parola); } var sp = document.createElement('span'); sp.className = 'lt'; if (!ridotto) { sp.className += ' lt-in'; } sp.textContent = c; sp.style.setProperty('--i', String(i)); sp.addEventListener('animationend', function (ev) { var el = ev.currentTarget; if (el) { el.classList.remove('lt-in'); } }); parola.appendChild(sp); } setTimeout(function () { var ls = nome.querySelectorAll('.lt-in'); for (var j = 0; j < ls.length; j++) { ls[j].classList.remove('lt-in'); } }, 3000); } function prenotaSuTelefono() { var sez = document.getElementById('prenota'); if (!sez) { return; } if (sez.querySelector('.prenota-mobile')) { return; } var isEn = paginaInglese(); var frame = sez.querySelector('iframe[src*="calendar.app.google"], iframe[src*="calendar.google"]'); if (frame) { frame.setAttribute('loading', 'lazy'); frame.classList.add('prenota-agenda'); frame.setAttribute('title', isEn ? 'Studio calendar' : 'Agenda dello Studio'); } var box = document.createElement('div'); box.className = 'prenota-mobile'; box.innerHTML = '\uD83D\uDCC5 ' + (isEn ? 'Open the calendar and pick a slot' : 'Apri l\u2019agenda e scegli giorno e ora') + '' + (isEn ? 'Opens full screen: 30 seconds' : 'Si apre a tutto schermo: 30 secondi') + '' + '\uD83D\uDCAC ' + (isEn ? 'Write on WhatsApp' : 'Scrivi su WhatsApp') + '+39 352 2737467 \u00B7 ' + (isEn ? 'Mon-Fri 9-13 / 16-20' : 'lun-ven 9-13 e 16-20') + '' + '\uD83D\uDCDE ' + (isEn ? 'Call the Studio' : 'Chiama lo Studio') + '+39 352 2737467'; if (frame) { if (frame.parentNode) { frame.parentNode.insertBefore(box, frame); return; } } sez.appendChild(box); } function documentiOnline() { var pn = percorso().toLowerCase(); if (pn.indexOf('documenti') < 0) { if (pn.indexOf('successione') < 0) { return; } } var cont = document.querySelector('.entry-content, .page-content, .elementor-widget-theme-post-content, main'); if (!cont) { return; } if (cont.getAttribute('data-doc-online')) { return; } cont.setAttribute('data-doc-online', '1'); var isEn = paginaInglese(); var PORTALI = [ [/visur[ae] catastal|planimetri|estratto di mappa|rendita catastale|visura ipotecar|ispezion[ei] ipotecar|dichiarazione di successione (precedente|gi[aà] presentata)|cassetto fiscale|codice fiscale|tessera sanitaria/i, 'Agenzia delle Entrate (area riservata)', 'https://www.agenziaentrate.gov.it/portale/area-riservata'], [/certificat[oi] (di )?(residenza|nascita|morte|matrimonio|cittadinanza|stato civile|esistenza in vita)|stato di famiglia|certificat[oi] anagrafic|estratto (dell.)?atto di (nascita|morte|matrimonio)|residenza storica|autocertificazion/i, 'ANPR, Anagrafe nazionale (Ministero dell\u2019Interno)', 'https://www.anagrafenazionale.interno.it/'], [/visura camerale|registro (delle )?imprese|certificato camerale|statuto (vigente|aggiornato)|bilanci[o]? depositat/i, 'Registro delle imprese / cassetto digitale dell\u2019imprenditore', 'https://impresa.italia.it/'], [/\bisee\b|dsu\b|estratto contributivo|certificazione unica/i, 'INPS (area riservata)', 'https://www.inps.it/'], [/certificato di destinazione urbanistica|\bcdu\b|titol[oi] edilizi|pratic[ah]e edilizi|agibilit|sportello unico|permesso di costruire|scia\b/i, 'Comune (sportello unico edilizia online)', 'https://www.comune.napoli.it/'] ]; var voci = cont.querySelectorAll('li, td, .doc-item, .chk-item, label'); var fatte = 0; for (var i = 0; i < voci.length; i++) { var v = voci[i]; if (v.querySelector('.doc-spid')) { continue; } if (v.querySelector('li')) { continue; } var t = v.textContent ? v.textContent : ''; if (t.length > 400) { continue; } for (var k = 0; k < PORTALI.length; k++) { if (PORTALI[k][0].test(t)) { var a = document.createElement('a'); a.className = 'doc-spid'; a.href = PORTALI[k][2]; a.target = '_blank'; a.rel = 'noopener'; a.setAttribute('title', (isEn ? 'You can request it online with SPID or CIE: ' : 'Si chiede online con SPID o CIE: ') + PORTALI[k][1]); a.innerHTML = '\uD83D\uDD10 ' + (isEn ? 'Online with SPID/CIE' : 'Online con SPID/CIE') + '' + PORTALI[k][1] + ' \u2197'; v.appendChild(a); fatte++; break; } } } if (!fatte) { return; } var leg = document.createElement('p'); leg.className = 'doc-spid-legenda'; leg.innerHTML = '\uD83D\uDD10 ' + (isEn ? 'Online with SPID/CIE: documents marked this way can be obtained from home, free or at a small fee, logging in with SPID or the electronic ID card (CIE). Get SPID: spid.gov.it \u00B7 CIE: cartaidentita.interno.gov.it.' : 'Online con SPID/CIE: i documenti con questo segno si ottengono da casa, gratis o con pochi euro, entrando con SPID o con la carta d\u2019identit\u00E0 elettronica (CIE). Non hai SPID? spid.gov.it \u00B7 CIE: cartaidentita.interno.gov.it. Se preferisci, li recuperiamo noi con la delega.'); var primo = cont.querySelector('ul, ol, table'); if (primo) { if (primo.parentNode) { primo.parentNode.insertBefore(leg, primo); return; } } cont.insertBefore(leg, cont.firstChild); } function precompilaAssistente() { var d = ''; try { d = sessionStorage.getItem('nmfDomanda'); } catch (e) { d = ''; } if (!d) return; var giri = 0; var t = setInterval(function () { giri++; var ta = document.querySelector('.mwai-chatbot textarea, .mwai-chatbot-container textarea, .mwai-input textarea, .mwai-input input[type="text"]'); if (ta) { clearInterval(t); try { sessionStorage.removeItem('nmfDomanda'); } catch (e) { } var setter = null; try { setter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set; } catch (e) { setter = null; } if (setter) { if (ta.tagName === 'TEXTAREA') { setter.call(ta, d); } else { ta.value = d; } } else { ta.value = d; } ta.dispatchEvent(new Event('input', { bubbles: true })); try { ta.focus(); } catch (e) { } } else if (giri > 40) { clearInterval(t); } }, 250); } function ricercaSito() { if (document.body.classList.contains('modal-embed')) return; if (document.getElementById('srchBack')) return; var isEn = paginaInglese(); var base = 'https://notaiofiorentinomarco.com'; var back = document.createElement('div'); back.className = 'srch-back'; back.id = 'srchBack'; back.setAttribute('role', 'dialog'); back.setAttribute('aria-modal', 'true'); back.setAttribute('aria-label', isEn ? 'Search the site' : 'Cerca nel sito'); var quick = isEn ? [['Quote', base + '/en/#quote'], ['Documents', base + '/documenti/'], ['Tools', base + '/calcolatori/'], ['FAQ', base + '/domande-frequenti/']] : [['Preventivo', base + '/preventivo-notaio-napoli/'], ['Documenti da portare', base + '/documenti/'], ['Strumenti notarili', base + '/calcolatori/'], ['Successione online', base + '/successione-online/'], ['Domande frequenti', base + '/domande-frequenti/'], ['Glossario', base + '/glossario/']]; var q = ''; for (var i = 0; i < quick.length; i++) { q += '' + quick[i][0] + ''; } back.innerHTML = '
' + '
' + '' + '
' + '
' + (isEn ? 'Type at least 3 letters: results appear as you type.' : 'Scrivi almeno 3 lettere: i risultati compaiono mentre scrivi.') + '
' + q + '
' + '
' + (isEn ? 'Prefer a reasoned answer? Ask the AI assistant (it reads the site and never replaces the notary).' : 'Preferisci una risposta ragionata? Chiedi all\'assistente IA: legge le guide del sito e non sostituisce mai il notaio.') + '🤖 ' + (isEn ? 'Ask the assistant' : 'Chiedi all\'assistente') + '
'; document.body.appendChild(back); var input = back.querySelector('#srchInput'), list = back.querySelector('#srchList'), hint = back.querySelector('.srch-hint'), btnX = back.querySelector('.srch-close'); var apertoDa = null, timer = null, ultimo = ''; function decodifica(t) { var d = document.createElement('textarea'); d.innerHTML = t; return d.value; } function tipoTesto(r) { var st = r.subtype ? r.subtype : ''; if (st === 'page') return isEn ? 'Page' : 'Pagina'; if (st === 'post') return isEn ? 'Article' : 'Articolo'; return st; } function mostra(items) { list.innerHTML = ''; if (!items.length) { hint.textContent = isEn ? 'No results. Try another word, or ask the assistant below.' : 'Nessun risultato. Prova con un\'altra parola, oppure chiedi all\'assistente qui sotto.'; return; } hint.textContent = (isEn ? 'Results: ' : 'Risultati: ') + items.length; for (var i = 0; i < items.length; i++) { var li = document.createElement('li'), a = document.createElement('a'); a.href = items[i].url; var t = document.createElement('span'); t.textContent = decodifica(items[i].title ? items[i].title : ''); var sm = document.createElement('small'); sm.textContent = tipoTesto(items[i]) + ' · ' + items[i].url.replace(base, ''); a.appendChild(t); a.appendChild(sm); li.appendChild(a); list.appendChild(li); } } function cerca() { var v = input.value.trim(); if (v.length < 3) { list.innerHTML = ''; hint.textContent = isEn ? 'Type at least 3 letters: results appear as you type.' : 'Scrivi almeno 3 lettere: i risultati compaiono mentre scrivi.'; return; } if (v === ultimo) return; ultimo = v; hint.textContent = isEn ? 'Searching…' : 'Cerco…'; var url = base + '/wp-json/wp/v2/search?per_page=10' + String.fromCharCode(38) + 'search=' + encodeURIComponent(v); fetch(url, { credentials: 'omit' }).then(function (r) { return r.ok ? r.json() : []; }).then(function (js) { if (input.value.trim() !== v) return; mostra(js ? js : []); try { if (nfProntoTracciamento()) { nfChiama('event', 'search', { search_term: v, risultati: js ? js.length : 0 }); } } catch (e) { } }).catch(function () { hint.textContent = isEn ? 'Search unavailable right now.' : 'Ricerca non disponibile in questo momento: riprova tra poco.'; }); } var mic = back.querySelector('#srchMic'); var SR = window.SpeechRecognition ? window.SpeechRecognition : window.webkitSpeechRecognition; if (!SR) { if (mic) mic.style.display = 'none'; } else if (mic) { var rec = null, ascolto = false; mic.addEventListener('click', function () { if (ascolto) { try { rec.stop(); } catch (e) { } return; } try { rec = new SR(); rec.lang = isEn ? 'en-GB' : 'it-IT'; rec.interimResults = true; rec.maxAlternatives = 1; rec.onstart = function () { ascolto = true; mic.classList.add('on'); hint.textContent = isEn ? 'Listening… speak now.' : 'Ti ascolto… parla pure.'; }; rec.onresult = function (ev) { var t = ''; for (var k = ev.resultIndex; k < ev.results.length; k++) { t += ev.results[k][0].transcript; } input.value = t; if (ev.results[ev.results.length - 1].isFinal) { ultimo = ''; cerca(); } }; rec.onerror = function () { ascolto = false; mic.classList.remove('on'); hint.textContent = isEn ? 'Microphone not available: type your search.' : 'Microfono non disponibile: scrivi la ricerca.'; }; rec.onend = function () { ascolto = false; mic.classList.remove('on'); }; rec.start(); } catch (e) { hint.textContent = isEn ? 'Voice search not supported here.' : 'Ricerca vocale non supportata su questo browser.'; } }); } input.addEventListener('input', function () { if (timer) clearTimeout(timer); timer = setTimeout(cerca, 280); }); input.addEventListener('keydown', function (e) { if (e.key === 'Enter') { e.preventDefault(); if (timer) clearTimeout(timer); ultimo = ''; cerca(); } }); function apri(el) { back.classList.add('on'); document.body.classList.add('srch-open'); apertoDa = el; setTimeout(function () { input.focus(); }, 40); } function chiudi() { back.classList.remove('on'); document.body.classList.remove('srch-open'); if (apertoDa) { try { apertoDa.focus(); } catch (e) { } } } btnX.addEventListener('click', chiudi); var ia = back.querySelector('#srchIa'); if (ia) { ia.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); var dest = ia.getAttribute('href'); try { if (input.value.trim()) { sessionStorage.setItem('nmfDomanda', input.value.trim()); } } catch (err) { } var qui = window.location.pathname.replace(/\/+$/, ''); if (qui === (isEn ? '/en/assistant' : '/assistente-ia')) { chiudi(); var ch = document.querySelector('.mwai-chatbot, .mwai-chatbot-container, .mwai-input'); if (ch) { ch.scrollIntoView({ behavior: 'smooth', block: 'start' }); } precompilaAssistente(); return; } window.location.href = dest; }); } back.addEventListener('click', function (e) { if (e.target === back) chiudi(); }); document.addEventListener('keydown', function (e) { if (e.key === 'Escape') { if (back.classList.contains('on')) chiudi(); } var mod = e.ctrlKey ? true : e.metaKey; if (mod) { if (e.key === 'k') { e.preventDefault(); if (back.classList.contains('on')) { chiudi(); } else { apri(document.activeElement); } } } }); var b = document.getElementById('navCerca'); if (b) b.addEventListener('click', function () { apri(b); }); var f = document.querySelector('form[role="search"], form.search-form'); if (f) { f.addEventListener('submit', function (e) { var inp = f.querySelector('input[type="search"], input[name="s"]'); if (inp) { e.preventDefault(); apri(inp); input.value = inp.value; cerca(); } }); } } function barraFlottante() { var isEn = paginaInglese(); var old = document.querySelectorAll('.sticky'); for (var i = 0; i < old.length; i++) { old[i].parentNode.removeChild(old[i]); } var base = 'https://notaiofiorentinomarco.com'; var d = document.createElement('div'); d.className = 'sticky sticky-v12'; var waIco = ''; var prevIco = ''; var vidIco = ''; var upIco = ''; var T = isEn ? { up: 'Back to top', prev: 'Request a quote or a consultation', mail: 'Write to segreteria@notaiofiorentinomarco.com', wa: 'Write to us on WhatsApp' } : { up: 'Torna su', prev: 'Richiedi preventivo o consulenza', mail: 'Scrivi a segreteria@notaiofiorentinomarco.com', wa: 'Scrivici su WhatsApp' }; var mailIco = ''; var mailHref = 'mailto:segreteria@notaiofiorentinomarco.com?subject=' + encodeURIComponent(isEn ? 'Request from the website' : 'Richiesta dal sito'); var prevHref = isEn ? base + '/en/#quote' : base + '/#richiesta'; var vidHref = 'https://calendar.app.google/9HHLD48jcFYP8ReK8'; var waHref = 'https://wa.me/393522737467?text=' + encodeURIComponent(isEn ? 'Hello, I would like some information' : 'Buongiorno, vorrei un\'informazione'); d.innerHTML = '' + upIco + '' + (isEn ? 'Top' : 'Su') + '' + '' + waIco + '' + T.wa + '' + '' + '' + mailIco + '' + T.mail + ''; document.body.appendChild(d); } function nascondiDoppioni() { var nav = document.querySelector('.nav-band'); var navR = nav ? nav.getBoundingClientRect() : null; var tutti = document.body.querySelectorAll('a, div, img, svg, span, button'); for (var i = 0; i < tutti.length; i++) { var el = tutti[i]; if (el.closest('.sticky, .nav-band, .art-pdf-rail, #iubenda-cs-banner, .iubenda-tp-btn, .menu-mobile, .a11y-widget, .qm-back, .pwa-back, .float-bar, .mob-bar, .side-rail, .side-up, .sb-toast, .social-bar')) continue; var cs = window.getComputedStyle(el); if (cs.position !== 'fixed') { if (cs.position !== 'absolute') continue; } var href = oppure(el.getAttribute('href'), ''); var inner = el.querySelector ? el.querySelector('a[href*="wa.me"], a[href*="whatsapp"]') : null; var eWa = /wa\.me|whatsapp/i.test(href) ? true : !!inner; var r = el.getBoundingClientRect(); var sopraMenu = false; if (navR) { if (cs.position === 'absolute') { if (r.width > 0) { if (r.top < navR.bottom) { if (r.bottom > navR.top) { if (r.right > navR.right - 520) sopraMenu = true; } } } } } var waFisso = eWa ? (cs.position === 'fixed') : false; if (waFisso ? true : sopraMenu) { el.style.setProperty('display', 'none', 'important'); } } } function tornaSu() { var sticky = document.querySelector('.sticky'); var backToTop = document.getElementById('backToTop'); if (backToTop) { backToTop.addEventListener('click', function (e) { e.preventDefault(); window.scrollTo({ top: 0, behavior: 'smooth' }); }); } if (!sticky) return; function aggiorna() { if (window.scrollY > 350) { sticky.classList.add('show-top'); } else { sticky.classList.remove('show-top'); } } window.addEventListener('scroll', aggiorna, { passive: true }); aggiorna(); } var statsAnimated = false; function animaNumeri(nodi) { if (statsAnimated) return; statsAnimated = true; Array.prototype.forEach.call(nodi, function (el) { var target = parseFloat(el.getAttribute('data-count')); if (isNaN(target)) return; var decimals = parseInt(oppure(el.getAttribute('data-decimal'), '0'), 10); var suffix = oppure(el.getAttribute('data-suffix'), ''); var duration = 1400; var start = null; function step(ts) { if (start === null) start = ts; var progress = Math.min((ts - start) / duration, 1); var value = target * progress; el.textContent = value.toFixed(decimals).replace('.', ',') + suffix; if (progress < 1) { requestAnimationFrame(step); } else { el.textContent = target.toFixed(decimals).replace('.', ',') + suffix; } } requestAnimationFrame(step); }); } function contatori() { var nodi = document.querySelectorAll('.stat-num[data-count]'); if (!nodi.length) return false; var sezione = oppure(document.querySelector('.stat-row'), nodi[0].parentElement); if ((!('IntersectionObserver' in window)) ? true : !sezione) { animaNumeri(nodi); return true; } var observer = new IntersectionObserver(function (entries) { for (var i = 0; i < entries.length; i++) { if (entries[i].isIntersecting) { animaNumeri(nodi); observer.disconnect(); break; } } }, { threshold: 0.25 }); observer.observe(sezione); var r = sezione.getBoundingClientRect(); if (r.top < window.innerHeight) { if (r.bottom > 0) { animaNumeri(nodi); } } return true; } function versioneInglese() { if (!paginaInglese()) return; try { document.documentElement.lang = 'en'; } catch (e) { } var sk = document.querySelector('.skip-link'); if (sk) sk.textContent = 'Skip to content'; var base = 'https://notaiofiorentinomarco.com'; var voci = [ ['How we can help', base + '/en/#silos'], ['Online services', null, '', '', [ ['Free written quote', base + '/en/#richiesta'], ['Accept a quote', base + '/accept-the-quote/'], ['Online consultation', base + '/consulenza-online/#en'], ['Book an appointment', base + '/en/#prenota'], ['Calculators', base + '/calcolatori/'], ['After the deed: copies', base + '/adempimenti-dopo-atto/#en'], ['Client area', base + '/area-riservata/#en'] ], 'sub-online'], ['Resources', null, '', '', [ ['Before the deed: documents and forms', base + '/documenti/'], ['After the deed: copies, residence, filings', base + '/dopo-l-atto/'], ['Buying from abroad', base + '/en/#estero'], ['The notary\'s cartoons', base + '/vignette-del-notaio/#en'], ['Free guides', base + '/guide-per-il-cittadino/'], ['Real-life cases', base + '/casi-risolti/'], ['Downloads: forms in English', base + '/area-download/#en'], ['FAQ', base + '/en/#faq'], ['Glossary in English (50 terms)', base + '/en/glossary/'], ['Full glossary in Italian (500+)', base + '/glossario/'] ], 'sub-resources'], ['Where we are', base + '/en/#zone'], ['Consultation \x26 quote', base + '/en/#prenota'], ['Contact', base + '/en/#richiesta', '', 'menu-contatti'], ['\uD83D\uDD10 Client area', base + '/area-riservata/', '', 'menu-area'], ['Get a quote', base + '/en/#richiesta', 'solo-telefono'] ]; var ul = document.querySelector('.nav ul'); if (ul) { ul.innerHTML = ''; voci.forEach(function (v) { var li = document.createElement('li'); if (v[2]) li.className = v[2]; if (v[4]) { li.className = 'has-sub'; var b = document.createElement('button'); var subId = oppure(v[5], 'sub-resources'); b.type = 'button'; b.className = 'sub-toggle'; b.setAttribute('aria-expanded', 'false'); b.setAttribute('aria-controls', subId); b.innerHTML = v[0] + ' '; var sub = document.createElement('ul'); sub.className = 'sub'; sub.id = subId; v[4].forEach(function (w) { var sli = document.createElement('li'); var sa = document.createElement('a'); sa.textContent = w[0]; sa.href = w[1]; if (/\.pdf$/i.test(w[1])) { sa.target = '_blank'; sa.rel = 'noopener'; } sli.appendChild(sa); sub.appendChild(sli); }); li.appendChild(b); li.appendChild(sub); ul.appendChild(li); return; } var a = document.createElement('a'); if (v[2]) a.className = 'menu-cta'; if (v[3]) a.className = v[3]; a.textContent = v[0]; a.href = v[1]; li.appendChild(a); ul.appendChild(li); }); } var lang = document.querySelector('.lang-switch'); if (lang) { lang.textContent = '\uD83C\uDDEE\uD83C\uDDF9 Italiano'; lang.classList.add('lang-it'); lang.href = base + '/'; lang.setAttribute('hreflang', 'it'); lang.setAttribute('aria-label', 'Vai al sito in italiano'); } var cta = document.querySelector('.nav .cta'); if (cta) { cta.textContent = 'Get a quote'; cta.href = base + '/en/#richiesta'; } var tg = document.getElementById('navToggle'); if (tg) tg.setAttribute('aria-label', 'Open the menu'); var waIcona = document.querySelector('.nav .nav-icon.wa'); if (waIcona) { waIcona.setAttribute('aria-label', 'Write to us on WhatsApp'); waIcona.setAttribute('title', 'Write to us on WhatsApp'); } var tit = document.querySelector('.entry-title, h1.page-title, .elementor-page-title'); if (tit) tit.style.display = 'none'; var sb = document.querySelector('.social-bar .sb-txt'); if (sb) sb.innerHTML = 'Studio Notarile Marco FiorentinoViale Antonio Gramsci, Naples \u2014 follow us, we write useful things.'; var lbl = document.querySelector('.stat-label-articoli'); if (lbl) lbl.textContent = 'articles published'; } function correggiAree() { var el = document.querySelector('.stat-num[data-count="3"], .stat-num[data-count="4"]'); if (el) { el.setAttribute('data-count', '8'); el.textContent = '0'; } } function togliTitoloHome() { var titoli = document.querySelectorAll('h1, h2, .entry-title, .page-title'); for (var i = 0; i < titoli.length; i++) { if (i >= 12) break; var t = oppure(titoli[i].textContent, '').trim().toLowerCase(); if (t === 'home') { titoli[i].style.display = 'none'; break; } } var hero = document.querySelector('.co-hero, .ad-hero, .ar-hero, .vg-hero, .lp-hero, .ig-hero'); if (hero) { var tit = document.querySelector('.entry-title, h1.page-title, .elementor-page-title'); if (tit) tit.style.display = 'none'; var h2 = hero.querySelector('h2'); if (h2) { var h1 = document.createElement('h1'); h1.className = h2.className; h1.innerHTML = h2.innerHTML; h1.setAttribute('style', oppure(h2.getAttribute('style'), '')); h2.parentNode.replaceChild(h1, h2); } } } function statisticheExtra() { var riga = document.querySelector('.stat-row'); if (!riga) return; if (riga.getAttribute('data-extra') === '1') return; riga.setAttribute('data-extra', '1'); var media = riga.querySelector('.stat-num[data-decimal]'); if (media ? !media.getAttribute('data-suffix') : false) { media.setAttribute('data-suffix', '/5'); } var box = document.createElement('div'); box.className = 'stat-box'; var n = document.createElement('span'); n.className = 'stat-num'; n.setAttribute('data-count', '311'); n.setAttribute('data-suffix', '+'); n.textContent = '311'; var l = document.createElement('span'); l.className = 'stat-label'; l.textContent = 'articoli pubblicati'; l.className = (l.className ? l.className + ' ' : '') + 'stat-label-articoli'; box.appendChild(n); box.appendChild(l); var boxMedia = media ? media.parentElement : null; if (boxMedia ? boxMedia.parentElement === riga : false) { riga.insertBefore(box, boxMedia); } else { riga.appendChild(box); } /* v24.4c: riquadro del glossario NotaioWiki (619 voci), cliccabile */ var gbox = document.createElement('a'); gbox.className = 'stat-box stat-box-glossario'; gbox.href = paginaInglese() ? 'https://notaiofiorentinomarco.com/en/glossary/' : 'https://notaiofiorentinomarco.com/glossario/'; gbox.setAttribute('aria-label', paginaInglese() ? 'NotaioWiki glossary: 619 entries' : 'Glossario NotaioWiki: 619 voci'); var gn = document.createElement('span'); gn.className = 'stat-num'; gn.setAttribute('data-count', '619'); gn.textContent = '619'; var gl = document.createElement('span'); gl.className = 'stat-label'; gl.textContent = paginaInglese() ? 'terms in the NotaioWiki glossary' : 'voci nel glossario NotaioWiki'; gbox.appendChild(gn); gbox.appendChild(gl); riga.appendChild(gbox); try { fetch('/wp-json/wp/v2/posts?per_page=1\x26_fields=id', { credentials: 'same-origin' }) .then(function (r) { var tot = parseInt(oppure(r.headers.get('X-WP-Total'), '0'), 10); if (tot > 0) { n.setAttribute('data-count', String(tot)); n.setAttribute('data-suffix', ''); setTimeout(function () { n.textContent = String(tot); }, 1700); } }) .catch(function () { }); } catch (e) { } } function barraSocial() { if (document.querySelector('.social-bar')) return; var isEn = paginaInglese(); var SOCIAL = [ ['LinkedIn', 'https://www.linkedin.com/in/marco-fiorentino-1107537/', 'linkedin'], ['YouTube', 'https://www.youtube.com/channel/UCujfgeuuDezjsMpE8mmhXnQ', 'youtube'], ['Instagram', 'https://www.instagram.com/notfiorentino/', 'instagram'], ['TikTok', 'https://www.tiktok.com/@notaiomarcofiorentino', 'tiktok'], ['X', 'https://x.com/NotFiorentino', 'x'], ['Google', 'https://www.google.com/maps/place/?q=place_id:ChIJYRu9DnIcOBMR-vkVVBOBjrU', 'google'], [isEn ? 'Write to us on WhatsApp' : 'Scrivici su WhatsApp', 'https://wa.me/393522737467', 'whatsapp'], [isEn ? 'Write to segreteria@notaiofiorentinomarco.com' : 'Scrivi a segreteria@notaiofiorentinomarco.com', 'mailto:segreteria@notaiofiorentinomarco.com', 'email'] ]; var bar = document.createElement('div'); bar.className = 'social-bar'; var inner = document.createElement('div'); inner.className = 'social-bar-in'; var txt = document.createElement('div'); txt.className = 'sb-txt'; txt.innerHTML = 'Studio Notarile Marco FiorentinoViale Antonio Gramsci, Napoli \u2014 seguiteci, scriviamo cose utili.'; inner.appendChild(txt); var links = document.createElement('div'); links.className = 'sb-links'; SOCIAL.forEach(function (s) { var a = document.createElement('a'); a.href = s[1]; a.setAttribute('aria-label', s[0]); a.setAttribute('title', s[0]); if (s[1].indexOf('http') === 0) { a.target = '_blank'; a.rel = 'noopener'; } a.innerHTML = svgMarchio(s[2]); a.className = 'sb-' + s[2]; links.appendChild(a); }); inner.appendChild(links); var rev = document.createElement('div'); rev.className = 'sb-reviews'; var star = ''; rev.innerHTML = '' + star + (isEn ? 'Happy with us? Leave a review:' : 'Ti sei trovato bene? Lascia una recensione:') + '' + 'Google' + 'Trustpilot' + ''; inner.appendChild(rev); var legal = document.createElement('div'); legal.className = 'sb-legal'; var motto = document.createElement('div'); motto.className = 'sb-motto'; motto.innerHTML = isEn ? 'Looking for justice? We help you find it inside the law.' : 'Cercavi la giustizia? Noi ti aiutiamo a trovarla dentro la legge.'; inner.appendChild(motto); legal.innerHTML = 'Notaio Marco Fiorentino — Viale Antonio Gramsci 19, 80122 Napoli — P.IVA 00362508889 · ' + (isEn ? 'How to reach us' : 'Come raggiungerci') + '' + 'Segreteria segreteria@notaiofiorentinomarco.com · Email marco.fiorentino@notariato.it · PEC marco.fiorentino@postacertificata.notariato.it' + '' + (isEn ? 'Professional liability insurance' : 'Polizza di responsabilità civile professionale') + ': AIG Europe Limited, ' + (isEn ? 'individual policy' : 'polizza individuale') + ' n. IFL0008350 ' + (isEn ? 'and collective policy of the Consiglio Nazionale del Notariato' : 'e polizza collettiva del Consiglio Nazionale del Notariato') + ' n. IFL0008164.151675, ' + (isEn ? 'cover' : 'massimale') + ' € 3.000.000' + '\uD83D\uDCEC Newsletter · ' + (isEn ? 'For professionals' : 'Per i professionisti') + '' + '\uD83D\uDCDA ' + (isEn ? 'Guides of the Consiglio Nazionale del Notariato' : 'Guide del Consiglio Nazionale del Notariato') + '' + '\u2696\uFE0F ' + (isEn ? 'Notary enrolled with the ' : 'Notaio iscritto al ') + '' + (isEn ? 'Consiglio Notarile di Napoli' : 'Consiglio Notarile dei Distretti Riuniti di Napoli, Torre Annunziata e Nola') + ' \u00B7 Consiglio Nazionale del Notariato \u00B7 ' + (isEn ? 'AI notice (Law 132/2025, AI Act)' : 'Informativa IA (L. 132/2025, AI Act)') + '' + '' + (isEn ? 'The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.' : 'Il robot Android \u00E8 riprodotto o modificato da un\u2019opera creata e condivisa da Google e utilizzato secondo i termini della licenza Creative Commons 3.0 Attribution.') + '' + 'Privacy Policy · Cookie Policy · ' + (isEn ? 'Client area' : 'Area riservata') + ''; var app = document.createElement('div'); app.className = 'sb-appcard'; app.innerHTML = '

' + (isEn ? '\uD83D\uDCF2 The Studio app' : '\uD83D\uDCF2 L\u2019app dello Studio') + '

' + '

' + (isEn ? 'Quote, notarial tools, client area and WhatsApp on your phone: no app store, it installs in 10 seconds.' : 'Preventivo, strumenti notarili, area clienti e WhatsApp sul telefono: niente store, si installa in 10 secondi.') + '

' + '
' + '
' + 'Android' + (isEn ? 'Install' : 'Installa') + '' + 'iPhone / iPad' + (isEn ? 'Install' : 'Installa') + '' + '' + (isEn ? 'How it works' : 'Come funziona') + '
'; inner.insertBefore(app, inner.firstChild); inner.appendChild(legal); var copy = document.createElement('div'); copy.className = 'sb-copy'; copy.textContent = isEn ? 'Unless otherwise stated, all content is copyright \u00A9 2026 Studio Notarile Marco Fiorentino. Texts, illustrations, cartoons and tools may not be copied without permission.' : 'Salvo diversa indicazione, tutti i contenuti di questo sito sono protetti da copyright \u00A9 2026 Studio Notarile Marco Fiorentino. Testi, illustrazioni, vignette e strumenti non possono essere copiati senza autorizzazione.'; inner.appendChild(copy); var pwd = document.createElement('div'); pwd.className = 'sb-powered'; pwd.innerHTML = '' + 'M.F. \u2014 Studio Notarile Marco Fiorentino' + 'Studio Notarile Marco Fiorentino \u00B7 Napoli' + ''; inner.appendChild(pwd); var nw = document.createElement('a'); nw.className = 'sb-wiki'; nw.href = 'https://notaiofiorentinomarco.com/wiki-glossario/'; nw.setAttribute('aria-label', isEn ? 'NotaioWiki: the participatory glossary of the Studio' : 'NotaioWiki: il glossario partecipato dello Studio'); nw.innerHTML = logoNotaioWiki(30) + 'NotaioWiki' + (isEn ? 'the participatory glossary: 500+ words explained, you can propose changes' : 'il glossario partecipato: 500+ parole spiegate, puoi proporre modifiche') + ''; inner.appendChild(nw); bar.appendChild(inner); document.body.appendChild(bar); } var propostaInstalla = null; var fuocoPrimaDellaFinestra = null; function registraServiceWorker() { if (!('serviceWorker' in navigator)) return; var prot = window.location.protocol ? window.location.protocol : ''; if (prot.indexOf('https') !== 0) { if (window.location.hostname !== 'localhost') return; } function avvia() { try { var p = navigator.serviceWorker.register('/sw.js', { scope: '/' }); if (p ? typeof p.catch === 'function' : false) { p.catch(function () { return null; }); } } catch (e) { } } if (document.readyState === 'complete') { avvia(); } else { window.addEventListener('load', avvia); } } function collegaManifest() { if (!document.querySelector('link[rel="manifest"]')) { var l = document.createElement('link'); l.rel = 'manifest'; l.href = '/manifest.webmanifest'; document.head.appendChild(l); } var righe = [ ['mobile-web-app-capable', 'yes'], ['apple-mobile-web-app-capable', 'yes'], ['apple-mobile-web-app-status-bar-style', 'black-translucent'], ['apple-mobile-web-app-title', 'Notaio Fiorentino'], ['application-name', 'Notaio Fiorentino'] ]; for (var i = 0; i < righe.length; i++) { var m = document.querySelector('meta[name="' + righe[i][0] + '"]'); if (!m) { m = document.createElement('meta'); m.setAttribute('name', righe[i][0]); document.head.appendChild(m); } m.setAttribute('content', righe[i][1]); } } window.addEventListener('beforeinstallprompt', function (e) { try { e.preventDefault(); } catch (err) { } propostaInstalla = e; }); window.addEventListener('appinstalled', function () { propostaInstalla = null; toastApp(paginaInglese() ? 'The app has been installed.' : 'Fatto: l’app è installata.'); }); function giaInstallata() { if (window.navigator ? window.navigator.standalone === true : false) return true; if (!window.matchMedia) return false; try { if (window.matchMedia('(display-mode: standalone)').matches) return true; if (window.matchMedia('(display-mode: fullscreen)').matches) return true; if (window.matchMedia('(display-mode: minimal-ui)').matches) return true; } catch (e) { } return false; } function eApple() { var ua = navigator.userAgent ? navigator.userAgent : ''; if (/iPad|iPhone|iPod/.test(ua)) return true; if (ua.indexOf('Macintosh') > -1) { if (navigator.maxTouchPoints > 1) return true; } return false; } function eSafari() { var ua = navigator.userAgent ? navigator.userAgent : ''; if (/CriOS|FxiOS|EdgiOS|OPiOS|Chrome|Chromium|Android|SamsungBrowser/.test(ua)) return false; return /Safari/.test(ua); } function toastApp(msg) { try { var vecchio = document.querySelector('.sb-toast'); if (vecchio) { if (vecchio.parentNode) vecchio.parentNode.removeChild(vecchio); } var t = document.createElement('div'); t.className = 'sb-toast'; t.setAttribute('role', 'status'); t.setAttribute('aria-live', 'polite'); t.textContent = msg; document.body.appendChild(t); setTimeout(function () { if (t.parentNode) t.parentNode.removeChild(t); }, 4500); } catch (e) { } } function tastoEscGuida(e) { var tasto = e.key ? e.key : ''; if (tasto === 'Escape') { chiudiGuidaApp(); return; } if (tasto === 'Esc') { chiudiGuidaApp(); } } function chiudiGuidaApp() { var back = document.querySelector('.pwa-back'); if (!back) return; back.classList.remove('on'); if (back.parentNode) back.parentNode.removeChild(back); document.removeEventListener('keydown', tastoEscGuida); if (fuocoPrimaDellaFinestra) { try { fuocoPrimaDellaFinestra.focus(); } catch (e) { } } fuocoPrimaDellaFinestra = null; } function iconaCondividi() { return ''; } function iconaTrePuntini() { return ''; } function guidaApp(tipo) { chiudiGuidaApp(); var isEn = paginaInglese(); fuocoPrimaDellaFinestra = document.activeElement; var titolo, corpo; if (tipo === 'ios') { titolo = isEn ? 'Install the app on iPhone or iPad' : 'Installa l’app su iPhone o iPad'; corpo = '

' + (isEn ? 'On iPhone and iPad the app is added from Safari, in three taps.' : 'Su iPhone e iPad l’app si aggiunge da Safari, in tre tocchi.') + '

' + '
    ' + '
  1. ' + (isEn ? 'Tap Share' : 'Tocca Condividi') + ' ' + iconaCondividi() + ' ' + (isEn ? '(the square with the arrow pointing up, at the bottom of the screen).' : '(il quadrato con la freccia in su, in basso al centro).') + '
  2. ' + '
  3. ' + (isEn ? 'Scroll the menu and tap Add to Home Screen.' : 'Scorri il menu e tocca Aggiungi alla schermata Home.') + '
  4. ' + '
  5. ' + (isEn ? 'Tap Add, top right. The icon appears with your apps.' : 'Tocca Aggiungi, in alto a destra. L’icona compare tra le tue app.') + '
  6. ' + '
'; var suApple = eApple(); var conSafari = eSafari(); var vaBene = suApple ? conSafari : false; if (!vaBene) { corpo += '
' + (isEn ? 'Do not see the Share button? Open this page in Safari: on iPhone and iPad only Safari can add a site to the Home Screen.' : 'Non vedi il pulsante Condividi? Apri questa pagina in Safari: su iPhone e iPad solo Safari sa aggiungere il sito alla schermata Home.') + '
'; } } else { titolo = isEn ? 'Install the app on Android' : 'Installa l’app su Android'; corpo = '

' + (isEn ? 'Your browser did not offer the automatic install. You can still do it by hand, in three taps.' : 'Il browser non ha proposto l’installazione automatica. Si fa lo stesso a mano, in tre tocchi.') + '

' + '
    ' + '
  1. ' + (isEn ? 'Open the menu' : 'Apri il menu') + ' ' + iconaTrePuntini() + ' ' + (isEn ? '(the three dots, top right in Chrome).' : '(i tre puntini, in alto a destra in Chrome).') + '
  2. ' + '
  3. ' + (isEn ? 'Tap Install app; if it is not there, tap Add to Home screen.' : 'Tocca Installa app; se non c’è, tocca Aggiungi a schermata Home.') + '
  4. ' + '
  5. ' + (isEn ? 'Confirm with Install or Add. The icon appears with your apps.' : 'Conferma con Installa oppure Aggiungi. L’icona compare tra le tue app.') + '
  6. ' + '
' + '
' + (isEn ? 'Samsung Internet, Edge, Opera and Firefox use the same wording. On a computer, Chrome shows a small install icon at the right end of the address bar.' : 'Samsung Internet, Edge, Opera e Firefox usano le stesse parole. Sul computer, Chrome mostra una piccola icona di installazione in fondo alla barra dell’indirizzo.') + '
'; } var back = document.createElement('div'); back.className = 'pwa-back'; back.setAttribute('role', 'dialog'); back.setAttribute('aria-modal', 'true'); back.setAttribute('aria-labelledby', 'pwaTitolo'); var box = document.createElement('div'); box.className = 'pwa-box'; box.innerHTML = '' + '

' + titolo + '

' + corpo + '
' + '' + '' + (isEn ? 'Guide with pictures' : 'La guida con le immagini') + '' + '
'; back.appendChild(box); document.body.appendChild(back); back.classList.add('on'); back.addEventListener('click', function (ev) { if (ev.target === back) chiudiGuidaApp(); }); var bx = box.querySelector('.pwa-close'); if (bx) bx.addEventListener('click', chiudiGuidaApp); var ok = box.querySelector('.pwa-ok'); if (ok) ok.addEventListener('click', chiudiGuidaApp); document.addEventListener('keydown', tastoEscGuida); back.addEventListener('keydown', function (ev) { if (ev.key !== 'Tab') return; var dentro = box.querySelectorAll('button, a[href]'); if (dentro.length < 2) return; var primo = dentro[0]; var ultimo = dentro[dentro.length - 1]; if (ev.shiftKey) { if (document.activeElement === primo) { ev.preventDefault(); ultimo.focus(); } return; } if (document.activeElement === ultimo) { ev.preventDefault(); primo.focus(); } }); if (bx) { try { bx.focus(); } catch (e) { } } } function pulsantiApp() { var badges = document.querySelectorAll('.sb-badge[data-pwa]'); for (var i = 0; i < badges.length; i++) { agganciaBadge(badges[i]); } } function agganciaBadge(b) { if (b.getAttribute('data-pwa-pronto') === 'si') return; b.setAttribute('data-pwa-pronto', 'si'); b.setAttribute('role', 'button'); b.addEventListener('click', function (ev) { var tipo = b.getAttribute('data-pwa'); var isEn = paginaInglese(); if (tipo === 'ios') { ev.preventDefault(); guidaApp('ios'); return; } if (propostaInstalla) { ev.preventDefault(); var p = propostaInstalla; propostaInstalla = null; var partita = false; try { p.prompt(); partita = true; if (p.userChoice) { p.userChoice.then(function (scelta) { var esito = scelta ? scelta.outcome : ''; if (esito === 'dismissed') { propostaInstalla = p; } }).catch(function () { return null; }); } } catch (e) { } if (!partita) { guidaApp('android'); } return; } if (giaInstallata()) { ev.preventDefault(); toastApp(isEn ? 'The app is already installed.' : 'L’app è già installata.'); return; } ev.preventDefault(); guidaApp('android'); }); } function pulisciVecchioIndirizzo() { var NUOVO = 'Studio Notarile Marco Fiorentino · Viale Antonio Gramsci 19, 80122 Napoli'; try { var t = document.title ? document.title : ''; if (t.indexOf('Barletta') > -1) { var pulito = t.replace(/Studio Notarile Fiorentino\s*\|\s*Corso Garibaldi[^|]*\|\s*Barletta\s*\|\s*BAT/gi, 'Studio Notarile Marco Fiorentino — Napoli'); if (pulito === t) { pulito = t.replace(/Corso Garibaldi[^|]*/gi, 'Viale Antonio Gramsci 19'); pulito = pulito.replace(/Barletta/gi, 'Napoli'); pulito = pulito.replace(/\|\s*BAT/gi, ''); } pulito = pulito.replace(/\s{2,}/g, ' '); pulito = pulito.replace(/[\s|]+$/, ''); document.title = pulito; } } catch (e) { } try { if (!document.body) return; if (!document.createTreeWalker) return; var NOSTRI = '.nav-band, .social-bar, .pwa-back, .sb-toast, .qm-back, .float-bar, .mob-bar, .barra-mobile'; function nostro(el) { var n = el; while (n) { if (n.nodeType === 1) { if (n.matches ? n.matches(NOSTRI) : false) return true; } n = n.parentNode; } return false; } var w = document.createTreeWalker(document.body, 4, null, false); var daCambiare = []; var n2; while (w.nextNode()) { n2 = w.currentNode; var padre = n2.parentNode; if (!padre) continue; var tag = padre.nodeName ? padre.nodeName.toLowerCase() : ''; if (tag === 'script') continue; if (tag === 'style') continue; if (tag === 'textarea') continue; if (tag === 'noscript') continue; var v = n2.nodeValue ? n2.nodeValue : ''; if (v.indexOf('Corso Garibaldi') < 0) { if (v.indexOf('Barletta') < 0) continue; } if (v.length > 200) continue; if (nostro(padre)) continue; daCambiare.push(n2); } for (var k = 0; k < daCambiare.length; k++) { daCambiare[k].nodeValue = NUOVO; } } catch (e) { } } function vaiAlContenuto() { var sk = document.querySelector('.skip-link'); if (!sk) return; var target = document.getElementById('content'); if (!target) target = document.querySelector('main'); if (!target) target = document.querySelector('.entry-content'); if (!target) target = document.querySelector('.elementor'); if (!target) return; if (!target.id) target.id = 'content'; if (!target.hasAttribute('tabindex')) target.setAttribute('tabindex', '-1'); sk.setAttribute('href', '#' + target.id); } function traduciAreaRiservata() { if (!document.querySelector('.dsfm-upload-form, .file-viewer')) return; if (paginaInglese()) return; var D = { 'Your Uploaded Documents': 'I documenti che hai caricato', 'Documents from Professional': 'I documenti dello Studio per te', 'Documents from the Professional': 'I documenti dello Studio per te', 'Select a file to upload': 'Scegli un file da caricare', 'Upload File': 'Carica il file', 'File Name': 'Nome del file', 'Date Added': 'Data', 'Delete': 'Elimina', 'Download': 'Scarica', 'Log out': 'Esci', 'You are logged in.': 'Sei collegato.', 'You are logged in': 'Sei collegato', 'No documents found.': 'Nessun documento ancora: lo Studio li carica per te.', 'No documents uploaded yet.': 'Nessun documento ancora: lo Studio li carica per te.', 'Username or Email Address': 'Nome utente o email', 'Remember Me': 'Ricordami', 'Log In': 'Entra' }; var box = oppure(document.querySelector('.ar-login'), document.body); var walker = document.createTreeWalker(box, NodeFilter.SHOW_TEXT, null, false); var nodes = []; while (walker.nextNode()) nodes.push(walker.currentNode); nodes.forEach(function (n) { var t = n.nodeValue.trim(); if (D[t]) n.nodeValue = n.nodeValue.replace(t, D[t]); }); Array.prototype.forEach.call(box.querySelectorAll('input[type=submit], button'), function (b) { var v = oppure(oppure(b.value, b.textContent), '').trim(); if (D[v]) { if (b.value) b.value = D[v]; else b.textContent = D[v]; } }); } /* 24/9/2026 chat 2 - Il tracciamento (Google Analytics 4 e Google Ads) e' stato spostato nello snippet 6248 "Tracciamento Analytics e Ads". MOTIVO: finche' stava qui, il blocco automatico di iubenda fermava TUTTO questo script prima del consenso, e con esso il tasto Cerca IA, la finestra di ricerca e i sottomenu. Copia di sicurezza dello script intero: snippet 6247. */ function allineaTendine() { var voci = document.querySelectorAll('.nav li.has-sub'); if (!voci.length) return; function sistema(li) { var sub = li.querySelector('.sub'); if (!sub) return; var ul = li.closest ? li.closest('ul.is-open') : null; if (ul) return; sub.classList.remove('sub-right'); sub.classList.remove('sub-left'); var r = sub.getBoundingClientRect(); if (r.width === 0) return; var larghezza = window.innerWidth; if (document.documentElement.clientWidth) larghezza = document.documentElement.clientWidth; if (r.right > larghezza - 8) { sub.classList.add('sub-right'); } else if (r.left < 8) { sub.classList.add('sub-left'); } var r2 = sub.getBoundingClientRect(); if (r2.left < 8) { if (sub.classList.contains('sub-right')) { sub.classList.remove('sub-right'); sub.classList.add('sub-left'); } } } Array.prototype.forEach.call(voci, function (li) { var quando = function () { sistema(li); }; li.addEventListener('mouseenter', quando); li.addEventListener('focusin', quando); li.addEventListener('click', function () { setTimeout(quando, 0); }); li.addEventListener('touchstart', function () { setTimeout(quando, 0); }, { passive: true }); }); window.addEventListener('resize', function () { Array.prototype.forEach.call(document.querySelectorAll('.nav .sub.sub-right, .nav .sub.sub-left'), function (sub) { sub.classList.remove('sub-right'); sub.classList.remove('sub-left'); }); }); } function nomiContatti() { var isEn = paginaInglese(); var N = isEn ? { wa: 'Write to us on WhatsApp', tel: 'Call the office', mail: 'Write to segreteria@notaiofiorentinomarco.com' } : { wa: 'Scrivici su WhatsApp', tel: 'Chiama lo Studio', mail: 'Scrivi a segreteria@notaiofiorentinomarco.com' }; var link = document.querySelectorAll('a[href*="wa.me/"], a[href*="api.whatsapp.com"], a[href^="tel:"], a[href^="mailto:segreteria@notaiofiorentinomarco.com"]'); for (var i = 0; i < link.length; i++) { var a = link[i]; var h = a.getAttribute('href') ? a.getAttribute('href') : ''; var nome = ''; if (h.indexOf('tel:') === 0) { nome = N.tel; } else if (h.indexOf('mailto:') === 0) { nome = N.mail; } else { nome = N.wa; } if (a.getAttribute('aria-label') !== nome) a.setAttribute('aria-label', nome); if (!a.getAttribute('title')) a.setAttribute('title', nome); } } function attivaFont() { function attiva() { var l = document.querySelectorAll('link[rel="preload"][as="style"][href*="fonts.googleapis.com"]'); for (var i = 0; i < l.length; i++) { l[i].rel = 'stylesheet'; } } if (document.readyState === 'complete') { attiva(); } else { window.addEventListener('load', attiva); } } function favicon() { var url = 'https://notaiofiorentinomarco.com/wp-content/uploads/2026/09/icona-mf-notaio-napoli-192.png'; var tc = document.querySelector('meta[name="theme-color"]'); if (!tc) { tc = document.createElement('meta'); tc.name = 'theme-color'; document.head.appendChild(tc); } tc.content = '#1A3450'; var at = document.querySelector('meta[name="apple-mobile-web-app-title"]'); if (!at) { at = document.createElement('meta'); at.name = 'apple-mobile-web-app-title'; at.content = 'Notaio Fiorentino'; document.head.appendChild(at); } var vecchi = document.querySelectorAll('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]'); for (var i = 0; i < vecchi.length; i++) { if (vecchi[i].parentNode) vecchi[i].parentNode.removeChild(vecchi[i]); } var defs = [['icon', 'image/png', '192x192'], ['shortcut icon', 'image/png', null], ['apple-touch-icon', null, '180x180']]; for (var j = 0; j < defs.length; j++) { var l = document.createElement('link'); l.rel = defs[j][0]; if (defs[j][1]) l.type = defs[j][1]; if (defs[j][2]) l.setAttribute('sizes', defs[j][2]); l.href = url; document.head.appendChild(l); } } function agendaNuova() { var v = document.querySelectorAll('a[href*="mUvwjomxeMhftc717"]'); for (var i = 0; i < v.length; i++) { v[i].setAttribute('href', 'https://calendar.app.google/9HHLD48jcFYP8ReK8'); } var m = document.querySelectorAll('a[href^="mailto:info@notaiofiorentinomarco.com"]'); for (var k = 0; k < m.length; k++) { m[k].setAttribute('href', 'mailto:segreteria@notaiofiorentinomarco.com'); if (m[k].textContent.indexOf('info@') > -1) m[k].textContent = 'segreteria@notaiofiorentinomarco.com'; } } function barraLaterale() { if (document.body.classList.contains('modal-embed')) return; if (document.querySelector('.side-rail')) return; var isEn = paginaInglese(); var rail = document.createElement('div'); rail.className = 'side-rail'; rail.setAttribute('aria-hidden', 'true'); var fill = document.createElement('div'); fill.className = 'side-rail-fill'; rail.appendChild(fill); var su = document.createElement('button'); su.type = 'button'; su.className = 'side-up'; su.setAttribute('aria-label', isEn ? 'Back to top of the page' : 'Torna su, all’inizio della pagina'); su.setAttribute('title', isEn ? 'Back to top' : 'Torna su'); su.innerHTML = '' + (isEn ? 'Top' : 'Su') + ''; su.addEventListener('click', function () { var dolce = true; try { if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) dolce = false; } catch (e) { } window.scrollTo({ top: 0, behavior: dolce ? 'smooth' : 'auto' }); var primo = document.querySelector('.nav .brand'); if (primo) { try { primo.focus({ preventScroll: true }); } catch (e) { } } }); document.body.appendChild(rail); document.body.appendChild(su); document.body.classList.add('ha-rail'); function posiziona() { var h = 0; var band = document.querySelector('.nav-band.band-fixed'); if (band) h = band.getBoundingClientRect().height; su.style.top = ''; } function aggiorna() { var doc = document.documentElement; var tot = doc.scrollHeight - window.innerHeight; var y = window.scrollY; var pct = 0; if (tot > 0) pct = Math.min(100, Math.max(0, (y / tot) * 100)); fill.style.height = pct.toFixed(1) + '%'; if (y > 120) { rail.classList.add('on'); su.classList.add('on'); } else { rail.classList.remove('on'); su.classList.remove('on'); } posiziona(); } window.addEventListener('scroll', aggiorna, { passive: true }); window.addEventListener('resize', aggiorna); aggiorna(); } function avvisoPdfTouch(isEn) { var coarse = false; try { coarse = window.matchMedia('(pointer: coarse)').matches; } catch (e) { } if (!coarse) return; if (document.getElementById('pdfHint')) return; var d = document.createElement('div'); d.id = 'pdfHint'; d.className = 'sb-toast on'; d.setAttribute('role', 'status'); d.textContent = isEn ? 'In the window that opens choose "Save as PDF" (iPad: tap the share icon, then "Save to Files").' : 'Nella finestra che si apre scegli "Salva come PDF" (iPad: tocca l\'icona di condivisione, poi "Salva su File").'; document.body.appendChild(d); setTimeout(function () { if (d.parentNode) d.parentNode.removeChild(d); }, 9000); } var EC = String.fromCharCode(38); function paginaSenzaStrumenti() { var b = document.body; if (b.classList.contains('home')) return true; if (b.classList.contains('modal-embed')) return true; if (b.classList.contains('search')) return true; if (b.classList.contains('error404')) return true; if (b.classList.contains('archive')) return true; if (b.classList.contains('blog')) return true; if (b.classList.contains('category')) return true; if (b.classList.contains('tag')) return true; var cerca = window.location.search; if (!cerca) cerca = ''; if (cerca.indexOf('modal=1') !== -1) return true; var p = percorso().toLowerCase().replace(/\/+$/, ''); if (p === '') return true; if (p === '/en') return true; if (p === '/index.php') return true; var esclusi = [ '/calcolatori', '/preventivo-notaio-napoli', '/consulenza-online-notaio-napoli', '/area-riservata', '/accetta-il-preventivo', '/accept-the-quote' ]; for (var i = 0; i < esclusi.length; i++) { if (p === esclusi[i]) return true; } if (/^\/preventivo-[a-z0-9-]+-napoli$/.test(p)) return true; return false; } function segnoDiContenuto() { var b = document.body; if (b.classList.contains('single')) return true; if (b.classList.contains('single-post')) return true; if (b.classList.contains('page')) return true; if (document.querySelector('article')) return true; if (document.querySelector('.entry-content')) return true; if (document.querySelector('.elementor-widget-theme-post-content')) return true; if (document.querySelector('main .page-content')) return true; if (document.querySelector('main h1')) return true; return false; } function contenitoreContenuto() { var candidati = [ '.entry-content', '.post-content', '.elementor-widget-theme-post-content .elementor-widget-container', '.elementor-widget-theme-post-content', 'main .page-content', '.page-content', 'article .wp-block-post-content', 'article', 'main' ]; for (var i = 0; i < candidati.length; i++) { var el = document.querySelector(candidati[i]); if (el) { var testo = el.textContent ? el.textContent.trim() : ''; if (testo.length > 120) return el; } } return null; } function contenutoArticolo() { if (paginaSenzaStrumenti()) return null; if (!segnoDiContenuto()) return null; return contenitoreContenuto(); } function inserisciInCima(cont, nodo) { var tit = cont.querySelector('h1'); if (!tit) tit = cont.querySelector('h2'); if (tit) { var salita = tit; var giri = 0; while (salita.parentNode) { if (salita.parentNode === cont) break; salita = salita.parentNode; giri++; if (giri > 12) break; } if (salita.parentNode === cont) { var figli = cont.children; var pos = -1; for (var i = 0; i < figli.length; i++) { if (figli[i] === salita) pos = i; } if (pos > -1) { if (pos < 3) { cont.insertBefore(nodo, salita); return; } } } } var primo = cont.firstElementChild; if (primo) { cont.insertBefore(nodo, primo); return; } cont.appendChild(nodo); } function datiArticolo() { var t = document.querySelector('.entry-title'); if (!t) t = document.querySelector('article h1'); if (!t) t = document.querySelector('h1'); var titolo = t ? t.textContent.trim() : ''; if (!titolo) titolo = document.title; var url = window.location.href.split('#')[0]; var data = ''; var tm = document.querySelector('article time[datetime]'); if (!tm) tm = document.querySelector('time[datetime]'); if (tm) data = tm.textContent.trim(); if (!data) { var md = document.querySelector('meta[property="article:published_time"]'); if (md) data = (md.getAttribute('content') ? md.getAttribute('content') : '').slice(0, 10); } return { titolo: titolo, url: url, data: data }; } function intestazioneStampa(dati, contenitore) { if (document.querySelector('.print-head')) return; var isEn = paginaInglese(); var head = document.createElement('div'); head.className = 'print-head'; head.setAttribute('aria-hidden', 'true'); head.innerHTML = '
' + '' + 'Studio Notarile Marco Fiorentino' + 'Viale Antonio Gramsci 19, 80122 Napoli · Tel/WhatsApp +39 352 2737467
' + 'segreteria@notaiofiorentinomarco.com · notaiofiorentinomarco.com
' + '
' + '
' + testoSicuro(dati.titolo) + '
' + '
' + testoSicuro(dati.url) + (dati.data ? ' · ' + testoSicuro(dati.data) : '') + '
'; var dove = document.querySelector('article'); if (!dove) dove = document.querySelector('.entry-content'); if (!dove) dove = contenitore; if (!dove) return; dove.insertBefore(head, dove.firstChild); var piede = document.createElement('div'); piede.className = 'print-foot-sito'; piede.setAttribute('aria-hidden', 'true'); piede.innerHTML = '
Studio Notarile Marco Fiorentino·Viale Antonio Gramsci 19, 80122 Napoli·Tel/WhatsApp +39 352 2737467 segreteria@notaiofiorentinomarco.com·PEC marco.fiorentino@postacertificata.notariato.it·notaiofiorentinomarco.com·P.IVA 00362508889
@notfiorentino · @notaiomarcofiorentino · @NotFiorentino · LinkedIn · YouTube · Google Polizza RC AIG Europe Limited n. IFL0008350 (individuale) e IFL0008164.151675 (collettiva CNN), massimale € 3.000.000
© 2026 Studio Notarile Marco Fiorentino — Contenuti elaborati con il supporto dell\'IA e verificati dal notaio. Salvo diversa indicazione, testi, illustrazioni e strumenti sono protetti da copyright. Informazione ai sensi dell\'art. 13 L. 132/2025 e art. 50 Reg. UE 2024/1689. Studio Notarile Marco Fiorentino
'; var rec = document.createElement('div'); rec.className = 'print-foot'; rec.setAttribute('aria-hidden', 'true'); rec.innerHTML = '
' + 'QR recensioni Google' + 'QR recensioni Trustpilot' + '
' + (isEn ? 'Leave us a review' : 'Lascia una recensione') + '' + 'Google: https://g.page/r/Cfr5FVQTgY61EBM/review' + 'Trustpilot: https://it.trustpilot.com/evaluate/notaiofiorentinomarco.com
' + '
'; var cont = document.querySelector('.entry-content'); if (!cont) cont = document.querySelector('.post-content'); if (!cont) cont = contenitore; if (cont) { cont.appendChild(rec); cont.appendChild(piede); } } function testoSicuro(s) { var d = document.createElement('div'); d.textContent = s ? s : ''; return d.innerHTML; } var PDF_ART_CSS = '' + 'body{font-family:Georgia,"Times New Roman",serif;color:#1B1B1B;margin:0;padding:22px 28px 30px;max-width:820px;-webkit-print-color-adjust:exact;print-color-adjust:exact;line-height:1.55;font-size:12.5pt;}' + '@page{size:A4;margin:14mm 13mm;}' + '.nmf-notice{background:#F2C288;color:#132A3D;font:600 13px/1.4 Arial,sans-serif;padding:9px 14px;border-radius:8px;margin:0 0 16px;}' + '.nmf-bar{margin:0 0 14px;font:12px Arial,sans-serif;color:#5E6B74;}' + '.nmf-bar button{background:#A34D26;color:#fff;border:0;border-radius:999px;padding:10px 18px;font:700 14px Arial,sans-serif;cursor:pointer;margin-right:8px;}' + '.nmf-head{border-bottom:3px solid #2F6F62;padding-bottom:12px;margin-bottom:18px;display:flex;gap:12px;align-items:flex-start;}' + '.nmf-head img{width:46px;height:46px;border-radius:50%;object-fit:cover;flex:none;}' + '.nmf-head h1{font-size:16px;margin:0 0 3px;color:#132A3D;font-family:Georgia,serif;}' + '.nmf-head p{font-size:11px;margin:1px 0;color:#5E6B74;font-family:Arial,sans-serif;}' + '.nmf-tit{font-size:22px;color:#132A3D;margin:4px 0 6px;font-family:Georgia,serif;line-height:1.25;}' + '.nmf-meta{font:10.5px Arial,sans-serif;color:#8A9399;margin:0 0 18px;word-break:break-all;}' + '.nmf-art h2{font-size:16pt;color:#132A3D;margin:18pt 0 6pt;line-height:1.25;page-break-after:avoid;}' + '.nmf-art h3{font-size:13.5pt;color:#132A3D;margin:14pt 0 4pt;page-break-after:avoid;}' + '.nmf-art h4{font-size:12.5pt;color:#132A3D;margin:12pt 0 4pt;}' + '.nmf-art p{margin:0 0 9pt;orphans:3;widows:3;}' + '.nmf-art ul,.nmf-art ol{margin:0 0 10pt 22pt;padding:0;}' + '.nmf-art li{margin:0 0 4pt;}' + '.nmf-art a{color:#132A3D;text-decoration:underline;}' + '.nmf-art img{max-width:60%;height:auto;display:block;margin:10pt auto;border-radius:8px;page-break-inside:avoid;}' + '.nmf-art figure{margin:10pt 0;text-align:center;} .nmf-art figcaption{font:10px Arial,sans-serif;color:#5E6B74;}' + '.nmf-art table{width:100%;border-collapse:collapse;font-size:10.5pt;margin:8pt 0 12pt;page-break-inside:avoid;}' + '.nmf-art th,.nmf-art td{border:1px solid #CFCFCF;padding:4pt 6pt;text-align:left;vertical-align:top;}' + '.nmf-art th{background:#EEE;color:#132A3D;font-family:Arial,sans-serif;font-size:10pt;}' + '.nmf-art blockquote,.nmf-art aside,.nmf-art .ai-note,.nmf-art .wp-block-quote{border-left:3pt solid #2F6F62;background:#F6F1E6;margin:10pt 0;padding:6pt 10pt;page-break-inside:avoid;font-size:11.5pt;}' + '.nmf-art .art-meta{font:11px Arial,sans-serif;color:#5E6B74;border-bottom:1px solid #E4DCC9;padding:0 0 8px;margin:0 0 14px;}' + '.nmf-art details{display:block;border:1px solid #E4DCC9;border-radius:8px;padding:4pt 10pt;margin:8pt 0;} .nmf-art summary{font-weight:700;color:#132A3D;}' + '.nmf-art .cc-tip{border:0;background:none;padding:0;font:inherit;color:inherit;}' + '.nmf-art .wp-block-buttons,.nmf-art .wp-block-button,.nmf-art form,.nmf-art iframe,.nmf-art video,.nmf-art audio,.nmf-art button:not(.cc-tip),.nmf-art .art-cta,.nmf-art .art-tools,.nmf-art .share-bar,.nmf-art .seguici,.nmf-art .print-head,.nmf-art .print-foot,.nmf-art .print-foot-sito,.nmf-art #ez-toc-container,.nmf-art .ez-toc,.nmf-art nav,.nmf-art .sticky,.nmf-art .art-pdf-rail{display:none !important;}' + '.nmf-au{font:11px Arial,sans-serif;color:#132A3D;margin:14px 0 0;font-weight:700;}' + '.nmf-ai{font:10.5px/1.55 Arial,sans-serif;color:#5E6B74;border-top:1px solid #E4DCC9;padding-top:10px;margin:20px 0 10px;}' + '.nmf-copy{font:10.5px/1.5 Arial,sans-serif;color:#5E6B74;margin:0 0 16px;}' + '.nmf-rev{display:flex;align-items:center;gap:10px;border:1px solid #E4DCC9;border-radius:12px;padding:12px 16px;margin:0 0 16px;background:#F6F1E6;page-break-inside:avoid;}' + '.nmf-rev .q{text-align:center;} .nmf-rev img{width:74px;height:74px;display:block;}' + '.nmf-rev .q span{display:block;font:9.5px Arial,sans-serif;color:#5E6B74;margin-top:2px;}' + '.nmf-rev p{margin:0 0 0 4px;font:11.5px Arial,sans-serif;color:#1B1B1B;} .nmf-rev a{color:#2F6F62;font-weight:700;}' + '.sfoot{width:100%;box-sizing:border-box;background:#132A3D;color:#F6F1E6;border-radius:8px;font-family:Arial,Helvetica,sans-serif;padding:9px 14px 10px;margin-top:14px;position:relative;overflow:hidden;page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;}' + '.sfoot .ico{width:30px;height:30px;border-radius:50%;object-fit:cover;position:absolute;left:14px;top:9px;}' + '.sfoot .ln{display:block;padding-left:40px;} .sfoot .r1{font-size:10.5px;line-height:1.35;margin:0;} .sfoot .r1 b{font-weight:700;color:#F6F1E6;}' + '.sfoot .sep{color:#F2C288;margin:0 4px;} .sfoot .r2{font-size:10px;line-height:1.35;margin:2px 0 0;} .sfoot .r2 .pol{display:block;}' + '.sfoot .soc{white-space:nowrap;margin-right:4px;} .sfoot .soc img{width:11px;height:11px;vertical-align:middle;margin-right:2px;}' + '.sfoot .r3{font-size:9.5px;line-height:1.35;color:#C9D2D6;display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;margin:4px 0 0;} .sfoot .r3 .credit{white-space:nowrap;} .sfoot .r3 .nw{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:#F6F1E6;} .sfoot .r3 .nw svg{flex:none;}' + '@media print{ .nmf-noprint{display:none !important;} body{padding:0;max-width:none;} }'; function pulisciCopiaArticolo(clone) { var via = clone.querySelectorAll('.autore, .art-tools, .share-bar, .seguici, .print-head, .print-foot, .print-foot-sito, .art-pdf-rail, .art-cta, .sticky, script, style, iframe, video, audio, form, .wp-block-jetpack-contact-form, .wp-block-jetpack-subscriptions, #ez-toc-container, .ez-toc, nav, .cc-bubble, .wp-block-buttons, .lettura-voce, .tts-bar'); for (var i = via.length - 1; i >= 0; i--) { if (via[i].parentNode) { via[i].parentNode.removeChild(via[i]); } } var tips = clone.querySelectorAll('.cc-tip'); for (var k = 0; k < tips.length; k++) { var sp = document.createElement('span'); sp.textContent = tips[k].textContent; tips[k].parentNode.replaceChild(sp, tips[k]); } var im = clone.querySelectorAll('img'); for (var j = 0; j < im.length; j++) { im[j].removeAttribute('loading'); im[j].removeAttribute('srcset'); im[j].removeAttribute('sizes'); var src = im[j].getAttribute('data-src') ? im[j].getAttribute('data-src') : im[j].getAttribute('src'); if (src) { im[j].setAttribute('src', src); } if (/data:image\/(gif|svg)/i.test(src ? src : '')) { im[j].parentNode.removeChild(im[j]); } } var det = clone.querySelectorAll('details'); for (var d = 0; d < det.length; d++) { det[d].setAttribute('open', ''); } var ids = clone.querySelectorAll('[id]'); for (var q = 0; q < ids.length; q++) { ids[q].removeAttribute('id'); } var h1 = clone.querySelector('h1'); if (h1) { if (h1.parentNode) { h1.parentNode.removeChild(h1); } } } function foglioArticolo(dati, clone, isEn) { var base = 'https://notaiofiorentinomarco.com'; var ICO = base + '/wp-content/uploads/2026/09/icona-mf-notaio-napoli-192.png'; var SOC = ['instagram', 'tiktok', 'x', 'linkedin', 'youtube', 'google']; var oggi = new Date(); var dataGen = oggi.toLocaleDateString(isEn ? 'en-GB' : 'it-IT', { day: 'numeric', month: 'long', year: 'numeric' }); var soc = ''; for (var i = 0; i < SOC.length; i++) { soc += ''; } var h = ''; h += '

Studio Notarile Marco Fiorentino

Viale Antonio Gramsci 19, 80122 Napoli · Tel/WhatsApp +39 352 2737467

segreteria@notaiofiorentinomarco.com · notaiofiorentinomarco.com · P.IVA 00362508889

'; h += '

' + testoSicuro(dati.titolo) + '

'; h += '

' + testoSicuro(dati.url) + (dati.data ? ' · ' + testoSicuro(dati.data) : '') + ' · ' + (isEn ? 'PDF generated on ' : 'PDF generato il ') + dataGen + '

'; h += '
' + clone.innerHTML + '
'; h += '

' + (isEn ? 'Marco Fiorentino, civil-law notary since 2011, in Naples since 2026 \u00B7 Notarial Council of Naples, Torre Annunziata and Nola' : 'Marco Fiorentino, notaio dal 2011, a Napoli dal 2026 \u00B7 Consiglio Notarile dei Distretti Riuniti di Napoli, Torre Annunziata e Nola') + '

'; h += '

' + (isEn ? 'Content produced with the support of artificial intelligence and verified by the notary, who improved, added or amended parts of it. General information, not legal advice on a specific case (Law 132/2025, art. 13; Reg. EU 2024/1689, art. 50).' : 'Contenuto elaborato con il supporto dell’intelligenza artificiale e verificato dal notaio, che ha migliorato, aggiunto o modificato delle parti. Informazione generale, non parere sul caso concreto (art. 13 L. 132/2025; art. 50 Reg. UE 2024/1689).') + '

'; h += '

© ' + oggi.getFullYear() + ' Studio Notarile Marco Fiorentino — ' + (isEn ? 'Content protected by copyright: share it only with the link and without changes.' : 'Contenuto protetto da copyright: può essere condiviso solo con il link e senza modifiche.') + '

'; h += '
QR GoogleGoogle
QR TrustpilotTrustpilot
'; h += '

' + (isEn ? 'Leave us a review:' : 'Lascia una recensione:') + '
Google · Trustpilot

'; h += '
Studio Notarile Marco Fiorentino·Viale Antonio Gramsci 19, 80122 Napoli·Tel/WhatsApp +39 352 2737467segreteria@notaiofiorentinomarco.com·PEC marco.fiorentino@postacertificata.notariato.it·notaiofiorentinomarco.com·P.IVA 00362508889
'; h += '
' + soc + '@notfiorentino · @notaiomarcofiorentino · @NotFiorentino · LinkedIn · YouTube · GooglePolizza RC AIG Europe Limited n. IFL0008350 (individuale) e IFL0008164.151675 (collettiva CNN), massimale € 3.000.000
'; h += '
' + logoNotaioWiki(18) + ' NotaioWiki · notaiofiorentinomarco.com/glossario/© ' + oggi.getFullYear() + ' Studio Notarile Marco Fiorentino — Contenuti elaborati con il supporto dell’IA e verificati dal notaio, che ha migliorato, aggiunto o modificato delle parti. Informazione ai sensi dell’art. 13 L. 132/2025 e dell’art. 50 Reg. UE 2024/1689.Studio Notarile Marco Fiorentino
'; return h; } function pdfArticolo(dati, cont, isEn) { var sorgente = cont; if (!sorgente) { sorgente = document.querySelector('.entry-content'); } if (!sorgente) { avvisoPdfTouch(isEn); intestazioneStampa(dati, cont); setTimeout(function () { try { window.print(); } catch (e) { } }, 60); return; } var clone = sorgente.cloneNode(true); pulisciCopiaArticolo(clone); var corpo = foglioArticolo(dati, clone, isEn); var nome = (dati.titolo ? dati.titolo : 'articolo').toLowerCase().replace(/[^a-z0-9\u00E0-\u00FC]+/g, '-').replace(/^-+|-+$/g, '').substring(0, 70); nome = 'notaio-fiorentino-' + nome + '.pdf'; window.nmfScaricaPdf(corpo, PDF_ART_CSS, nome, isEn, function () { stampaArticoloFinestra(dati, corpo, isEn); }); } function stampaArticoloFinestra(dati, corpo, isEn) { var win = null; try { win = window.open('', '_blank'); } catch (e) { win = null; } if (!win) { avvisoPdfTouch(isEn); intestazioneStampa(dati, null); setTimeout(function () { try { window.print(); } catch (e) { } }, 60); return; } var coarse = false; try { coarse = window.matchMedia('(pointer: coarse)').matches; } catch (e) { coarse = false; } var h = ''; h += '' + testoSicuro(dati.titolo) + ' \u2014 Studio Notarile Marco Fiorentino'; if (coarse) { h += '

' + (isEn ? 'In the window that opens choose "Save as PDF" (iPad: share icon \u2192 Save to Files).' : 'Nella finestra che si apre scegli \u00ABSalva come PDF\u00BB (iPad: icona di condivisione \u2192 Salva su File).') + '

'; } h += '

' + (isEn ? 'In the print window choose a printer or \u201CSave as PDF\u201D.' : 'Nella finestra di stampa scegli la stampante oppure \u00ABSalva come PDF\u00BB.') + '

'; h += corpo + ''; try { win.document.open(); win.document.write(h); win.document.close(); win.focus(); } catch (e) { return; } setTimeout(function () { try { win.print(); } catch (e) { } }, 800); } var html2pdfStato = ''; function caricaHtml2pdf(ok, ko) { if (window.html2pdf) { ok(); return; } if (html2pdfStato === 'errore') { ko(); return; } var sc = document.createElement('script'); sc.src = 'https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js'; sc.async = true; sc.onload = function () { if (window.html2pdf) { ok(); } else { html2pdfStato = 'errore'; ko(); } }; sc.onerror = function () { html2pdfStato = 'errore'; ko(); }; document.head.appendChild(sc); } window.nmfScaricaPdf = function (corpoHtml, css, nomeFile, isEn, ripiego) { var avviso = isEn ? 'Preparing the PDF\u2026 a few seconds.' : 'Preparo il PDF\u2026 pochi secondi.'; try { toastApp(avviso); } catch (e) { } caricaHtml2pdf(function () { var box = document.createElement('div'); box.className = 'nmf-pdf-stage'; box.setAttribute('aria-hidden', 'true'); box.style.cssText = 'position:absolute;left:-12000px;top:0;width:794px;background:#fff;z-index:-1;'; var cssScoped = css.replace(/body\{/g, '.nmf-pdf{').replace(/@page\{[^}]*\}/g, '').replace(/@media print\{[^}]*\}/g, ''); box.innerHTML = '
' + corpoHtml + '
'; document.body.appendChild(box); var el = box.querySelector('.nmf-pdf'); /* v24.4b: via dal PDF tutto cio' che manda in errore html2canvas (iframe, video, immagini di altri siti): prima finiva nella finestra di stampa. */ Array.prototype.forEach.call(box.querySelectorAll('iframe,video,audio,script,object,embed,canvas'), function (n) { if (n.parentNode) { n.parentNode.removeChild(n); } }); Array.prototype.forEach.call(box.querySelectorAll('img'), function (im) { var src = im.getAttribute('src') ? im.getAttribute('src') : ''; var mio = (src.indexOf('/') === 0) ? true : (src.indexOf(window.location.origin) === 0); if (src.indexOf('data:') === 0) { mio = true; } if (!mio) { if (im.parentNode) { im.parentNode.removeChild(im); } } }); var opt = { margin: [12, 12, 16, 12], filename: nomeFile, image: { type: 'jpeg', quality: 0.93 }, html2canvas: { scale: 2, useCORS: true, letterRendering: true, logging: false, windowWidth: 794 }, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }, pagebreak: { mode: ['css', 'legacy'], avoid: ['h2', 'h3', 'table', 'img', '.nmf-rev', '.sfoot', 'blockquote'] } }; var pulisci = function () { if (box.parentNode) { box.parentNode.removeChild(box); } }; try { window.html2pdf().set(opt).from(el).save().then(function () { pulisci(); try { toastApp(isEn ? 'PDF downloaded.' : 'PDF scaricato: lo trovi nei Download.'); } catch (e) { } try { if (nfProntoTracciamento()) { nfChiama('event', 'file_download', { file_name: nomeFile, link_url: window.location.href }); } } catch (e) { } }).catch(function (err) { pulisci(); try { console.warn('PDF: html2pdf non riuscito', err); } catch (e) {} ripiego(); }); } catch (e) { pulisci(); ripiego(); } }, function () { ripiego(); }); }; function copiaNegliAppunti(testo, dopo) { var fatto = false; try { if (navigator.clipboard) { if (navigator.clipboard.writeText) { navigator.clipboard.writeText(testo).then(function () { dopo(true); }).catch(function () { dopo(ripiegoCopia(testo)); }); return; } } } catch (e) { } fatto = ripiegoCopia(testo); dopo(fatto); } function ripiegoCopia(testo) { try { var ta = document.createElement('textarea'); ta.value = testo; ta.setAttribute('readonly', 'readonly'); ta.style.position = 'fixed'; ta.style.left = '-9999px'; document.body.appendChild(ta); ta.select(); var ok = document.execCommand ? document.execCommand('copy') : false; document.body.removeChild(ta); return ok ? true : false; } catch (e) { return false; } } function barraCondivisione(dati, infondo) { var isEn = paginaInglese(); var u = encodeURIComponent(dati.url); var t = encodeURIComponent(dati.titolo); var tu = encodeURIComponent(dati.titolo + ' — ' + dati.url); var RETI = [ ['WhatsApp', 'https://wa.me/?text=' + tu, '#25D366', 'whatsapp'], ['Facebook', 'https://www.facebook.com/sharer/sharer.php?u=' + u, '#0866FF', 'facebook'], ['X', 'https://twitter.com/intent/tweet?url=' + u + EC + 'text=' + t, '#000000', 'x'], ['LinkedIn', 'https://www.linkedin.com/sharing/share-offsite/?url=' + u, '#0A66C2', 'linkedin'], ['Telegram', 'https://t.me/share/url?url=' + u + EC + 'text=' + t, '#26A5E4', 'telegram'], ['Email', 'mailto:?subject=' + t + EC + 'body=' + encodeURIComponent(dati.titolo + '\n' + dati.url), '#1A3450', 'email'] ]; var bar = document.createElement('div'); bar.className = infondo ? 'share-bar share-fondo' : 'share-bar'; bar.setAttribute('role', 'group'); bar.setAttribute('aria-label', isEn ? 'Share this article' : 'Condividi questo articolo'); var tit = document.createElement('span'); tit.className = 'share-tit'; tit.textContent = isEn ? 'Share:' : 'Condividi:'; bar.appendChild(tit); RETI.forEach(function (r) { var a = document.createElement('a'); a.href = r[1]; a.style.background = r[2]; a.innerHTML = svgMarchio(r[3], true) + '' + r[0] + ''; a.setAttribute('aria-label', (isEn ? 'Share on ' : 'Condividi su ') + r[0]); a.setAttribute('title', (isEn ? 'Share on ' : 'Condividi su ') + r[0]); if (r[1].indexOf('mailto:') !== 0) { a.target = '_blank'; a.rel = 'noopener'; } if (r[1].indexOf('mailto:') === 0) { a.setAttribute('aria-label', isEn ? 'Share by email' : 'Condividi via email'); } bar.appendChild(a); }); var cp = infondo ? document.createElement('button') : null; if (cp) { cp.type = 'button'; cp.style.background = '#245A4F'; cp.textContent = isEn ? 'Copy link' : 'Copia link'; cp.setAttribute('aria-label', isEn ? 'Copy the link to this article' : 'Copia il link di questo articolo'); cp.addEventListener('click', function () { copiaNegliAppunti(dati.url, function (ok) { toastApp(ok ? (isEn ? 'Link copied.' : 'Link copiato.') : (isEn ? 'Copy did not work: select the address bar.' : 'Copia non riuscita: seleziona la barra dell’indirizzo.')); }); }); bar.appendChild(cp); } var nativa = false; try { if (navigator.share) nativa = true; } catch (e) { } if (nativa) { var nb = document.createElement('button'); nb.type = 'button'; nb.style.background = '#96502F'; nb.textContent = isEn ? 'Share' : 'Condividi'; nb.setAttribute('aria-label', isEn ? 'Share with the phone menu' : 'Condividi con il menu del telefono'); nb.addEventListener('click', function () { try { navigator.share({ title: dati.titolo, url: dati.url }).catch(function () { return null; }); } catch (e) { } }); bar.appendChild(nb); } return bar; } function rigaSeguici() { var isEn = paginaInglese(); var PROF = [ ['Instagram', 'https://www.instagram.com/notfiorentino/', 'instagram'], ['TikTok', 'https://www.tiktok.com/@notaiomarcofiorentino', 'tiktok'], ['X', 'https://x.com/NotFiorentino', 'x'], ['LinkedIn', 'https://www.linkedin.com/in/marco-fiorentino-1107537/', 'linkedin'], ['YouTube', 'https://www.youtube.com/channel/UCujfgeuuDezjsMpE8mmhXnQ', 'youtube'], ['Google', 'https://www.google.com/maps/place/?q=place_id:ChIJYRu9DnIcOBMR-vkVVBOBjrU', 'google'] ]; var d = document.createElement('div'); d.className = 'seguici'; var s = document.createElement('span'); s.className = 'seg-tit'; s.textContent = isEn ? 'Follow the Studio:' : 'Seguici:'; d.appendChild(s); PROF.forEach(function (p) { var a = document.createElement('a'); a.href = p[1]; a.target = '_blank'; a.rel = 'noopener'; var nome = (isEn ? 'The Studio on ' : 'Lo Studio su ') + p[0]; a.setAttribute('aria-label', nome); a.setAttribute('title', nome); a.innerHTML = svgMarchio(p[2]); a.className = 'sg-' + p[2]; d.appendChild(a); }); return d; } function pulsantePdfFisso(dati, cont) { if (document.querySelector('.art-pdf-rail')) return; var isEn = paginaInglese(); var b = document.createElement('button'); b.type = 'button'; b.className = 'art-pdf-rail'; b.innerHTML = 'PDF'; b.setAttribute('aria-label', isEn ? 'Download this page as a PDF' : 'Scarica questa pagina in PDF'); b.setAttribute('title', isEn ? 'Download as PDF' : 'Scarica in PDF'); b.addEventListener('click', function () { pdfArticolo(dati, cont, isEn); }); document.body.appendChild(b); } function strumentiArticolo() { var cont = contenutoArticolo(); if (!cont) return; if (cont.getAttribute('data-art-v15') === 'si') return; cont.setAttribute('data-art-v15', 'si'); var isEn = paginaInglese(); var dati = datiArticolo(); intestazioneStampa(dati, cont); var tools = document.createElement('div'); tools.className = 'art-tools'; tools.setAttribute('role', 'group'); tools.setAttribute('aria-label', isEn ? 'Article tools' : 'Strumenti dell’articolo'); var pdf = document.createElement('button'); pdf.type = 'button'; pdf.className = 'art-btn art-pdf'; pdf.innerHTML = '' + (isEn ? 'Download as PDF' : 'Scarica in PDF'); pdf.setAttribute('aria-label', isEn ? 'Download this article as a PDF (print sheet)' : 'Scarica questo articolo in PDF (stampa su foglio)'); pdf.addEventListener('click', function () { pdfArticolo(dati, cont, isEn); }); tools.appendChild(pdf); var lk = document.createElement('button'); lk.type = 'button'; lk.className = 'art-btn'; lk.innerHTML = '' + (isEn ? 'Copy link' : 'Copia link'); lk.setAttribute('aria-label', isEn ? 'Copy the link to this article' : 'Copia il link di questo articolo'); lk.addEventListener('click', function () { copiaNegliAppunti(dati.url, function (ok) { toastApp(ok ? (isEn ? 'Link copied.' : 'Link copiato.') : (isEn ? 'Copy did not work.' : 'Copia non riuscita.')); }); }); tools.appendChild(lk); tools.appendChild(barraCondivisione(dati, false)); inserisciInCima(cont, tools); boxAutore(cont, tools); cont.appendChild(barraCondivisione(dati, true)); cont.appendChild(rigaSeguici()); pulsantePdfFisso(dati, cont); } var AU_MESI = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre']; function auOggiIt() { var d = new Date(); return d.getDate() + ' ' + AU_MESI[d.getMonth()] + ' ' + d.getFullYear(); } function auOggiEn() { var d = new Date(); try { return d.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' }); } catch (e) { } return '' + d.getFullYear(); } function auRipulisci(s) { var t = s.replace(/\s+/g, ' '); t = t.replace(/^[\s.,;:]+/, ''); t = t.replace(/[\s.,;:]+$/, ''); return t; } function auQuando(cont, isEn) { var testo = ''; if (cont) { if (cont.textContent) { testo = cont.textContent; } } if (!testo) { if (document.body.textContent) { testo = document.body.textContent; } } var m = testo.match(/Aggiornat[oa] (?:il|a)\s+((?:\d{1,2}\s+)?(?:gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)\s+\d{4})/i); if (m) { var s = auRipulisci(m[1]); if (s.length > 2) { return s; } } var me = testo.match(/Last updated(?:\s+on)?\s+(\d{1,2}\s+[A-Za-z]+\s+\d{4}|[A-Za-z]+\s+\d{1,2},?\s+\d{4}|[A-Za-z]+\s+\d{4})/i); if (me) { var se = auRipulisci(me[1]); if (se.length > 2) { return se; } } if (isEn) { return auOggiEn(); } return auOggiIt(); } function boxAutore(cont, tools) { if (!cont) return; if (document.querySelector('.autore')) return; var isEn = paginaInglese(); var quando = auQuando(cont, isEn); var box = document.createElement('div'); box.className = 'autore'; box.setAttribute('data-autore', 'v18'); var img = ''; var dentro = ''; if (isEn) { dentro = '
' + '

Marco Fiorentino, civil-law notary since 2011, in Naples since 2026

' + '

Checked by the notary on ' + testoSicuro(quando) + ' · Viale Antonio Gramsci 19, 80122 Naples

' + '

About the notary' + ' · Publications

' + '
'; } else { dentro = '
' + '

Marco Fiorentino, notaio dal 2011, a Napoli dal 2026

' + '

Verificato dal notaio il ' + testoSicuro(quando) + ' · Viale Antonio Gramsci 19, 80122 Napoli

' + '

Chi sono' + ' · Pubblicazioni

' + '
'; } box.innerHTML = img + dentro; if (tools) { if (tools.parentNode) { tools.parentNode.insertBefore(box, tools.nextSibling); return; } } cont.insertBefore(box, cont.firstChild); } function codicePresenza() { var chiave = 'nf_presenza_id'; var id = ''; try { id = window.sessionStorage.getItem(chiave); } catch (e) { id = ''; } if (id) { if (/^[a-f0-9-]{8,64}$/.test(id)) return id; } var cifre = '0123456789abcdef'; var s = ''; for (var i = 0; i < 32; i++) { s += cifre.charAt(Math.floor(Math.random() * 16)); } id = s.slice(0, 8) + '-' + s.slice(8, 12) + '-' + s.slice(12, 16) + '-' + s.slice(16, 20) + '-' + s.slice(20, 32); try { window.sessionStorage.setItem(chiave, id); } catch (e) { } return id; } function mostraPresenze(n) { var isEn = paginaInglese(); var coda = ''; if (isEn) { coda = (n === 1) ? 'person online now' : 'people online now'; } else { coda = (n === 1) ? 'persona online adesso' : 'persone online adesso'; } var pill = document.getElementById('tbOnline'); if (pill) { var t = pill.querySelector('.tb-on-txt'); if (t) t.innerHTML = '' + n + ' ' + coda + '' + ''; pill.setAttribute('title', n + ' ' + coda); pill.setAttribute('role', 'status'); pill.hidden = true; } var foot = document.getElementById('sbOnline'); if (foot) { foot.innerHTML = (isEn ? 'Online now: ' : 'Adesso online: ') + '' + n + ''; foot.hidden = true; } } function nascondiPresenze() { var pill = document.getElementById('tbOnline'); if (pill) pill.hidden = true; var foot = document.getElementById('sbOnline'); if (foot) foot.hidden = true; } function presenzeOnline() { if (document.body.classList.contains('modal-embed')) return; if (!window.fetch) { nascondiPresenze(); return; } var rotta = 'https://notaiofiorentinomarco.com/wp-json/notaio/v1/presenze'; var id = codicePresenza(); var spento = false; var errori = 0; var ultimo = 0; function chiedi() { if (spento) return; var adesso = new Date().getTime(); if (ultimo) { if ((adesso - ultimo) < 60000) return; } ultimo = adesso; try { fetch(rotta, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ id: id }), credentials: 'omit', cache: 'no-store' }) .then(function (r) { if (!r.ok) { throw new Error('http'); } return r.json(); }) .then(function (d) { var n = 0; if (d) { if (typeof d.online === 'number') n = d.online; } if (n < 1) { nascondiPresenze(); return; } errori = 0; mostraPresenze(n); }) .catch(function () { errori++; nascondiPresenze(); if (errori > 2) spento = true; }); } catch (e) { nascondiPresenze(); spento = true; } } chiedi(); setInterval(function () { if (spento) return; if (document.visibilityState !== 'visible') return; chiedi(); }, 90000); document.addEventListener('visibilitychange', function () { if (spento) return; if (document.visibilityState !== 'visible') return; chiedi(); }); } pronto(function () { try { favicon(); } catch (e) { } try { attivaFont(); } catch (e) { } try { agendaNuova(); } catch (e) { } try { vaiAlContenuto(); } catch (e) { } try { traduciAreaRiservata(); } catch (e) { } try { barraSocial(); } catch (e) { } try { collegaManifest(); } catch (e) { } try { registraServiceWorker(); } catch (e) { } try { pulsantiApp(); setTimeout(pulsantiApp, 1200); } catch (e) { } try { pulisciVecchioIndirizzo(); setTimeout(pulisciVecchioIndirizzo, 1500); } catch (e) { } try { togliTitoloHome(); } catch (e) { } try { statisticheExtra(); } catch (e) { } try { correggiAree(); } catch (e) { } try { versioneInglese(); } catch (e) { } try { if (paginaInglese()) { var bh = document.getElementById('brandHome'); if (bh) { bh.href = 'https://notaiofiorentinomarco.com/en/'; bh.setAttribute('aria-label', 'Notaio Marco Fiorentino: back to the home page'); } } } catch (e) { } try { if (paginaInglese()) { var tb = document.getElementById('trustBand'); if (tb) tb.innerHTML = ' 4.9/5 · 48 Google reviewsLeave yours ✍️69 free notarial tools69 tools·Notary since 2011·6,000+ deeds·12 practice areas·Written quote within 1 working day'; } } catch (e) { } try { menuMobile(); } catch (e) { } try { allineaTendine(); } catch (e) { } try { modalitaEmbed(); } catch (e) { } try { /* analytics(); - ora e nello snippet 6248 */ } catch (e) { } try { barraFlottante(); } catch (e) { } try { barraMobile(); } catch (e) { } try { popupPreventivo(); } catch (e) { } try { ricercaSito(); } catch (e) { } try { compilazioneAutomatica(); } catch (e) { } try { continuaConGoogle(); } catch (e) { } try { marchioAnimato(); } catch (e) { } try { prenotaSuTelefono(); } catch (e) { } try { documentiOnline(); } catch (e) { } try { if (/\/(assistente-ia|en\/assistant)\/?$/.test(window.location.pathname)) { precompilaAssistente(); } } catch (e) { } try { menuCheSegue(); } catch (e) { } try { contatoriBanda(); } catch (e) { } try { presenzeOnline(); } catch (e) { } try { tornaSu(); } catch (e) { } try { barraLaterale(); } catch (e) { } try { strumentiArticolo(); setTimeout(strumentiArticolo, 1200); } catch (e) { } try { nascondiDoppioni(); setTimeout(nascondiDoppioni, 1500); setTimeout(nascondiDoppioni, 4000); } catch (e) { } try { nomiContatti(); setTimeout(nomiContatti, 2000); } catch (e) { } try { apriArticoloDaHash(); } catch (e) { } try { if (!contatori()) { var tentativi = 0; var t = setInterval(function () { tentativi++; if (contatori() ? true : (tentativi > 20)) clearInterval(t); }, 500); } } catch (e) { } }); window.addEventListener('hashchange', apriArticoloDaHash); })();