// Menu function business_article_ship_openNav() { jQuery(".sidenav").addClass('show'); } function business_article_ship_closeNav() { jQuery(".sidenav").removeClass('show'); } ( function( window, document ) { function business_article_ship_keepFocusInMenu() { document.addEventListener( 'keydown', function( e ) { const business_article_ship_nav = document.querySelector( '.sidenav' ); if ( ! business_article_ship_nav || ! business_article_ship_nav.classList.contains( 'show' ) ) { return; } const elements = [...business_article_ship_nav.querySelectorAll( 'input, a, button' )], business_article_ship_lastEl = elements[ elements.length - 1 ], business_article_ship_firstEl = elements[0], business_article_ship_activeEl = document.activeElement, tabKey = e.keyCode === 9, shiftKey = e.shiftKey; if ( ! shiftKey && tabKey && business_article_ship_lastEl === business_article_ship_activeEl ) { e.preventDefault(); business_article_ship_firstEl.focus(); } if ( shiftKey && tabKey && business_article_ship_firstEl === business_article_ship_activeEl ) { e.preventDefault(); business_article_ship_lastEl.focus(); } } ); } business_article_ship_keepFocusInMenu(); } )( window, document ); (function ($) { $(window).load(function () { $("#pre-loader").delay(500).fadeOut(); $(".loader-wrapper").delay(1000).fadeOut("slow"); }); $(document).ready(function () { /*-- tooltip --*/ $('[data-toggle="tooltip"]').tooltip(); /*-- Button Up --*/ var btnUp = $('
', { 'class': 'btntoTop' }); btnUp.appendTo('body'); $(document).on('click', '.btntoTop', function (e) { e.preventDefault(); $('html, body').animate({ scrollTop: 0 }, 700); }); $(window).on('scroll', function () { if ($(this).scrollTop() > 200) $('.btntoTop').addClass('active'); else $('.btntoTop').removeClass('active'); }); /*-- Reload page when width is between 320 and 768px and only from desktop */ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false; $(window).on('resize', function () { var win = $(this); //this = window if (win.width() > 320 && win.width() < 991 && isMobile == false && !$("body").hasClass("elementor-editor-active")) { location.reload(); } }); }); })(this.jQuery); // offer font document.addEventListener('DOMContentLoaded', function() { // Get the heading element var headingElement = document.getElementById('offer-heading'); // Ensure the element exists before proceeding if (headingElement) { // Get the full text of the heading var fullText = headingElement.innerHTML.trim(); // Split the text into words var words = fullText.split(' '); // Get the last word var lastWord = words.pop(); // Join the remaining words var mainText = words.join(' '); // Update the heading with the main text and the styled last word headingElement.innerHTML = mainText + ' ' + lastWord + ''; } }); // search form document.addEventListener("DOMContentLoaded", function () { const searchIcon = document.getElementById("search-icon"); const searchForm = document.getElementById("search-form"); if (searchIcon && searchForm) { searchIcon.addEventListener("click", function () { searchForm.style.display = searchForm.style.display === "block" ? "none" : "block"; }); } }); // slider section jQuery('document').ready(function(){ var owl = jQuery('#main-banner-wrap .owl-carousel'); owl.owlCarousel({ autoplay :false, lazyLoad: true, autoplayTimeout: 9000, loop: false, dots:true, navText : ['', ''], nav:false, items:1, responsive:{ 0: { items: 1 }, 576: { items: 1 }, 768: { items: 1 }, 1000: { items: 1 }, } }); });