$(function(){$("ul.dropdown-menu [data-toggle=dropdown]").on("click",function(n){n.preventDefault();n.stopPropagation();$("ul.dropdown-menu [data-toggle=dropdown]").parent().removeClass("open");$(this).parent().addClass("open")})});
var FilterList={timeoutFunction:null,skipHashChange:!1,filterUrl:null,resultParentSelector:null,initialOptionsToDisplay:5,maxHeight:700,xsWidth:768,moreButton:$("#filterMoreButTemplate").html(),navigationSessionDataName:null,listener:null,afterInit:null,init:function(n,t,i,r){FilterList.resultParentSelector=t;var u=$(".filter-list"),e=u.find(".jq-filter-open-button"),o=u.find(".filter-option-container");FilterList.filterUrl=n||u.data("url");FilterList.listener=u.data("listener");let s=FilterList.filterUrl||FilterList.listener||"";FilterList.navigationSessionDataName="navigationData-"+SparkMD5.hash(s);typeof i=="undefined"&&(i=u.data("preopen")||0);i>0&&FilterList.OpenFilterGroup(u.find(".filter-group:lt("+i+")"));FilterList.OpenFilterGroup(u.find(".filter-group").parent(".filter-search"));u.height()>FilterList.maxHeight&&u.find(".filter-group").each(function(){FilterList.CondenseFilterGroup($(this),FilterList.initialOptionsToDisplay)});$(window).width()>=FilterList.xsWidth&&e.attr("aria-expanded","true");$(window).on("resize",function(){$(window).width()>=FilterList.xsWidth?e.attr("aria-expanded","true"):o.hasClass("hidden-xs")&&e.attr("aria-expanded","false")});u.on("click",".filter-option-container button",function(n){n.preventDefault();var t=$(this).closest(".filter-group"),i=t.parent().hasClass("filter-search");return i||(t.hasClass("open")?FilterList.CloseFilterGroup(t,!0):FilterList.OpenFilterGroup(t,!0)),!1}).on("click",".filter-active-list button",function(n){n.preventDefault();var t=$(this),i=t.parents(".filter-list").find(".filter-option-container");return i.hasClass("hidden-xs")?(t.attr("aria-expanded","true"),i.removeClass("hidden-xs"),t.find(".filter-down").hide(),t.find(".filter-up, .filter-selections").show()):(t.attr("aria-expanded","false"),i.addClass("hidden-xs"),t.find(".filter-up").hide(),t.find(".filter-down").show()),!1}).on("keyup","input.jq-freetext",function(){var n=$(this);FilterList.UpdateFreeText(n)}).on("change","input:checkbox",function(){var n=$(this);n.hasClass("jq-radio")&&n.is(":checked")&&n.closest(".jq-type-RadioButtonList").find(".jq-radio[name='"+n.prop("name")+"']:checked").not(n).prop("checked",!1).trigger("change");FilterList.AddOrRemoveFilterButton(n,n.is(":checked"),n.closest("label").text(),!1);FilterList.SetHeaderTextToValues(n);FilterList.SetTimeoutFunction(n)}).on("click",".filter-remove",function(n){n.preventDefault();n.stopPropagation();var t=$(this).closest(".filter-group"),i=t.find(".checked input:checkbox");i.each(function(){$(".filter-selections .filter-option-"+this.id,u).trigger("click")});t.find("input.jq-freetext").each(function(){let n=$(this);n.val("");FilterList.UpdateFreeText(n)})});$(".filter-selections",u).on("click",".btn",function(n){n.preventDefault();var t=$(this),r=$("#"+t.data("filter-option")),i=t.data("onremove");return typeof i=="function"?i():r.trigger("click"),t.fadeOut().remove(),!1});$("body").on("click",".jq-filter-more",function(n){n.preventDefault();FilterList.ExpandFilterGroup($(this).parents(".filter-group"))});jHash.change(function(){FilterList.HashChange(u)});let f=sessionStorage.getItem(FilterList.navigationSessionDataName);typeof f!="undefined"&&f!=null&&f!==""&&f!==window.location.hash&&(window.location.hash=f);window.location.hash.length>0&&(FilterList.HashChange(u,!0),FilterList.listener!=null&&executeFunctionByName(FilterList.listener,window,FilterList.GetDataString(u)));FilterList.SetHeaderTextToValues(null);FilterList.afterInit!=null&&FilterList.afterInit(u);r!=null&&r(u)},UpdateFreeText:function(n){FilterList.SetTimeoutFunction(n,function(){let t=n.val();FilterList.AddOrRemoveFilterButton(n,t.length>0,'"'+t.replace(/\s+/g,'" + "')+'"',!1,function(){n.val("");FilterList.AddOrRemoveFilterButton(n,!1,"",!1);FilterList.SetTimeoutFunction(n)})})},SetHeaderTextToValues:function(n){var t=n==null?$(".filter-group"):n.closest(".filter-group");t.each(function(){var i=$(this),n=$(".jq-filtercategoryheading:first",i),t;n.hasClass("jq-displayselections")?(t=$(".checked",i).map(function(){return $(".jq-displaytext",$(this)).text()}).get().join(", "),t.length==0?FilterList.ResetHeadingText(n):n.html(t)):FilterList.ResetHeadingText(n)})},CondenseFilterGroup:function(n,t){var i=n.find(".checkbox");i.length>t+2&&(n.find(".checkbox").slice(t).addClass("hidden-filter"),n.find(".filter-option-list").append(FilterList.moreButton))},ResetHeadingText:function(n){n.each(function(){var n=$(this);n.html(n.data("text"))})},ExpandFilterGroup:function(n){n.find(".checkbox").removeClass("hidden-filter");n.find(".jq-filter-more").remove()},OpenFilterGroup:function(n,t){n.find("button").attr("aria-expanded","true");var i=n.addClass("open").find(".filter-option-list");t?i.slideDown(400,"easeOutCirc"):i.show()},CloseFilterGroup:function(n,t){n.find("button").attr("aria-expanded","false");var i=n.removeClass("open").find(".filter-option-list");t?i.slideUp(400,"easeOutCirc"):i.hide()},AreAnyFiltersActive:function(n){let t=$(".filter-selections",n);return t.children().length>0},SubmitFilterRequest:function(n,t,i){var r,f,e,o;typeof i=="undefined"&&(i=!1);r=FilterList.GetDataString(n);let u=!FilterList.AreAnyFiltersActive(n);u&&i||(f=!1,FilterList.listener!=null&&FilterList.listener.length>0&&(e=Object.assign({},r),o=executeFunctionByName(FilterList.listener,window,e),o&&(f=!0)),f||FilterList.ProcessFilter(r,FilterList.filterUrl,n.data("selector")));t&&(u&&(r=null),FilterList.SetHash(r),u?sessionStorage.removeItem(FilterList.navigationSessionDataName):sessionStorage.setItem(FilterList.navigationSessionDataName,window.location.hash))},SetTimeoutFunction:function(n,t){FilterList.timeoutFunction!==null&&clearTimeout(FilterList.timeoutFunction);FilterList.timeoutFunction=setTimeout(function(){t!=null&&t();FilterList.SubmitFilterRequest(n.closest(".filter-list"),!0)},750)},AddOrRemoveFilterButton:function(n,t,i,r,u){var l=n.closest(".filter-list"),f=n.closest(".filter-group"),e=l.find(".filter-selections"),a=l.find(".filter-selection-template").html(),s=n.prop("id"),o=e.find(".btn.filter-option-"+s),h,c;t?(o.length===0?(f.addClass("filterActive").data("filterCount",(f.data("filterCount")||0)+1),$(a).appendTo(e).addClass("filter-option-"+s).data("filter-option",s).data("onremove",u).find(".btn-text").text(i.trim()+" "),e.show()):o.find(".btn-text").text(i),n.parents(".checkbox").addClass("checked")):(o.length>0&&(h=f.data("filterCount")-1,f.data("filterCount",h),h<1&&f.removeClass("filterActive"),c=function(){o.remove();$(".btn",e).length===0&&e.hide()},r?c():o.fadeOut(c)),n.parents(".checkbox").removeClass("checked"))},SetHash:function(n){FilterList.skipHashChange=!0;n!==null&&typeof n.search!="undefined"&&(n.search=encodeURIComponent(n.search));n===null||n===""?FilterList.ResetHash():jHash.val(n);typeof catIndex!="undefined"&&catIndex!==null&&catIndex.removeCatPage()},ResetHash:function(){let n=window.location.toString(),t=n.indexOf("#");if(t>0){let i=n.substring(0,t);window.history.replaceState({},document.title,i)}},HashChange:function(n,t){if(!FilterList.skipHashChange){var i=jHash.val();typeof i.search!="undefined"&&(i.search=decodeURIComponent(i.search));Object.keys(i).forEach(function(t){var u=i[t],f=$(".filter-"+t+":first",n),o,r,e;f.length>0&&(f.find(".jq-type-CheckBoxList:first").length>0?(o=u.split(","),$("input:checkbox[name='"+t+"']",n).each(function(){var n=$(this),t=$.inArray(n.val(),o)>-1;n.prop("checked",t);FilterList.AddOrRemoveFilterButton(n,t,n.closest("label").text(),!1)})):f.find(".jq-type-FreeText:first").length>0?(r=$("input[name='"+t+"']:first",n),r.val(u),FilterList.AddOrRemoveFilterButton(r,u.length>0,'"'+u.replace(/\s+/g,'" + "')+'"',!0,function(){r.val("");FilterList.AddOrRemoveFilterButton(r,!1,"",!0);FilterList.SetTimeoutFunction(r)})):f.find(".jq-type-RadioButtonList:first").length>0&&(e=$("input[value='"+u+"']",n),e.prop("checked",!0),FilterList.AddOrRemoveFilterButton(e,!0,e.closest("label").text(),!1)))});$(".filter-selections .btn",n).each(function(){var e=$(this),u=e.data("filter-option"),i=u.replace(/^key-/i,"").split("-"),f=jHash.val(i[0]),t,r,n;if(typeof f!="undefined")if(t=f.split(","),i[0]==="search"){if(r=$("#key-search").val(),t.indexOf(r)>-1||t.indexOf(encodeURI(r))>-1)return}else if(t.indexOf(i[1])>-1)return;n=$("#"+u);n.is(":checkbox,:radio")?n.prop("checked",!1):n.val("");FilterList.AddOrRemoveFilterButton(n,!1,"",!0)});FilterList.SubmitFilterRequest(n,!1,t)}FilterList.skipHashChange=!1},GetDataString:function(n){var t={};return n.find(".filter-option-list").each(function(){var n=$(this),i,u,r,f;n.hasClass("jq-type-CheckBoxList")?$("input",n).each(function(){var i=$(this),n=i.prop("name");typeof t[n]=="undefined"&&(t[n]="");i.is(":checked")&&(t[n]===""?t[n]=i.val():t[n]+=","+i.val());$("input.jq-filterlistener.jq-"+n).val(t[n])}):n.hasClass("jq-type-FreeText")?(i=n.find("input:first"),i.val()!==""&&(u=i.prop("name"),t[u]=i.val(),$("input.jq-filterlistener.jq-"+u).val(i.val()))):n.hasClass("jq-type-RadioButtonList")&&(r=n.find("input:checked:first"),r.length>0&&(f=r.prop("name"),t[f]=r.val(),$("input.jq-filterlistener.jq-"+f).val(r.val())))}),t},currentResponse:null,ProcessFilter:function(n,t,i){var r,u,f;typeof i!="undefined"&&typeof t!="undefined"&&i!==null&&t!==""&&typeof n!="undefined"&&n!==null&&(r=$(i),r.length!==0)&&(u=$(".jq-filterLoading:first").clone().addClass("clone").removeClass("jq-filterLoading").css("display","block"),r.prepend(u),f=FilterList.currentResponse=generateUUID(),$.ajax({url:t,data:n,success:function(n){if(f===FilterList.currentResponse&&n!==r.html()){var t=$(".jq-ajaxplaceholder",r).clone();r.html(n).contentReveal().append(t)}},complete:function(){f===FilterList.currentResponse&&u.remove();MAIN.refreshContent($("body"))}}))}};
$(function(){$(".MenuActiveHome .menu-Home").addClass("active");$(".MenuActiveNews .menu-News").addClass("active");$(".MenuActiveCat .menu-Cat").addClass("active");$(".MenuActiveItems .menu-Items").addClass("active");$(".MenuActiveTeam .menu-Team").addClass("active");$(".MenuActiveFiles .menu-Files").addClass("active")});
var country={init:function(){},set:function(n){$("#currentflag").removeClass().addClass("flag flag-"+n);$("#countryselect ul").fadeOut("fast")}};
var Carousel={getCarousel:function(n){return $(n).find(".carousel")},getSlides:function(n){return $(n).find(".carousel-slide")},getCurrentSlide:function(n){return $(n).find(".current-left, .current-right")},carouselTimer:null,setTimer:function(){Carousel.carouselTimer=setTimeout(function(){Carousel.next($("body"))},7e3)},clearTimer:function(){clearTimeout(Carousel.carouselTimer)},init:function(n){var t=Carousel.getCarousel(n),i=Carousel.getSlides(t);$(i[0]).removeClass("inactive").addClass("current-left");t.on("click",".carousel-nav-right",function(t){return t.preventDefault(),Carousel.next(n),!1}).on("click",".carousel-nav-left",function(t){return t.preventDefault(),Carousel.prev(n),!1}).on({mouseenter:function(){Carousel.clearTimer()},mouseleave:function(){Carousel.setTimer()}});Carousel.setTimer()},display:function(n,t,i){var u=Carousel.getCarousel(n),r=Carousel.getSlides(u);t<0||($(r).filter(".current-left, .current-right").removeClass("current-left current-right").addClass("going"),$(r).filter(".previous-left, .previous-right").removeClass("previous-left previous-right").addClass("inactive"),$(r).filter(".going").removeClass("going").addClass("previous-"+i),$(r[t]).removeClass("inactive").addClass("current-"+i),Carousel.clearTimer(),Carousel.setTimer())},prev:function(n){var t=Carousel.getCarousel(n),i=Carousel.getSlides(t),u=Carousel.getCurrentSlide(t),r=i.index(u)-1;r>=0?Carousel.display(n,r,"right"):Carousel.display(n,i.length-1,"right")},next:function(n){var t=Carousel.getCarousel(n),i=Carousel.getSlides(t),u=Carousel.getCurrentSlide(t),r=i.index(u)+1;r<i.length?Carousel.display(n,r,"left"):Carousel.display(n,0,"left")}};$(function(){Carousel.init($("body"))});