$(document).ready(function(){
var screen_h=$(window).height();
var screen_w=$(window).width();
var menu_h=$(".menu1").height()+$(".menu2").height()+$(".menu3").height()+$(".menu4").height()+$(".menu5").height()+$(".menu6").height();
$(".vert_header").css("height",screen_h);
$(".main_image").css("height",screen_h);
var padding_bottom=((screen_h-(menu_h+50))/6);
if(screen_w>767){
$(".sidenav ul li").css("padding-bottom",padding_bottom);
}
});
$(window).resize(function() {
var screen_h=$(window).height();
var screen_w=$(window).width();
var menu_h=$(".menu1").height()+$(".menu2").height()+$(".menu3").height()+$(".menu4").height()+$(".menu5").height()+$(".menu6").height();
$(".vert_header").css("height",screen_h);
$(".main_image").css("height",screen_h);
var padding_bottom=((screen_h-(menu_h+50))/6);
if(screen_w>767){
$(".sidenav ul li").css("padding-bottom",padding_bottom);
}
});
function openNav() {
screen_w=$(window).width();
if(screen_w>767){
document.getElementById("mySidenav").style.right = "35px";
document.getElementById("mySidenav").style.height = "auto";
}else{
document.getElementById("mySidenav").style.height = "85%";
document.getElementById("mySidenav").style.right = "0px";
}
document.getElementById("main_menu_icon").innerHTML='';
}
function closeNav() {
screen_w=$(window).width();
if(screen_w>767){
document.getElementById("mySidenav").style.right = "-275px";
document.getElementById("mySidenav").style.heigh = "auto";
}else{
document.getElementById("mySidenav").style.height = "0px";
document.getElementById("mySidenav").style.right = "0px";
}
document.getElementById("main_menu_icon").innerHTML='';
}
$(document).ready(function(){
var aChildren = $(".scroll_links li").children();
var aArray = [];
for (var i=0; i < aChildren.length; i++) {
var aChild = aChildren[i];
var ahref = $(aChild).attr('href');
aArray.push(ahref);
}
$(window).scroll(function(){
var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page
var windowHeight = $(window).height(); // get the height of the window
var docHeight = $(document).height();
for (var i=0; i < aArray.length; i++) {
var theID = aArray[i];
var divPos = $(theID).offset().top; // get the offset of the div from the top of page
var divHeight = $(theID).height(); // get the height of the div in question
if (windowPos+100 >= divPos && windowPos+100 < (divPos + divHeight)) {
$("a[href='" + theID + "']").addClass("scroll_active");
} else {
$("a[href='" + theID + "']").removeClass("scroll_active");
}
}
});
});
wow = new WOW({
animateClass: 'animated',
offset:100,
callback: function(box) {
console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
}
});
wow.init();