//Use Strict Mode (function($) { "use strict"; //Begin - Document Ready $(document).ready(function(){ $('.min-header').click(function(){ $('#menu').slideToggle(200); }); //min header $(window).scroll(function() { if ($(this).scrollTop() > 1){ $('header').addClass("mini"); } else{ $('header').removeClass("mini"); } }); //BAIXO $('#menu li a, .baixa').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top-80 }, 1500, 'easeInOutExpo'); event.preventDefault(); }); if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { $('#menu li a').bind('click', function(event) { $('#menu').slideToggle(); var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top-80 }, 1500, 'easeInOutExpo'); event.preventDefault(); }); } jQuery ( document ).ready ( function($) { var hash= window.location.hash if ( hash == '' || hash == '#' || hash == undefined ) return false; var target = $(hash); target = target.length ? target : $('[name=' + hash.slice(1) +']'); if (target.length) { $('html,body').stop().animate({ scrollTop: target.offset().top - 70 //offsets for fixed header }, 1500, 'linear'); } } ); var height = $(window).height(); $('.top').height(height-100); $(window).resize(function(){ var height = $(window).height(); $('.top').height(height-100); }); //==============_FANCYBOX_================ $(".fancybox").fancybox({ helpers : { title : { type : 'over' } } }); $('.gallery-logos').owlCarousel({ items:5, loop:true, nav: false, dots: true, autoplay: true, margin: 30, responsive:{ 200:{ items:1 }, 480:{ items:2 }, 600:{ items:5 } } }); $('.new-home__gallery-logos').owlCarousel({ items:4, loop:true, nav: false, dots: true, autoplay: true, margin: 30, responsive:{ 200:{ items:1 }, 480:{ items:2 }, 600:{ items:4 } } }); $('.gallery-cases').owlCarousel({ items:2, loop:true, nav: false, dots: true, autoplay: true, margin: 30, responsive:{ 200:{ items:1 }, 480:{ items:2 } } }); $('.slider-about').owlCarousel({ items:1, loop:false, nav: false, dots: false, autoplay: false, URLhashListener:true, startPosition: 'URLHash', mouseDrag: false, touchDrag: false, pullDrag: false, freeDrag: false }); // Setting anchors with class active for /pas $('.menu-items a').click(function() { $('.menu-items a').removeClass('active'); $(this).addClass('active'); }); jQuery('.panel').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInUp', offset: 50, repeat: false, }); jQuery('.service .icon').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInUp', offset: 50, repeat: false, }); jQuery('.human-image').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInUp', offset: 50, repeat: false, }); jQuery('.case_study').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInRight', offset: 50, repeat: false, }); jQuery('.fadeup').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInUp', offset: 50, repeat: false, }); jQuery('.fadeleft').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInLeft', offset: 50, repeat: false, }); jQuery('.faderight').addClass("hidden").viewportChecker({ classToAdd: 'visible animated fadeInRight', offset: 50, repeat: false, }); //End - Document Ready }); function callback() { var hash = $('.owl-item.active > div').attr('data-hash'); // console.log("Dragged to: " + hash); $(".menu-items > a").removeClass('active'); $("#" + hash).addClass('active'); window.location.hash = hash; } //End - Use Strict mode })(jQuery);