(function($){
"use strict";
$.fn.changeElementType=function(newType){
var attrs={};
if(!(this[0]&&this[0].attributes))
return;
$.each(this[0].attributes, function(idx, attr){
attrs[attr.nodeName]=attr.nodeValue;
});
this.replaceWith(function(){
return $("<" + newType + "/>", attrs).append($(this).contents());
});
}
$(window).on("load", function(){
$('.box-mobile').each(function(){
var $this=$(this);
$(this).find('.hamburger').on('click', function(event){
$this.find('.fat-nav').fadeToggle();
$this.find('.fat-nav').toggleClass('active');
$(this).toggleClass('active');
$('body').toggleClass('nav-active');
event.preventDefault();
});
});
$(".fat-list a[href='#']").remove();
$('.fat-list').changeElementType('ul');
$(".fat-list a").wrap("<li></li>");
$('.fat-nav a').on('click', function(event){
$('.fat-nav').removeClass('active');
$('.fat-nav').fadeOut();
$('.hamburger').removeClass('active');
$('body').removeClass('nav-active');
});
$(".for-sticky").sticky({
topSpacing: 0
});
if(Modernizr.touch){
$('body').addClass('no-para');
}});
$('.popup-img').magnificPopup({
type: 'image'
});
$('.blog-popup-img').magnificPopup({
type: 'image',
gallery: {
enabled: true
}});
$("body").fitVids();
$('.menu-box ul').superfish({
delay: 400,
animation: {
opacity: 'show',
height: 'show'
},
animationOut: {
opacity: 'hide',
height: 'hide'
},
speed: 200,
speedOut: 200,
autoArrows: false
})
var $container=$('.portfolio-body');
$('.port-filter a').on('click', function(){
var selector=$(this).attr('data-filter');
$container.isotope({
itemSelector: '.port-item',
filter: selector
});
return false;
});
$('.bg-with-mask').each(function(){
$(this).append('<div class="slider-mask"></div>');
});
$('.blog-slider').slick({
autoplay: true,
dots: false,
nextArrow: '<i class="fa fa-arrow-right"></i>',
prevArrow: '<i class="fa fa-arrow-left"></i>',
speed: 800,
fade: true,
pauseOnHover: false,
pauseOnFocus: false
});
$(".blog-img-bg").each(function(){
var imG=$(this).data('background');
$(this).css('background-image', "url('" + imG + "') "
);
});
$(".gehou-custom-footer div[class*='elementor-widget-wp-'] h5").each(function(){
$(this).addClass("elementor-heading-title");
});
$('.custom-sticky-menu .elementor-section:has(.white-header.no-bg)').first().addClass('for-sticky');
$('.for-sticky').on('sticky-start', function(){
$(this).addClass('gehou-sticky-menu');
$(this).find('.gehou-nav,.box-mobile').addClass('gehou-stick')
});
$('.for-sticky').on('sticky-end', function(){
$(this).removeClass('gehou-sticky-menu');
$(this).find('.gehou-nav,.box-mobile').removeClass('gehou-stick')
});
$('.elementor-widget-gehou-team-hover,.elementor-widget-gehou-texticon-hover').each(function(){
$(this).closest('.elementor-column-wrap').addClass('hovering');
});
})(jQuery);