';
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 + '' +
'' + prevIco + '' + T.prev + '' +
'' + 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.') + '
';
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 =
'' +
'' +
'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.') + '
' +
'' +
'
' + (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).') + '
' +
'
' + (isEn ? 'Scroll the menu and tap Add to Home Screen.' : 'Scorri il menu e tocca Aggiungi alla schermata Home.') + '
' +
'
' + (isEn ? 'Tap Add, top right. The icon appears with your apps.' : 'Tocca Aggiungi, in alto a destra. L’icona compare tra le tue app.') + '
' +
'';
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.') + '
' +
'' +
'
' + (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).') + '
' +
'
' + (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.') + '
' +
'
' + (isEn ? 'Confirm with Install or Add. The icon appears with your apps.' : 'Conferma con Installa oppure Aggiungi. L’icona compare tra le tue app.') + '
' +
'' +
'
' + (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 =
'' +
'
';
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' +
'
';
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 2737467segreteria@notaiofiorentinomarco.com·PEC marco.fiorentino@postacertificata.notariato.it·notaiofiorentinomarco.com·P.IVA 00362508889
@notfiorentino · @notaiomarcofiorentino · @NotFiorentino · LinkedIn · YouTube · GooglePolizza RC AIG Europe Limited n. IFL0008350 (individuale) e IFL0008164.151675 (collettiva CNN), massimale € 3.000.000
' + (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).') + '
' + (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
';
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 = '\uD83D\uDCC4PDF';
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