(function($) { "use strict"; jQuery(document).ready(function($) { $('[data-toggle="tooltip"]').tooltip(); //-----------------header sticky-----------------// $(".collapse-button").on('click', function() { $(".search-box").slideToggle("slow"); }); $(window).scroll(function() { var navHeight = $(window).height() - 600; if ($(window).scrollTop() > navHeight) { $('#header-stikcy').addClass('on'); } else { $('#header-stikcy').removeClass('on'); } }); $('body').scrollspy({ target: '#header-stikcy', offset: 100 }); $("p").addClass("myClass yourClass"); //-----------------mobile menu-----------------// $('#navigation').slimmenu({ resizeWidth: '900', collapserTitle: 'Main Menu', animSpeed: 'medium', easingEffect: null, indentChildren: false, childrenIndenter: ' ' }); // Closes the Responsive Menu on Menu Item Click $(".slimmenu li a").on('click',function(){ $(".collapsed").css("display", "none"); }); //---------------------- search section ----------------------// $("#search-hidden").on('click', function() { $("#search-open").slideToggle("slow"); }); $('#slider').nivoSlider({ pauseTime: 8000, }); /* portfolio-gred */ $(window).on('load', function(){ var $grid = $('.portfolio-list').isotope({ itemSelector: '.portfolio-item', percentPosition: true, masonry: { columnWidth: 0, } }); // filter items on button click $('.portfolio-menu').on( 'click', 'li', function() { var filterValue = $(this).attr('data-filter'); $grid.isotope({ filter: filterValue }); }); }) $('.portfolio-menu li').on('click', function(event) { $(this).siblings('.active').removeClass('active'); $(this).addClass('active'); event.preventDefault(); }); //---------------------- portfolio light box ----------------------// $('.lightbox').littleLightBox(); //------------- wow js ---------------// new WOW().init(); //------------- wow js ---------------// //------------- Team section ---------------// var owl = $('#ourteam-carousel'); owl.owlCarousel({ loop: true, nav: false, margin:30, lazyLoad: true, autoplayHoverPause: true, responsive: { 0: { items: 1 }, 480: { items: 2 }, 732: { items: 3 }, 992: { items: 3 }, 1200: { items: 4 }, 1440: { items: 4 } } }) //------------- twitter section ---------------// var owl = $('.twite-carousel'); owl.owlCarousel({ loop: false, nav: false, dots: false, margin: 30, autoplayHoverPause: true, lazyLoad: true, autoplay: true, autoplaySpeed: 600, responsive: { 0: { items: 1 }, 600: { items: 1 }, 960: { items: 1 }, 1200: { items: 1 } } }) //------------- client section ---------------// var owl = $('.client-carousel'); owl.owlCarousel({ loop: false, nav: false, dots: true, margin: 30, autoplayHoverPause: true, lazyLoad: true, autoplay: true, autoplaySpeed: 600, responsive: { 0: { items: 1 }, 480: { items: 3 }, 768: { items: 5 }, 992: { items: 6 }, 1200: { items: 6 }, 1440: { items: 6 } } }) //scroll to menu item $('a[href*="#"]:not([href="#"])').bind('click', function() { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top - 155 }, 1000); return false; } }); //scroll to top $(window).on('scroll', function() { if ($(this).scrollTop() > 200) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); $('#back-top').on('click', function() { $("html, body").animate({ scrollTop: 0 }, 1000); return false; }); $( ".widget ul" ).parent( ".cat-item" ).addClass("page_item_has_children"); $(".widget > ul").addClass("menupage"); /** widget page accordion **/ $("ul.menupage li.page_item_has_children").each(function(){ $(this).append(' '); }); $('ul.menupage').accordion(); $("ul.menupage li.active").each(function(){ $(this).children().next("ul").css('display', 'block'); }); /** widget menu accordion **/ $("ul.menu li.menu-item-has-children").each(function(){ $(this).append(' '); }); $('ul.menu').accordion(); $("ul.menu li.active").each(function(){ $(this).children().next("ul").css('display', 'block'); }); /*========== Map ==========*/ var $googleMap = $('.maps'); if ($googleMap.length > 0) { $googleMap.each(function() { var mapHeight = $(this).data('height'), address = $(this).data('address'), zoom = $(this).data('zoom'), controls = $(this).data('disable-controls'), scrollwheel = $(this).data('scrollwheel'), marker = $(this).data('marker'), markerTitle = $(this).data('marker-title'), styles = $(this).data('styles'); $(this).height(mapHeight); $(this).gmap3({ marker: { address: address, data: markerTitle, options: { icon: marker }, events: { mouseover: function(marker, event, context) { var map = $(this).gmap3("get"), infowindow = $(this).gmap3({ get: { name: "infowindow" } }); if (infowindow) { infowindow.open(map, marker); infowindow.setContent(context.data); } else { $(this).gmap3({ infowindow: { anchor: marker, options: { content: context.data } } }); } }, mouseout: function() { var infowindow = $(this).gmap3({ get: { name: "infowindow" } }); if (infowindow) { infowindow.close(); } } } }, map: { options: { zoom: zoom, disableDefaultUI: controls, scrollwheel: scrollwheel, styles:[ {"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]}, {"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]}, {"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]}, {"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]}, {"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]}, {"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]}, {"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]}, {"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]}, {"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]}, {"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]}, {"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]}, {"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]}, {"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]} ], } } }); }); } /*--------------------------------------------------*/ /* Counter*/ /*--------------------------------------------------*/ $('.timer').countTo(); $('.couner-time').appear(function() { $('.timer').countTo(); }, { accY: -200 }); }); }(jQuery));