jQuery(function(){"use strict";var wind=jQuery(window);jQuery.scrollIt({upKey:38,downKey:40,easing:'swing',scrollTime:600,activeClass:'active',onPageChange:null,topOffset:-70});wind.on("scroll",function(){var bodyScroll=wind.scrollTop(),navbar=jQuery(".navbar"),logo=jQuery(".navbar .logo> img");var mobileLogoSrc=jQuery('.logo').data('mobile-logo');var stickyLogoSrc=jQuery('.logo').data('sticky-logo');if(bodyScroll>100){navbar.addClass("nav-scroll");logo.attr('src',mobileLogoSrc);}else{navbar.removeClass("nav-scroll");logo.attr('src',stickyLogoSrc);}});jQuery(".navbar-nav .dropdown-item a").on('click',function(){jQuery(".navbar-collapse").removeClass("show");});jQuery(function(){var navMain=jQuery(".scroll-init");navMain.on("click","a",null,function(){navMain.collapse('hide');});});var pageSection=jQuery(".bg-img, section");pageSection.each(function(indx){if(jQuery(this).attr("data-background")){jQuery(this).css("background-image","url("+jQuery(this).data("background")+")");}
if(jQuery(this).attr("data-padding")){jQuery(this).css("padding",""+jQuery(this).data("padding")+"");}
if(jQuery(this).attr("data-position")){jQuery(this).css("background-position",""+jQuery(this).data("position")+"");}
if(jQuery(this).attr("data-size")){jQuery(this).css("background-size",""+jQuery(this).data("size")+"");}});jQuery('.car-types2 .owl-carousel').owlCarousel({loop:true,margin:15,mouseDrag:true,autoplay:false,autoplayTimeout:5000,dots:false,nav:false,navText:["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"],autoplayHoverPause:true,responsiveClass:true,responsive:{0:{items:2,},600:{items:3},1000:{items:4}}});jQuery(".img-zoom").magnificPopup({type:"image",closeOnContentClick:!0,mainClass:"mfp-fade",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]}})
jQuery('.magnific-youtube, .magnific-vimeo, .magnific-custom').magnificPopup({disableOn:700,type:'iframe',mainClass:'mfp-fade',removalDelay:300,preloader:false,fixedContentPos:false});if(jQuery(".accordion-box").length){jQuery(".accordion-box").on("click",".acc-btn",function(){var outerBox=jQuery(this).parents(".accordion-box");var target=jQuery(this).parents(".accordion");if(jQuery(this).next(".acc-content").is(":visible")){jQuery(this).removeClass("active");jQuery(this).next(".acc-content").slideUp(300);jQuery(outerBox).children(".accordion").removeClass("active-block");}else{jQuery(outerBox).find(".accordion .acc-btn").removeClass("active");jQuery(this).addClass("active");jQuery(outerBox).children(".accordion").removeClass("active-block");jQuery(outerBox).find(".accordion").children(".acc-content").slideUp(300);target.addClass("active-block");jQuery(this).next(".acc-content").slideDown(300);}});}
var contentWayPoint=function(){var i=0;jQuery('.animate-box').waypoint(function(direction){if(direction==='down'&&!jQuery(this.element).hasClass('animated')){i++;jQuery(this.element).addClass('item-animate');setTimeout(function(){jQuery('body .animate-box.item-animate').each(function(k){var el=jQuery(this);setTimeout(function(){var effect=el.data('animate-effect');if(effect==='fadeIn'){el.addClass('fadeIn animated');}else if(effect==='fadeInLeft'){el.addClass('fadeInLeft animated');}else if(effect==='fadeInRight'){el.addClass('fadeInRight animated');}else{el.addClass('fadeInUp animated');}
el.removeClass('item-animate');},k*200,'easeInOutExpo');});},100);}},{offset:'85%'});};jQuery(function(){contentWayPoint();});jQuery("a.vid").YouTubePopUp();});