// Fix 4 IEz if (navigator.appName.indexOf('Microsoft') >= 0) { (function(f) { window.setTimeout = f(window.setTimeout); // overwrites the global function! window.setInterval = f(window.setInterval); // overwrites the global function! })(function(f) { return function(c, t) { var a = [].slice.call(arguments, 2); // gathers the extra args return f(function() { c.apply(this, a); // passes them to your function }, t); }; }); } $(window).load(function () { cycleInit(); animation(); }); function animation() { var speed1 = 700; $('.nav').find('table').animate({marginLeft: 0}, speed1, function () { $('.nav__list').find('li').each(function (i) { var $this = $(this); setTimeout(function () { $this.animate({ marginLeft: 0 }, 600) }, i * 90) }) $('.slogan').animate({left: 0}, speed1); $('.txtArea__animateItem').each(function (i) { var $this = $(this); setTimeout(function () { $this.animate({ right: 0 }, 800) }, i * 150) }) $('.contacts__in').find('li').each(function (i) { var $this = $(this); setTimeout(function () { $this.animate({ opacity: 1 }, 1200) }, i * 350) }) }); $('.txtArea__ava').animate({opacity: 1}, 900); $('.listing1__item').each(function (i) { var $this = $(this); setTimeout(function () { $this.animate({ opacity: 1 }, 900) }, i * 250) }) $('.listing2__item').each(function (i) { var $this = $(this); setTimeout(function () { $this.animate({ opacity: 1 }, 900) }, i * 250) }) } function cycleInit() { if ($('.slider__in').length) { var time = 12000; $('.slider__in').on('cycle-initialized', function (event, opts) { $('.slider__nav').css({marginTop: -$('.slider__nav').height() / 2}); }); $('.slider__in').cycle({ speed: 3000, manualSpeed: 600, timeout: time, slides: '> .slider__slide', log: false, pager: '.slider__nav', autoHeight: 'calc' }); } } $(document).ready(function(){ $(window).resize(function() { checkResize(); }); window.onorientationchange = function() { checkResize(); }; checkResize(); //mobile menu buttom $(".mobile-menu-button").click(function(e){ e.preventDefault(); e.stopPropagation(); var el = $(this); if(el.hasClass("disabled")) return; el.addClass("disabled"); var toggleRight = $(".centerCol").css("right") == "0px" ? "-310px" : "0px"; var toggleOpacity = $(".centerCol").css("opacity") == 1 ? 0.5 : 1; $(".centerCol").animate({right: toggleRight, opacity: toggleOpacity}); $(".nav__list").animate({width:"toggle"}, function(){ el.toggleClass("active"); el.removeClass("disabled"); if (!el.hasClass("active")) { $(this).removeAttr("style"); } }); }); //& close $("body").click(function (e) { if (!$(e.target).closest('.nav__list').length) { if($(".mobile-menu-button").hasClass("active")) $(".mobile-menu-button").trigger("click"); } }); }); function checkResize() { var browserMaxWidth = parseInt($('head').css('max-width'), 10); if (browserMaxWidth > 999) { if($(".mobile-menu-button").hasClass("active")) $(".mobile-menu-button").trigger("click"); } }