$(document).ready(function(){ footer(); search(); phonesTab(); openMobMenu(); closeMobMenu(); openSubMenuMob(); homeSlider(); hoverCatList(); expandAllCatList(); var width = $(window).width() function footer(){ footerBottom(); resizeFooterBottom(); function footerBottom(){ var heightHeader = $('.section-box-header').height() var heightFooter = $('.section-box-footer').height() var windowHeight = $(window).height() $('.section-box-content>.container.shadow').css({minHeight:windowHeight-heightHeader-heightFooter-3}) } function resizeFooterBottom(){ $(window).resize(function(){ footerBottom(); }) } } function mobOverlayAdd() { $('body').append('
') } function mobOverlayRemove() { $('.mob-overlay').remove() } function search() { $('.search-btn').click(function () { $('.hidden-search').addClass('vis') }) $('.close-search-btn').click(function () { $('.hidden-search').removeClass('vis') }) } function phonesTab() { $('.phones-table-wr').click(function () { $(this).toggleClass('vis-phone') }) var timerPhone $('.phones-table-wr').hover(function () { clearTimeout(timerPhone) },function () { timerPhone = setTimeout(function () { $('.phones-table-wr').removeClass('vis-phone') },320) }) } function openMobMenu() { $('.menu_mob').click(function () { mobOverlayAdd() $('body').addClass('off-scroll') $('.xs-sm-menu').addClass('open') setTimeout(function () { $('.xs-sm-menu').addClass('visible') },10) }) } function openSubMenuMob() { $('.xs-sm-menu ul.main-menu li a').click(function (e) { var checkSubMEnu = $(this).parent().find('ul') if(checkSubMEnu.length>0){ e.preventDefault(); $(this).parent().toggleClass('show-sub-menu') } }) } function closeMobMenu() { $('body').on('click','.mob-overlay',function () { mobOverlayRemove() if($('.xs-sm-menu').hasClass('visible')) { $('.xs-sm-menu').removeClass('visible') setTimeout(function () { $('.xs-sm-menu').removeClass('open') },200) $('body').removeClass('off-scroll') } $('.xs-sm-menu .show-sub-menu').removeClass('show-sub-menu') }) $('.close-menu-mob').click(function () { mobOverlayRemove() $('.xs-sm-menu').removeClass('visible') setTimeout(function () { $('.xs-sm-menu').removeClass('open') },200) $('body').removeClass('off-scroll') $('.xs-sm-menu .show-sub-menu').removeClass('show-sub-menu') }) } function homeSlider() { var slideA = $('.slider-img a') var numA = slideA.length setInterval(function () { var activeNumA = $('.slider-img a.active-slide').index()+1; if(activeNumA