(function(m){m(document).ready(function(){if(geot&&(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))){geot.dropdown_search=true}var q={onChange:function(t){if(!t.length){return}l("geot_country",t,999);if(geot.dropdown_redirect&&geot.dropdown_redirect.length){window.location.replace(geot.dropdown_redirect)}else{window.location.reload()}}};if(m(".geot_dropdown").data("flags")){q.render={option:function(u,t){return'<div class="option"><span class="geot-flag flag-'+t(u.value.toLowerCase())+'"></span><span class="url">'+t(u.text)+"</span></div>"},item:function(u,t){return'<div class="item"><span class="geot-flag flag-'+t(u.value.toLowerCase())+'"></span>'+t(u.text)+"</div>"}}}if(m(".geot_dropdown").length){var s=m(".geot_dropdown").selectize(q);if(g("geot_country")){var r=s[0].selectize;r.addItem(g("geot_country"),true)}}});function l(s,t,u){if(u){var r=new Date();r.setTime(r.getTime()+(u*24*60*60*1000));var q="; expires="+r.toGMTString()}else{var q=""}document.cookie=s+"="+t+q+"; path=/"}function g(r){var t=r+"=";var q=document.cookie.split(";");for(var s=0;s<q.length;s++){var u=q[s];while(u.charAt(0)==" "){u=u.substring(1,u.length)}if(u.indexOf(t)==0){return u.substring(t.length,u.length)}}return null}var c=function(u,q,s,r){var t={url:geot.ajax_url,data:u,cache:false,type:"POST",dataType:"json",timeout:30000},r=r||false,q=q||false,s=s||false;if(q){t.success=q}if(s){t.error=s}if(r){t.dataType=r}m.ajax(t)};const d=new URLSearchParams(window.location.search);const b=d.get("geot_debug"),j=d.get("geot_debug_iso"),a=d.get("geot_state"),i=d.get("geot_state_code"),h=d.get("geot_city"),n=d.get("geot_zip");var k={action:"geot_ajax",geots:{},vars:geot,pid:geot.pid,referrer:document.referrer,url:window.location.href,query_string:document.location.search,is_category:geot.is_category,is_archive:geot.is_archive,is_front_page:geot.is_front_page,is_search:geot.is_search,geot_debug:b,geot_debug_iso:j,geot_state:a,geot_state_code:i,geot_city:h,geot_zip:n,},p=null,f=function(q){if(!p){p=(new Date()).getTime()}return q+(p++)};m(".geot-ajax").each(function(){var r=m(this);if(r.hasClass("geot_menu_item")){r=m(this).find("a").first()}var q=f("geot");r.attr("id",q);k.geots[q]={action:r.data("action")||"",filter:r.data("filter")||"",region:r.data("region")||"",ex_filter:r.data("ex_filter")||"",ex_region:r.data("ex_region")||"","default":r.data("default")||"",locale:r.data("locale")||"en",}});if(m(".geotr-ajax").length){k.geot_redirects=1}if(m(".geobl-ajax").length){k.geot_blockers=1}var o=function(s){if(s.success){var t=s.data,u,y=s.redirect,z=s.blocker,v=s.posts.remove,x=s.posts.hide,q=s.debug;if(y&&y.url){m(".geotr-ajax").show();setTimeout(function(){location.replace(y.url)},2000)}if(z&&z.length){m("html").html(z)}console.log(s);if(t&&t.length){for(u=0;u<t.length;++u){if(t[u].action=="menu_filter"){if(t[u].value==true){m("#"+t[u].id).parent(".menu-item").remove()}}else{if(t[u].action.indexOf("filter")>-1){if(t[u].value==true){var w=m("#"+t[u].id).html();m("#"+t[u].id).replaceWith(w)}m("#"+t[u].id).remove()}else{m("#"+t[u].id).replaceWith(t[u].value)}}}}if(v&&v.length){for(u=0;u<v.length;++u){var r=v[u];m("#post-"+r+", .post-"+r).remove()}}if(x&&x.length){for(u=0;u<x.length;++u){var r=x[u].id;m("#post-"+r+" .entry-content, .post-"+r+" .entry-content").html("<p>"+x[u].msg+"</p>")}}if(q&&q.length){m("#geot-debug-info").html(q);m(".geot-debug-data").html(q.replace(/<!--|-->/gi,""))}}};var e=function(r,q,s){console.log("Geot Ajax error: "+q+" - "+s)};if(geot&&geot.ajax){c(k,o,e)}})(jQuery);