$(document).ready( function () { $('.loadfade').addClass('hidden'); var hr = (new Date()).getHours(); if ( hr>= 9 && hr<= 16 ) { $('._Template').addClass('daymode'); } var height = 0; $('.serviceslist a').each(function() { if ($(this).outerHeight()>height ) { height = $(this).outerHeight(); $('.services a').css('height', height); } } ); $(".hamburger").click(function() { $('.subnav .expand').each(function() { console.log($(this).height()); $(this).parent().css("max-height", $(this).height()); } ); $(".menu").each($).wait(75, function(index) { $(".menu").toggleClass('menuopen'); $( ".menu .blind:first-child ul li").each($).wait(50, function(index) { $(this).toggleClass('blindsareopen'); } ); $( ".menu .blind:last-child>ul").each($).wait(50, function(index) { $(this).toggleClass('blindsareopen'); } ); $( ".menu p").each($).wait(50, function(index) { $(this).toggleClass('blindsareopen'); } ); setTimeout( function() { $(".menu").toggleClass('z-index'); }, 300); } ); $(this).toggleClass("closehamburger"); } ); $(".expand").click(function() { $(this).parent().toggleClass('expanded'); } ); function closeblinds(){ $('.menu').toggleClass('menuopen'); $('.hamburger').toggleClass('closehamburger'); $(".menu p").toggleClass('blindsareopen'); $(".menu .blind:last-child>ul").toggleClass('blindsareopen'); $(".menu .blind:first-child ul li").toggleClass('blindsareopen'); setTimeout( function() { $(".menu").toggleClass('z-index'); }, 300); } $(".menu .container .blind:first-child a").click(function() { closeblinds(); } ); $('.menu').click(function(event){ if($(event.target).hasClass('blind') || $(event.target).is('li, a, ul, p')) { if ($(this).text().trim() == "") { closeblinds(); } } else { closeblinds(); } }); var typed = new Typed('#typed-strings', { strings: ["", "Creative.", "Efficient.","Responsive.", "Talented.", "Innovative.", ""], typeSpeed: 25, onComplete: function() { $("#typed-strings").addClass('hidden'); $(".weare").addClass('expert'); } } ); $('h1[id], h2[id]').each(function() { $id= ("#"+ $(this).attr('id')); $('#sidedots ul').append( "
  • "); } ); $('h1[id], h2[id]').each(function() { $offset =$(this).offset().top; if ( $(window).scrollTop() + 100>=$offset) { $id = $(this).attr('id'); $('#sidedots a').each(function() { if ( $(this).attr('href') == '#'+$id) { $('#sidedots a').parent().removeClass('scrolledto'); $(this).parent().addClass('scrolledto'); } } ); } } ); $(window).scroll(function() { $('h1[id], h2[id]').each(function() { $offset =$(this).offset().top; if ( $(window).scrollTop() + 100>=$offset) { $id = $(this).attr('id'); $('#sidedots a').each(function() { if ( $(this).attr('href') == '#'+$id) { $('#sidedots a').parent().removeClass('scrolledto'); $(this).parent().addClass('scrolledto'); } } ); } } ); } ); } );