function automobile_detailing_shop_openNav() { jQuery(".sidenav").addClass('show'); } function automobile_detailing_shop_closeNav() { jQuery(".sidenav").removeClass('show'); } ( function( window, document ) { function automobile_detailing_shop_keepFocusInMenu() { document.addEventListener( 'keydown', function( e ) { const automobile_detailing_shop_nav = document.querySelector( '.sidenav' ); if ( ! automobile_detailing_shop_nav || ! automobile_detailing_shop_nav.classList.contains( 'show' ) ) { return; } const elements = [...automobile_detailing_shop_nav.querySelectorAll( 'input, a, button' )], automobile_detailing_shop_lastEl = elements[ elements.length - 1 ], automobile_detailing_shop_firstEl = elements[0], automobile_detailing_shop_activeEl = document.activeElement, tabKey = e.keyCode === 9, shiftKey = e.shiftKey; if ( ! shiftKey && tabKey && automobile_detailing_shop_lastEl === automobile_detailing_shop_activeEl ) { e.preventDefault(); automobile_detailing_shop_firstEl.focus(); } if ( shiftKey && tabKey && automobile_detailing_shop_firstEl === automobile_detailing_shop_activeEl ) { e.preventDefault(); automobile_detailing_shop_lastEl.focus(); } } ); } automobile_detailing_shop_keepFocusInMenu(); } )( window, document ); var automobile_detailing_shop_btn = jQuery('#button'); jQuery(window).scroll(function() { if (jQuery(window).scrollTop() > 300) { automobile_detailing_shop_btn.addClass('show'); } else { automobile_detailing_shop_btn.removeClass('show'); } }); automobile_detailing_shop_btn.on('click', function(e) { e.preventDefault(); jQuery('html, body').animate({scrollTop:0}, '300'); }); window.addEventListener('load', (event) => { jQuery(".loading").delay(2000).fadeOut("slow"); }); jQuery("#top-banner .emer-text p").html(function(){ var words = jQuery(this).text().trim().split(" "); words[0] = `${words[0]}`; return words.join(" "); }); jQuery(document).ready(function() { var owl = jQuery('#top-slider .owl-carousel'); owl.owlCarousel({ margin: 0, nav:false, autoplay : true, lazyLoad: true, autoplayTimeout: 5000, loop: false, dots: true, navText : ['',''], responsive: { 0: { items: 1 }, 576: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 }, 1200: { items: 1 } }, autoplayHoverPause : false, mouseDrag: true, }); var owl = jQuery('#service-section .owl-carousel'); owl.owlCarousel({ margin: 25, nav:false, autoplay : true, lazyLoad: true, autoplayTimeout: 5000, loop: false, dots: false, navText : ['',''], responsive: { 0: { items: 1 }, 576: { items: 2 }, 768: { items: 2 }, 1000: { items: 3 }, 1200: { items: 3 } }, autoplayHoverPause : false, mouseDrag: true, }); }); if(document.getElementById("openModalButton")) { if(document.getElementById("openModalButton").getAttribute('data-modal-src')) { var modal=document.getElementById("myModal") var openModalButton=document.getElementById("openModalButton") var closeModalButton=document.getElementById("closeModalButton"); openModalButton.addEventListener("click",function(){ let e=jQuery(this).attr("data-modal-src"); document.getElementById("videoPlayer").src=e modal.style.display="block" }) closeModalButton.addEventListener("click",function(){ document.getElementById("videoPlayer").src="" modal.style.display="none" }) } } jQuery(".slider-inner-box h3").html(function(){ var words = jQuery(this).text().trim().split(" "); if (words.length > 1) { // Wrap first word words[0] = `${words[0]}`; // Wrap last word words[words.length - 1] = `${words[words.length - 1]}`; } else if (words.length === 1) { // If only 1 word, wrap it as first and last words[0] = `${words[0]}`; } return words.join(" "); }); jQuery(".service-head h3.main-heading").html(function(){ var words = jQuery(this).text().trim().split(" "); if (words.length >= 3) { words[2] = `${words[2]}`; } return words.join(" "); });