evidenza
// SECTION GRANDEZZE
var larghezza = jQuery('.evidenza-img').width() / 3 * 2;
jQuery('.evidenza-img').each(function() {
jQuery(this).height(larghezza);
});
var quadrato = jQuery('.quadrato').width();
jQuery('.quadrato').each(function() {
jQuery(this).height(quadrato);
});
var tremezzi = jQuery('.tremezzi').width() / 3 * 2;
jQuery('.tremezzi').height(tremezzi);
var tremezziVerticale = jQuery('.tremezzi-verticale').width() / 2 * 3;
jQuery('.tremezzi-verticale').height(tremezziVerticale);
var AzLineRettangle = jQuery('.azline-rettangle').width() / 4 * 5;
jQuery('.azline-rettangle').height(AzLineRettangle);
//ANCHOR img quadrate
var quadratapar = jQuery('.quadrata img').parent();
var quadrata = jQuery(quadratapar).width();
jQuery(quadratapar).height(quadrata);
jQuery(quadratapar).addClass('quadrata-container');
var lifestyleProp = jQuery('.lifestyle-prop').width() / 4 * 5;
jQuery('.lifestyle-prop').height(lifestyleProp);
// !SECTION
//ANCHOR pop up lang
// jQuery('#popup-lang .close').click(function() {
// jQuery('#popup-lang').css('z-index', '-1');
// })
// jQuery('.top-widget').click(function() {
// jQuery('#popup-lang').css('z-index', '99999999999999');
// })
jQuery(document).ready(function() {
// SECTION COUNTRY VALUE
jQuery('.wcml_currency_switcher li a[rel="GBP"]').html('Regno Unito - (£)');
jQuery('.wcml_currency_switcher li a[rel="EUR"]').html('Europa - (€)');
jQuery('.wcml_currency_switcher li a[rel="USD"]').html('Stati Uniti - ($)');
jQuery('.wcml-vertical-list.popup-lang li').click(function() {
jQuery(this).parents('#country-popup').addClass('close')
});
if (localStorage.getItem("popupShown") !== "yes") {
// Mostra il pop-up
jQuery("#country-popup").show();
// Imposta un cookie o localStorage per indicare che il pop-up è stato mostrato
// Aggiungi un gestore di eventi per chiudere il pop-up
jQuery(".wcml-vertical-list.popup-lang li").click(function() {
jQuery("#country-popup").hide();
localStorage.setItem("popupShown", "yes");
});
}
// Aggiungi un gestore di eventi per rimuovere il cookie quando si fa clic sulla scelta
jQuery(".cambia-valuta").click(function() {
jQuery("#country-popup").show();
localStorage.removeItem("popupShown");
});
jQuery(".select2-selection__rendered").hide();
jQuery(".select2-selection__rendered").one("click", function() {
jQuery(this).show();
});
// !SECTION COUNTRY VALUE
jQuery('#preloader ').addClass('load');
jQuery('body #preloader').fadeOut("slow");
// SECTION MENU
// ANCHOR --->BURGER MENU
jQuery('.hamburger').click(function() {
jQuery(this).parent().toggleClass('open');
// jQuery('#menu-open').toggleClass('open');
jQuery('.main-menu.left').toggleClass('open');
jQuery('.header-base-container').toggleClass('open');
jQuery(this).toggleClass('open');
});
// ANCHOR --->SUB MENU
jQuery('.sub-menu').append('');
jQuery('.arrow-menu-sub').click(function() {
jQuery(this).toggleClass('open');
jQuery(this).parent('.arrow-menu').toggleClass('open');
})
if (jQuery(window).width() <= 1000) {
jQuery('.main-menu.left .menu-item-has-children').click(function() {
jQuery(this).children().toggleClass('open');
jQuery(this).toggleClass('open');
})
} else {
jQuery('.main-menu.left .menu-item-has-children').hover(function() {
jQuery(this).children().toggleClass('open');
jQuery(this).toggleClass('open');
})
}
jQuery('.main-menu.left .menu-item-has-children').append('');
jQuery('.search-mobile').click(function() {
jQuery(this).toggleClass('hide');
jQuery(this).parents('.header-base-container').toggleClass('search');
jQuery('.mobile-search').toggleClass('show');
})
// !SECTION
// ANCHOR --->Search
jQuery('html[lang="it-IT"] section.search input[type=search]').attr("placeholder",
"Cerca nella nostra collezione");
jQuery('html[lang="en-US"] section.search input[type=search]').attr("placeholder",
"Search our collection");
jQuery('html[lang="fr-FR"] section.search input[type=search]').attr("placeholder",
"Rechercher dans notre collection");
// SECTION INFOGRAFICHE
jQuery('.infografica-container .pin').click(function() {
jQuery('.infografica-container .pin').not(this).parent().removeClass('show');
jQuery(this).parent().toggleClass('show');
})
jQuery('.lifestyle-popup .close').click(function() {
jQuery('.infografica-container .pin').not(this).parent().removeClass('show');
jQuery(this).parent().toggleClass('show');
})
var altezzaInfografica = jQuery('.infografica-container .infografica .img-lifestyle img').height();
jQuery('.infografica-container .infografica').height(altezzaInfografica);
jQuery('.infografica-container .infografica .img-lifestyle').height(altezzaInfografica);
// !SECTION INFOGRAFICHE
// SECTION WOOCOMMERCE -----
// ANCHOR 3D
var model3d =
'';
jQuery('.rtwpvg-slider-wrapper').append(model3d);
jQuery('.icon-3d').click(function() {
jQuery(this).parent().toggleClass('show-3d');
})
jQuery('.close-3d').click(function() {
jQuery(this).parent().toggleClass('show-3d');
})
var altezza3d = jQuery('.product-3d iframe').width() / 4 * 5;
jQuery('.product-3d iframe').height(altezza3d);
// ANCHOR GALLERY
var singleImgcc = jQuery('.rtwpvg-slider-wrapper').width() / 4 * 5;
jQuery('.rtwpvg-slider-wrapper').height(singleImgcc);
jQuery('.rtwpvg-gallery-image').height(singleImgcc);
jQuery('.rtwpvg-single-image-container').height(singleImgcc);
jQuery('.slick-list').height(singleImgcc);
// SLIDE GALLERY
var thumbProd = jQuery('.woocommerce .woocommerce-product-gallery').width();
// ANCHOR SUMMARY DATI PRODOTTO
// function isEmpty(el) {
// return !jQuery().trim(el.html())
// }
// if (isEmpty(jQuery('.price'))) {
// jQuery('personalizzaioni').addClass('bordo');
// }
jQuery('.summary:has(.woocommerce-product-details__short-description)').addClass('not-border-b');
var rivestimenti = jQuery('.summary').width() / 4;
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li').css('max-width', rivestimenti);
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li').width(rivestimenti);
var pa_rivestimenti = rivestimenti / 4 * 5 + 32;
var pa_rivestimentiImg = rivestimenti / 4 * 5;
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li').css('min-height', pa_rivestimenti);
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li').css('max-height', pa_rivestimenti);
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li img').css('min-height', pa_rivestimentiImg);
jQuery('.thwvsf-wrapper-ul li.thwvsf-wrapper-item-li img').css('max-height', pa_rivestimentiImg);
jQuery('li.thwvsf-wrapper-item-li').each(function() {
var nameVariable = jQuery(this).attr('title');
jQuery(this).append(' ' + nameVariable + '
');
})
jQuery('.Az-custom-tab .Az-tax-title-container').click(function() {
jQuery(this).parent().toggleClass('open');
})
// jQuery('.Az-dimensioni .Az-tax-item').addClass('open');
if (jQuery('html').is(':lang(en-US)')) {
jQuery('.summary.entry-summary .variations_form td').append(
'The finishes displayed are approximate and may differ from the original.
'
)
}
if (jQuery('html').is(':lang(it-IT)')) {
jQuery('.summary.entry-summary .variations_form td').append(
'Le finiture visualizzate sono indicative e possono differire dall\'originale.
'
)
}
if (jQuery('html').is(':lang(fr-FR)')) {
jQuery('.summary.entry-summary .variations_form td').append(
'Les finitions présentées sont indicatives et peuvent différer de l\'original.
'
)
}
jQuery('.personalizzaioni .personalizzaioni-title').click(function() {
jQuery(this).parent().toggleClass('open');
});
//cambio foto a plugin perchè in bassa
jQuery(
'img[alt="Dedar A Joy"]').attr('src',
'https://azline.co/wp-content/uploads/2023/06/tessuto-dear-a-joy.jpg');
jQuery(
'img[alt="Dedar Alexander Melange"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedar-alexander-melange.jpg');
jQuery(
'img[alt="Dedar Amaral"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedal-amaral.jpg');
jQuery(
'img[alt="Dedar Belsuede"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedar-belsuede.jpg');
jQuery(
'img[alt="Dedar Dante"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/Dante.jpg');
jQuery(
'img[alt="Dedar Flair"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/Flair.jpg');
jQuery(
'img[alt="Dedar Karakorum"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedar-karakorum.jpg');
jQuery(
'img[alt="Dedar Sinequanon"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedar-sinequanon-1.jpg');
jQuery(
'img[alt="Dedar Twillman"]').attr('src',
'https://azline.co/wp-content/uploads/2023/05/dedar-twillman.jpg');
// ANCHOR PRODOTTI CORRELATI
jQuery('.related.products ul li a').addClass('azline-rettangle');
jQuery('.related.products ul.products').addClass('azline-rettangle');
jQuery(' .up-sells.upsells ul li a').addClass('azline-rettangle');
var correlatiGallery = jQuery('.Az-gallery img').first().height();
jQuery('.Az-gallery .hover').height(correlatiGallery);
// jQuery('.Az-gallery .image-gallery').height(correlatiGallery);
// jQuery('.Az-gallery .image-gallery img').height(correlatiGallery);
// ANCHOR CUSTOM SLIDE FOR UPSELL
jQuery(' .up-sells.upsells').append(
'');
jQuery(' .up-sells.upsells').append(
'
');
var slideCount = jQuery('.product .up-sells.upsells ul li').length;
var slideWidth = jQuery('product .up-sells.upsells ul li').width();
var slideHeight = jQuery('.product .up-sells.upsells ul li').height() / 4 * 5;
var sliderUlWidth = slideCount * slideWidth;
jQuery(' .up-sells.upsells ul').css({
'max-height': slideHeight,
'min-height': slideHeight,
height: slideHeight,
});
jQuery(' .up-sells.upsells ul li:last-child').prependTo(' .up-sells.upsells ul');
jQuery(' .up-sells.upsells ul li:last-child').addClass('ultimo');
jQuery(' .up-sells.upsells ul li:first-child').addClass('primo');
function up_moveLeft() {
jQuery(' .up-sells.upsells ul').animate({
left: +slideWidth
}, 200, function() {
jQuery(' .up-sells.upsells ul li:last-child').prependTo(
' .up-sells.upsells ul');
jQuery(' .up-sells.upsells ul').css('left', '');
});
};
function up_moveRight() {
jQuery(' .up-sells.upsells ul').animate({
left: -slideWidth
}, 200, function() {
jQuery(' .up-sells.upsells ul li:first-child').appendTo(
' .up-sells.upsells ul');
jQuery(' .up-sells.upsells ul').css('left', '');
});
};
jQuery('.control_prev_up').click(function() {
up_moveRight();
});
jQuery('.control_next_up').click(function() {
up_moveLeft();
});
// ANCHOR CUSTOM SLIDE FOR RELATED
jQuery('.related.products ul').after(
'');
jQuery('.related.products ul').after(
'');
var slideCounta = jQuery('.single-product .related.products ul li').length;
var slideWidtha = jQuery('single-product .related.products ul li').width();
var slideHeighta = jQuery('.single-product .related.products ul li').height() / 4 * 5;
var sliderUlWidtha = slideCounta * slideWidtha;
jQuery('.single-product .related.products ul li:last-child').prependTo(
'.single-product .related.products ul');
jQuery('.single-product .related.products ul li:last-child').addClass('ultimo');
jQuery('.single-product .related.products ul li:first-child').addClass('primo');
function moveLeft() {
jQuery(' .related.products ul').animate({
left: +slideWidtha
}, 200, function() {
jQuery('.single-product .related.products ul li:last-child').prependTo(
'.single-product .related.products ul ');
jQuery('.single-product .related.products ul').css('left', '');
});
};
function moveRight() {
jQuery('.single-product .related.products ul').animate({
left: -slideWidtha
}, 200, function() {
jQuery('.single-product .related.products ul li:first-child').appendTo(
'.single-product .related.products ul');
jQuery('.single-product .related.products ul').css('left', '');
});
};
jQuery('.control_prev').click(function() {
moveRight();
});
jQuery('.control_next').click(function() {
moveLeft();
});
var prodGalleryItemContainer = jQuery('.rtwpvg-container').width() / 4;
var prodGalleryItem = jQuery('.rtwpvg-thumbnail-image').width() / 4 * 5;
jQuery('.rtwpvg-thumbnail-image').height(prodGalleryItemContainer);
jQuery('.rtwpvg-thumbnail-image').css('min-height', prodGalleryItemContainer);
jQuery('.rtwpvg-thumbnail-image').css('max-height', prodGalleryItemContainer);
jQuery('.woocommerce-product-gallery ol').after(
''
);
jQuery('.woocommerce-product-gallery ol ').after(
' '
);
jQuery('.rtwpvg-thumbnail-wrapper').after(
''
);
jQuery('.rtwpvg-thumbnail-wrapper ').after(
' '
);
jQuery('.rtwpvg-thumbnail-image').each(function() {
jQuery(this).parents('.rtwpvg-container').addClass('arrow-on');
})
var slideCount1 = jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image')
.length;
if (slideCount1 < 4) {
jQuery('.rtwpvg-container').addClass('arrow-hidden')
}
var slideWidth1 = jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image')
.width();
var slideHeight1 = jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image')
.height() / 4 * 5;
var sliderUlWidth1 = slideCount1 * slideWidth1;
var altezzaItem = jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image')
.height();
function moveTop() {
jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').animate({
top: +slideWidth1
}, 200, function() {
jQuery(
'.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image:last-child'
)
.prependTo(
'.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider ');
jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').css('top', '');
// jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').css('margin-top',
// altezzaItem);
});
};
function moveBottom() {
jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').animate({
top: -slideWidth1
}, 200, function() {
jQuery(
'.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider .rtwpvg-thumbnail-image:first-child'
)
.appendTo(
'.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider ');
jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').css('top', '');
// jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').scrollTop(altezzaItem);
});
};
// function prev() {
// jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').scrollTop -= altezzaItem;
// }
// function next() {
// jQuery('.rtwpvg-thumbnail-wrapper .rtwpvg-thumbnail-slider').scrollBottom += altezzaItem;
// }
jQuery('.gallery-woo.next').click(function() {
moveTop();
});
jQuery('.gallery-woo.pre').click(function() {
moveBottom();
});
//------------------
//------------------
// !SECTION WOOCOMMERCE
// SECTION ARCHIVE WOOCOMMERCE
jQuery('.Az-gallery .hover').hover(function() {
jQuery(this).prev('.image-gallery').toggleClass('over');
});
if (jQuery(window).width() <= 768) {
var altG = jQuery('.rtwpvg-thumbnail-wrapper').width() / 4.2;
jQuery('.rtwpvg-thumbnail-wrapper').height(altG);
jQuery('.rtwpvg-thumbnail-wrapper').css('min-height', altG);
var myArrow = jQuery('#gallery-woo-pre');
var myArrowN = jQuery('#gallery-woo-next');
myArrow.css('min-height', altG);
myArrowN.css('min-height', altG);
console.log(myArrow);
}
var upsell = jQuery('.up-sells.upsells.products');
var correl = jQuery('.related.products');
var dettagli = jQuery('.Az-custom-tab');
var titlemobile = jQuery('.product-title-AZ');
if (jQuery(window).width() >= 768) {
jQuery('.personalizzaioni').after(dettagli);
jQuery('#single-product-end').after(correl, upsell);
} else {
jQuery('#single-product-end').after(correl, upsell);
jQuery('.personalizzaioni').after(dettagli);
jQuery('.woocommerce-product-gallery').before(titlemobile);
}
// !SECTION ARCHIVE WOOCOMMERCE
});
// !SECTION
-->