var $root = $('html, body');
function homeScript(){
//var divWidth = $('.square').width();
$(window).on('load resize', function(){
$(document).ready(function(){
var elements = document.getElementsByClassName('tall');
var elementHeights = Array.prototype.map.call(elements, (el) => {
return el.clientHeight;
});
var maxHeight = Math.max(...elementHeights)
Array.prototype.forEach.call(elements, (el) => el.style.height = `${maxHeight}px`);
var divWidth = $('.square').width();
$('.square').height(divWidth);
});
});
}
$(document).ready(function(){
$("a.action").click(function(){
$root.animate({
scrollTop: 0
//$('.two-third').offset().top
}, 1000);
});
$("a.filterbutton").click(function(){
$(this).parent().children().children("div").removeClass('knopActive');
$(this).children("div").addClass('knopActive');
});
});
var title = $('title').html();
title = title.substr(0, title.indexOf(" "));
if(title != "Home") {
if($(window).width() < 547) {
$root.animate({
//scrollTop: $('.banner').offset().top
scrollTop: $('.two-third').offset().top
}, 1000);
window.setTimeout( 'scroll', 250 );
}
}
(function($){
var jump=function(e){
if (e){
e.preventDefault();
var target = $(this).attr("href");
}else{
var target = location.hash;
}
$('html,body').animate({
scrollTop: $(target).offset().top
},1000,function(){
location.hash = target;
});
}
$('html, body').hide()
$(document).ready(function(){
$('a[href^="#"]').bind("click", jump);
if (location.hash){
setTimeout(function(){
$('html, body').scrollTop(0).show()
jump()
}, 0);
}else{
$('html, body').show()
}
});
})(jQuery)