// new WOW().init();
var doc = $(document);
var abs = "https://www.rmix.it/";
var main_color = '#0069b4';
if ($("html").attr("lang") == 'it') {
var selected_txt = 'selezionati';
var search_txt = 'Cerca';
var select_txt = 'Seleziona';
var select_all_txt = 'Seleziona tutto';
var no_results_txt = 'Nessun risultato per ';
}
if ($("html").attr("lang") == 'en') {
var selected_txt = 'selected';
var search_txt = 'Search';
var select_txt = 'Select';
var select_all_txt = 'Select all';
var no_results_txt = 'No results for ';
}
if ($("html").attr("lang") == 'fr') {
var selected_txt = 'choisi';
var search_txt = 'Chercher';
var select_txt = 'Sélectionner';
var select_all_txt = 'Tout sélectionner';
var no_results_txt = 'Aucun résultat pour ';
}
if ($("html").attr("lang") == 'es') {
var selected_txt = 'seleccionado';
var search_txt = 'Cerca';
var select_txt = 'Seleccionar';
var select_all_txt = 'Seleccionar todo';
var no_results_txt = 'No hay resultados para ';
}
function set_home_dim () {
if ($(window).outerWidth() > 1200) {
if ($(window).scrollTop() > $(".pre-navbar-section").outerHeight())
$(".first_section .owl-claim , .owl-claim .item , .second_section , .second_section .item").css("height", ($(window).outerHeight() - $('.navbar-section').outerHeight() - $('.third_section').outerHeight()) / 2);
else
$(".first_section .owl-claim , .owl-claim .item , .second_section , .second_section .item").css("height", ($(window).outerHeight() - $('.navbar-section').outerHeight() - $('.pre-navbar-section').outerHeight() - $('.third_section').outerHeight()) / 2);
}
else {
if ($(window).scrollTop() > $(".pre-navbar-section").outerHeight()){
$(".first_section .owl-claim , .owl-claim .item").css("height", $(window).outerHeight() - $('.navbar-section').outerHeight());
}
else {
$(".first_section .owl-claim , .owl-claim .item").css("height", $(window).outerHeight() - $('.navbar-section').outerHeight() - $('.pre-navbar-section').outerHeight());
}
$(".second_section").css("height", $(window).outerHeight() - $('.navbar-section').outerHeight());
$(".second_section .item").css("height", ($(window).outerHeight() - $('.navbar-section').outerHeight()) / 2);
}
if (!detect_mobile_navigator() && !detect_mobile_screen()) {
$("select.sumo_sel").SumoSelect({
selectAll: true,
selectAllPartialCheck: false,
captionFormat: '{0} ' + selected_txt,
captionFormatAllSelected: '{0} ' + selected_txt,
search: true,
searchText: search_txt + '...',
placeholder: select_txt + '...',
locale : ['OK', 'Annulla', select_all_txt],
noMatch: no_results_txt + ' "{0}"'
});
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
setTimeout(function(){
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
}, 200);
setTimeout(function(){
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
}, 500);
}
else {
for (i = 0 ; i < $(".SumoSelect select").length ; i++) {
$('select')[i].sumo.unload();
}
}
}
function detect_mobile_navigator () {
const toMatch = [ /Android/i, /webOS/i, /iPhone/i, /iPad/i, /iPod/i, /BlackBerry/i, /Windows Phone/i ];
return toMatch.some((toMatchItem) => {
return navigator.userAgent.match(toMatchItem);
});
}
function detect_mobile_screen () {
return ($(window).width() >= 1200) ? false : true;
}
function initialize_page () {
$(".owl-carousel.owl-offers").each(function(i) {
var image = $($(".owl-carousel.owl-offers")[i]).find(".item")[0].style.backgroundImage;
console.log(image);
$($(".owl-carousel.owl-offers")[i]).parent().css({
backgroundImage: image,
backgroundSize: "cover",
backgroundRepeat: "no-repeat"
});
setTimeout(() => {
$($(".owl-carousel.owl-offers")[i]).owlCarousel({
loop: true,
margin: 15,
autoplay: true,
autoplayTimeout: 5000,
nav: false,
dots: true,
items: 1
});
}, (((i) * 750)));
});
$(".product_card_img").css("height",$(".product_card_img").outerWidth() / 2);
$(".owl-carousel.owl-claim , .owl-carousel.owl-news , .owl-carousel.owl-loghi").owlCarousel({
loop: true,
margin: 15,
autoplay: true,
autoplayTimeout: 5000,
nav: false,
dots: false,
items: 1
});
setTimeout(function(){
set_home_dim();
}, 1000);
if (!detect_mobile_navigator() && !detect_mobile_screen()) {
$("select.sumo_sel").SumoSelect({
selectAll: true,
selectAllPartialCheck: false,
captionFormat: '{0} ' + selected_txt,
captionFormatAllSelected: '{0} ' + selected_txt,
search: true,
searchText: search_txt + '...',
placeholder: select_txt + '...',
locale : ['OK', 'Annulla', select_all_txt],
noMatch: no_results_txt + ' "{0}"'
});
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
setTimeout(function(){
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
}, 200);
setTimeout(function(){
$(".sumo_cat_filter .options .opt label").each(function() {
var elem = $(this);
var value = $(this).html();
value = value.replace('rMIX' , 'rMIX');
value = value.replace('R&R' , 'R&R');
elem.html(value);
});
}, 500);
}
else {
for (i = 0 ; i < $(".SumoSelect select").length ; i++) {
$('select')[i].sumo.unload();
}
}
}
$(window).resize(function() {
set_home_dim();
})
$(window).scroll(function(){
if ($(this).scrollTop() > $(".pre-navbar-section").outerHeight()) {
$('.navbar-section').addClass("fixed-top");
$('body').css('padding-top', $('.navbar-section').outerHeight() + 'px');
}
else {
$('.navbar-section').removeClass("fixed-top");
$('body').css('padding-top', '0');
}
if (isScrolledIntoView($(".form_section")))
$(".grecaptcha-badge").fadeIn();
else
$(".grecaptcha-badge").fadeOut();
});
function scroll_to(selector) {
$("html , body").animate({
'scrollTop': $(selector).offset().top - $(".navbar-section").outerHeight()
}, 500);
}
function generate_alert (type,title,text) {
Swal.fire({
type: type,
title: title,
html: text,
confirmButtonColor: main_color
});
}
function validate_mail(email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test(email);
}
function show_banner () {
$.ajax({
url: abs + 'ajax/engine.php',
type: "POST",
data: {
action: 'show_banner'
},
success: function(res) {
$("body").append(res);
$(".popup_container").fadeIn(500);
}
});
}
function close_banner () {
$(".popup_container").fadeOut(500);
setTimeout(function(){
sessionStorage.setItem('arezio_banner', 1);
$(".popup_container").remove();
}, 1000);
}
function show_popup () {
// if ($("div.preloader").length == 0)
$("body").append('
');
$.ajax({
url: abs + 'ajax/engine.php',
type: "POST",
data: {
action: 'show_popup'
},
success: function(res) {
$(".popup_container .popup").html(res);
}
});
$(".popup_container").fadeIn(500);
}
function close_popup () {
$(".popup_container").fadeOut(500);
setTimeout(function(){
localStorage.setItem('arezio_popup' , 1);
$(".popup_container").remove();
}, 1000);
}
doc.ready(function() {
initialize_page ();
if (!sessionStorage.getItem('arezio_banner') ) {
setTimeout(function(){
show_banner();
}, 2000);
}
if ($(".contareh").length > 18)
$(".quiiii").toggleClass("col-xl-auto col-xl");
});
doc.on("click", ".btn-dismiss", function () {
close_popup();
});
doc.on("click", ".btn-banner-href", function () {
var link = $(this).attr("data-href");
if(link.trim() != ""){
sessionStorage.setItem('arezio_banner', 1);
setTimeout(function(){
window.location.href = link;
}, 500);
}
});
doc.on("click", ".btn-banner-dismiss", function () {
close_banner();
});
doc.on("click" , ".navbar-brand.rmix" , function (e) {
e.preventDefault();
window.location.href = $(this).attr("data-href");
});
doc.on("click",".nav-toggle",function() {
$(this).toggleClass("expanded");
$(".slide_menu").toggleClass("open");
if ($(this).scrollTop() > $(".pre-navbar-section").outerHeight()) {
$('.navbar-section').addClass("fixed-top");
$('body').css('padding-top', $('.navbar-section').outerHeight() + 'px');
}
else {
$('.navbar-section').removeClass("fixed-top");
$('body').css('padding-top', '0');
}
});
doc.on("click","[data-href]",function(){
$('.navbar-collapse').collapse('hide');
$(".nav-toggle").toggleClass("expanded");
$(".slide_menu").toggleClass("open");
scroll_to($(this).attr("data-href"));
});
doc.on("submit", "form.contact_form", function(e){
e.preventDefault();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var swag = $('[name="reason[]"]:checked').val();
var errors = [];
$("form.contact_form [data-mandatory]").each(function(){
if ($(this).attr("name").trim() == 'mail') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if (typeof swag === 'undefined') {
errors.push($("[data-swagg]").attr("data-swagg"));
}
if($("#privacy").prop("checked") === false)
errors.push($("#privacy").attr("data-error"));
if($("#privacy_3").prop("checked") === false)
errors.push($("#privacy_3").attr("data-error"));
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error",$("form.contact_form").attr("data-error"),text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.contact_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", $("form.contact_form").attr("data-error"), json.text);
else {
start_loading ();
setTimeout(function(){
window.location.href = abs + 'thank-you/';
}, 2500);
}
}
});
}
}
}
}
});
});
});
});
doc.on("submit", "form.popup_form", function(e){
e.preventDefault();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.popup_form [data-mandatory]").each(function(){
if ($(this).attr("name").trim() == 'mail') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if($("#privacy_2").prop("checked") === false)
errors.push($("#privacy_2").attr("data-error"));
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error",$("form.contact_form").attr("data-error"),text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.popup_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", $("form.contact_form").attr("data-error"), json.text);
else {
close_popup();
generate_alert(json.type, json.title, json.text);
}
}
});
}
}
}
}
});
});
});
});
function start_loading () {
if ($("div.preloader").length == 0)
$("body").append("" + $(".eweb_signature").attr("data-loading") + "... ");
$(".preloader").fadeIn(500);
setTimeout(function(){
$(".preloader").fadeOut(2000);
}, 2500);
}
function isScrolledIntoView(elem) {
scrollTop = $(window).scrollTop(),
scrollBottom = $(document).outerHeight() - $(window).outerHeight() - $(window).scrollTop(),
elementOffsetTop = elem.offset().top,
elementOffsetBottom = elem.offset().top - $(window).height() - $(elem).height() ,
distance_top = (elementOffsetTop - scrollTop);
distance_bottom = (elementOffsetBottom - scrollBottom);
return distance_top < $(window).outerHeight() && distance_bottom < $(window).outerHeight();
}
doc.on("click",".categories a.nav-link:not(.not_filter)", function() {
$(".categories a.nav-link").removeClass("active");
$(this).addClass("active");
$.ajax({
url: abs + "ajax/engine.php",
data: {
action: 'filter_news',
id: $(this).attr("data-id")
},
type: "post",
success: function(res) {
$(".row.show_here").html(res);
}
});
});
doc.on("change","#advice_subcategory",function () {
$.ajax({
url: abs + "ajax/engine.php",
data: {
action: 'filter_advices',
category: $(this).attr("data-category"),
subcategory: $(this).val()
},
type: "post",
success: function(res) {
$(".row.show_here").html(res);
}
});
});
doc.on("click",".categories a.product_cat_box", function() {
$.ajax({
url: abs + "ajax/engine.php",
data: {
action: 'filter_categories',
id: $(this).attr("data-id")
},
type: "post",
success: function(res) {
$(".row.show_here").html(res);
scroll_to(".row.show_here");
}
});
})
doc.on("click",".open_newsletter", function () {
show_popup();
});
doc.on("click, mouseover", ".has_undermenu", function() {
$(this).find(".undermenu").removeClass("um-h");
});
doc.on("mouseleave", ".has_undermenu", function() {
$(this).find(".undermenu").addClass("um-h");
});
doc.on("click, mouseover", ".has_undermenu2", function() {
$(this).find(".undermenu2").removeClass("um-h2");
});
doc.on("mouseleave", ".has_undermenu2", function() {
$(this).find(".undermenu2").addClass("um-h2");
});
function filter_tags() {
var filters = [];
var single = [];
$(".tag_box.active").each(function() {
filters.push($(this).attr("data-id"));
});
$("[data-tag]").each(function() {
this_item = $(this);
single = (this_item.attr("data-tag").trim() != '') ? JSON.parse(this_item.attr("data-tag")) : [];
var intersect = filters.filter(x => single.includes(x));
console.log('filters: ' + filters);
console.log('this: ' + single);
console.log('intersect: ' + intersect);
console.log('length: ' + intersect.length);
console.log(' ');
if (intersect.length > 0 || filters.length == 0)
this_item.removeClass("d-none");
else
this_item.addClass("d-none");
});
}
function filter_subs() {
var filters = [];
var single = [];
$(".sub_box.active").each(function() {
filters.push($(this).attr("data-id"));
});
$("[data-sub]").each(function() {
this_item = $(this);
single = (this_item.attr("data-sub").trim() != '') ? JSON.parse(this_item.attr("data-sub")) : [];
var intersect = filters.filter(x => single.includes(x));
console.log('filters: ' + filters);
console.log('this: ' + single);
console.log('intersect: ' + intersect);
console.log('length: ' + intersect.length);
console.log(' ');
if (intersect.length > 0 || filters.length == 0)
this_item.removeClass("d-none");
else
this_item.addClass("d-none");
});
}
doc.on("click" , ".sub_box:not(.active)" , function () {
$(this).addClass("active");
filter_subs();
});
doc.on("click" , ".sub_box.active" , function () {
$(this).removeClass("active");
filter_subs();
});
doc.on("click" , ".tag_box:not(.active)" , function () {
$(this).addClass("active");
filter_tags();
});
doc.on("click" , ".tag_box.active" , function () {
$(this).removeClass("active");
filter_tags();
});
doc.on("click" , ".show_hide_pw" , function () {
$(this).toggleClass("fa-eye-slash fa-eye");
if ($("[name='password'][type='text']").length)
$("[name='password'][type='text']").attr("type" , "password");
else
$("[name='password'][type='password']").attr("type" , "text");
});
doc.on("submit", "form.login_form", function(e) {
e.preventDefault();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.login_form [data-error]").each(function(){
if ($(this).attr("name").trim() == 'email') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error","Error",text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.login_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", "Error", json.text);
else {
start_loading ();
setTimeout(function() {
if (json.location == '')
location.href = 'https://www.rmix.it/accedi/';
else
location.href = json.location;
}, 1000);
}
}
});
}
}
}
}
});
});
});
});
doc.on("submit", "form.new_offer_form", function(e) {
e.preventDefault();
start_loading();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.new_offer_form [data-error]").each(function(){
if ($(this).attr("name").trim() == 'email') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if($("#privacy").prop("checked") === false)
errors.push($("#privacy").attr("data-error"));
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error","Error",text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.new_offer_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", "Error", json.text);
else {
start_loading ();
Swal.fire({
type: "success",
title: json.title,
html: json.text,
confirmButtonColor: main_color
}).then((result) => {
location.href = 'https://www.rmix.it/accedi/';
});
}
}
});
}
}
}
}
});
});
});
});
doc.on("submit", "form.edit_offer_form", function(e){
e.preventDefault();
start_loading();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.edit_offer_form [data-error]").each(function(){
if ($(this).attr("name").trim() == 'email') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error","Error",text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.edit_offer_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", "Error", json.text);
else {
start_loading ();
Swal.fire({
type: "success",
title: json.title,
html: json.text,
confirmButtonColor: main_color
}).then((result) => {
location.href = 'https://www.rmix.it/accedi/';
});
}
}
});
}
}
}
}
});
});
});
});
doc.on("submit","form.change_pw_form", function(e) {
e.preventDefault();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.change_pw_form [data-error]").each(function(){
if ($(this).attr("name").trim() == 'email') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error","Error",text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.change_pw_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", "Error", json.text);
else {
start_loading ();
setTimeout(function() {
location.reload();
}, 1000);
}
}
});
}
}
}
}
});
});
});
});
doc.on("submit", "form.lost_pw_form", function(e){
e.preventDefault();
grecaptcha.ready(function(){
grecaptcha.execute(g_key, {action: 'submit'}).then(function(token){
$.ajax({
url: abs + "ajax/engine.php",
type: "POST",
data: {
action: 'check_captcha',
response: token
},
success: function(captcha_res) {
captcha_result = JSON.parse(captcha_res);
if(captcha_result.success){
if(captcha_result.score >= 0.5){
var errors = [];
$("form.lost_pw_form [data-error]").each(function(){
if ($(this).attr("name").trim() == 'email') {
if (!validate_mail($(this).val()) || $(this).val().trim() == '')
errors.push($(this).attr('data-error'));
}
else if ($(this).val().trim() == '')
errors.push($(this).attr('data-error'));
});
if (errors != 0) {
var text = "";
for(i=0; i"+errors[i]+"";
text+="
";
generate_alert("error","Error",text);
}
else {
$.ajax({
url: abs + "ajax/engine.php",
data: $("form.lost_pw_form").serialize(),
type: "post",
success: function(res) {
var json = JSON.parse(res);
if (json.result == false)
generate_alert("error", "Error", json.text);
else {
start_loading ();
generate_alert("success", "Password", json.text);
setTimeout(function() {
location.href= abs + "accedi/";
}, 5000);
}
}
});
}
}
}
}
});
});
});
});
function filter_nats() {
var filters = [];
var single = [];
$(".nat_box.active").each(function() {
filters.push($(this).attr("data-id"));
});
$("[data-nat]").each(function() {
this_item = $(this);
single = (this_item.attr("data-nat").trim() != '') ? JSON.parse(this_item.attr("data-nat")) : [];
var intersect = filters.filter(x => single.includes(x));
console.log('filters: ' + filters);
console.log('this: ' + single);
console.log('intersect: ' + intersect);
console.log('length: ' + intersect.length);
console.log(' ');
if (intersect.length > 0 || filters.length == 0)
this_item.removeClass("d-none-nat");
else
this_item.addClass("d-none-nat");
});
}
doc.on("click" , ".nat_box:not(.active)" , function () {
$(this).addClass("active");
filter_nats();
});
doc.on("click" , ".nat_box.active" , function () {
$(this).removeClass("active");
filter_nats();
});
let allImages = document.querySelectorAll("img");
allImages.forEach((value) => {
if (!value.classList.contains("noeh")) {
value.oncontextmenu = (e) => {
e.preventDefault();
}
}
});