var isMobile = true;
$(document).ready(function(){
$('.hamburgerwrapper').on('click',function(e){
e.preventDefault();
$('#menu-main-menu').slideToggle();
})
$('#slidepp').unslider({
autoplay: true,
delay: 6000,
arrows: {
prev: '',
next: '',
}
});
$("ul.menu > li > a:first-child").on("click",function(e){
$("ul.menu > li > a").not(this).parent().removeClass("active");
$("ul.menu > li > a").not(this).parent().find("ul.sub-menu").fadeOut();
})
$("ul.menu > li.menu-item-has-children > a:first-child").on("click",function(e){
e.preventDefault();
if(!$(this).parent().hasClass("active")){
$(this).parent().addClass("active");
$(this).parent().find(".sub-menu").fadeIn();
}
else{
$(this).parent().removeClass("active");
$(this).parent().find(".sub-menu").fadeOut();
}
})
$('.deepsiblingselect').on('change',function(){
var target = $(this).find('option').filter(':selected').val();
location.href=target;
})
var heights = $(".recent_news_item").map(function() {
return $(this).height();
}).get(),
maxHeight = Math.max.apply(null, heights);
$(".recent_news_item").height(maxHeight);
$(document).on('click','#gosearch',function(e){
var search_for = $('#filter_region').val();
if(search_for=='%') $('.tablerow').show();
else{
$('.tablecontent .tablerow').each(function(){
if($(this).attr('rel')==search_for) {
if($(this).css('display')=='none') $(this).slideDown();
else $(this).show();
}
else {
if($(this).css('display')=='flex') $(this).slideUp();
else $(this).hide();
}
//if($(this).attr('rel')==search_for) $(this).show();
//else $(this).hide();
})
}
//jQuery('.tablerow:visible').filter(':even').css({'background-color': '#DEDEDE'});
//jQuery('.tablerow:visible').filter(':odd').css({'background-color': '#FFFFFF'});
})
})
$(window).load(function(){
})
$(window).resize(function(){
})