function sendRequest(n,t,i,r={method:"GET"}){var u=new XMLHttpRequest;u.open(r.method,n);r.jsonRequest&&u.setRequestHeader("Content-Type","application/json;charset=UTF-8");u.send(r.jsonRequest?JSON.stringify(t):t);u.onreadystatechange=function(){if(u.readyState==4&&u.status==200){if(console.log(u.status),r.jsonAnswer){if(json=JSON.parse(u.responseText),json){i(json);return}i({});return}i(u.responseText)}}}function parse_query_string(n){for(var o,f=n.split("&"),t={},r=0;r<f.length;r++){var e=f[r].split("="),i=decodeURIComponent(e[0]),u=decodeURIComponent(e[1]);typeof t[i]=="undefined"?t[i]=decodeURIComponent(u):typeof t[i]=="string"?(console.log(t[i]),o=[t[i],decodeURIComponent(u)],t[i]=o):(console.log("2",t[i]),t[i].push(decodeURIComponent(u)))}return t}
$(document).ready(function(){$(".nav-btn").click(function(){$(this).toggleClass("opened");$(".header-nav ul").toggleClass("opened")});const n=()=>{const n=document.querySelector("meta[name=viewport]");if(n!==null){let t=n.getAttribute("content"),i=/maximum\-scale=[0-9\.]+/g;t=i.test(t)?t.replace(i,"maximum-scale=1.0"):[t,"maximum-scale=1.0"].join(", ");n.setAttribute("content",t)}},t=n,i=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;i()&&t();$(".second-nav-title").click(function(){$(this).next().slideToggle();$(this).toggleClass("rotate")});$(".layout-buttons button").click(function(){$(".layout-buttons button").removeClass("active");$(this).addClass("active")});$("#cardGrid-1").click(function(){$(".card-home-list").removeClass("two-cols");$(".news-filter-section").removeClass("active");$(".mobile-filter-label-close").hide();$(".mobile-filter-label-open").show();$("body").css({overflow:"visible"});$("html").css({overflow:"visible"})});$("#cardGrid-2").click(function(){$(".card-home-list").addClass("two-cols");$(".news-filter-section").removeClass("active");$(".mobile-filter-label-close").hide();$(".mobile-filter-label-open").show();$("body").css({overflow:"visible"});$("html").css({overflow:"visible"})});$(".date-field-label").click(function(){$(this).siblings().toggle();$(this).toggleClass("clicked");$("#date-1").focus()});$(".mobile-filter-label-open").click(function(){$(this).hide();$(this).siblings().show();$(".news-filter-section").addClass("active");$("body").css({overflow:"hidden"});$("html").css({overflow:"hidden"});$(".date-field-label").siblings().show()});$(".mobile-filter-label-close").click(function(){$(this).hide();$(this).siblings().show();$(".news-filter-section").removeClass("active");$("body").css({overflow:"visible"});$("html").css({overflow:"visible"});$(".date-field-label").siblings().hide()});$("#search-from button").click(function(){$(".mobile-filter-label-close").hide();$(".mobile-filter-label-open").show();$(".news-filter-section").removeClass("active");$("body").css({overflow:"visible"});$("html").css({overflow:"visible"});$(".date-field-label").siblings().hide()});$(".site-search button").click(function(){$(".site-search input").toggleClass("active");$(".site-search input").focus()});$(".site-search input").keydown(function(){$(".site-search input").val().length>=0?$(".site-search button").attr("type","submit"):$(".site-search input").val().length==0&&$(".site-search button").attr("type","button")})});
