text: (function ($) {
      $('.woocommerce-form-coupon-toggle .showcoupon').on("click", function () { $(this).toggleClass("active"); if ($(this).hasClass("active")) { $('.woocommerce-form-coupon').stop(!0, !0).slideDown() } else { $('.woocommerce-form-coupon').stop(!0, !0).slideUp() } }); $('.header-static .is-fixed').parent().append('<div class="header-clone"></div>'); $('.header-clone').height($('#site-header .is-fixed').outerHeight()); $('.header-static .header-clone').hide(); $(window).on("scroll", function () { var site_header = $('#site-header').outerHeight() + 1; if ($(window).scrollTop() >= site_header) { $('.site-header .is-fixed').addClass('is-stuck'); $('.header-static .header-clone').show() } else { $('.site-header .is-fixed').removeClass('is-stuck'); $('.header-static .header-clone').hide() } }); $('.mmenu_wrapper li:has(ul)').prepend('<span class="arrow"><i class="ot-flaticon-next"></i></span>'); $(".mmenu_wrapper .mobile_mainmenu > li span.arrow").on('click', function () {
          $(this).parent().find("> ul").stop(!0, !0).slideToggle()
          $(this).toggleClass("active")
      }); $("#mmenu_toggle").on('click', function () { $(this).toggleClass("active"); $(this).parents('.header_mobile').toggleClass("open"); if ($(this).hasClass("active")) { $('.mobile_nav').stop(!0, !0).slideDown(100) } else { $('.mobile_nav').stop(!0, !0).slideUp(100) } }); $('.toggle_search').on("click", function () {
          $(this).toggleClass("active"); $('.h-search-form-field').toggleClass('show'); if ($(this).find('i').hasClass("ot-flaticon-search")) { $('.toggle_search > i').removeClass("ot-flaticon-search").addClass("ot-flaticon-close-1") } else { $('.toggle_search > i').removeClass("ot-flaticon-close-1").addClass("ot-flaticon-search") }
          $('.h-search-form-inner > form > input.search-field').focus()
      }); var element = $('#panel-btn'), sidebar = $('#side-panel'); function panel_handler() { var isActive = !element.hasClass('active'); element.toggleClass('active', isActive); sidebar.toggleClass('side-panel-open', isActive); $('body').toggleClass('side-panel-active', isActive); return !1 }
      $('#panel-btn, .side-panel-close, .panel-overlay').on('click', panel_handler); var element = $('#mmenu-toggle'), mmenu = $('#mmenu-wrapper'); function mmenu_handler() { var isActive = !element.hasClass('active'); element.toggleClass('active', isActive); mmenu.toggleClass('mmenu-open', isActive); $('body').toggleClass('mmenu-active', isActive); return !1 }
      $('#mmenu-toggle, .mmenu-close, .mmenu-overlay').on('click', mmenu_handler); $('.mmenu-wrapper li:has(ul)').prepend('<span class="arrow"><i class="ot-flaticon-next"></i></span>'); $(".mmenu-wrapper .mobile_mainmenu > li span.arrow").on('click', function () {
          $(this).parent().find("> ul").stop(!0, !0).slideToggle()
          $(this).toggleClass("active")
      }); $(window).on('scroll', function () { $('.ot-counter').each(function () { var pos_y = $(this).offset().top - window.innerHeight; var $this = $(this).find('span.num'), countTo = $this.attr('data-to'), during = parseInt($this.attr('data-time')), topOfWindow = $(window).scrollTop(); if (pos_y < topOfWindow) { $({ countNum: $this.text() }).animate({ countNum: countTo }, { duration: during, easing: 'swing', step: function () { $this.text(Math.floor(this.countNum)) }, complete: function () { $this.text(this.countNum) } }) } }); $('.ot-counter2').each(function () { var pos_y = $(this).offset().top - window.innerHeight; var $this = $(this).find('span.num'), countTo = $this.attr('data-to'), during = parseInt($this.attr('data-time')), topOfWindow = $(window).scrollTop(); if (pos_y < topOfWindow) { $({ countNum: $this.text() }).animate({ countNum: countTo }, { duration: during, easing: 'swing', step: function () { $this.text(Math.floor(this.countNum)) }, complete: function () { $this.text(this.countNum) } }) } }); $('.ot-progress').each(function () { var pos_y = $(this).offset().top; var value = $(this).find(".progress-bar").data('percent'); var topOfWindow = $(window).scrollTop(); if (pos_y < topOfWindow + 900) { $(this).find(".progress-bar").css({ 'width': value }, "slow") } }); $('.ot-progress:not([data-processed])').each(function () { var bar = $(this), line = bar.find(".progress-bar"), progressEnd = bar.data('percent'), percent = bar.find('.ppercent'); var scrollTop = $(document).scrollTop() + $(window).height(); if (scrollTop > bar.offset().top + bar.height()) { bar.attr("data-processed", "true"); line.css("width", (bar.outerWidth() * (progressEnd / 100)) + "px"); for (var i = 0; i <= 50; i++) { (function (count) { setTimeout(function () { percent.html(Math.round((progressEnd / 50) * count) + "%") }, 30 * count) })(i) } } }); $('.ot-progress[data-processed]').each(function () { var bar = $(this); var line = bar.find(".progress-bar"); var progressEnd = parseInt(bar.data('percent')); line.css("width", (bar.outerWidth() * (progressEnd / 100)) + "px") }); $('.circle-progress').each(function () { var bar_color = $(this).data('color'); var bar_hei = $(this).data('height'); var bar_size = $(this).data('size'); var pos_y = $(this).offset().top; var topOfWindow = $(window).scrollTop(); if (pos_y < topOfWindow + 900) { $(this).find('.inner-bar').easyPieChart({ barColor: bar_color, trackColor: !1, scaleColor: !1, lineCap: 'square', lineWidth: bar_hei, size: bar_size, animate: 1000, onStart: $.noop, onStop: $.noop, easing: 'easeOutBounce', onStep: function (from, to, percent) { $(this.el).find('.percent').text(Math.round(percent)) + '%' } }) } }) }); $('.ot-accordions').each(function () { var selector = $(this), content = selector.find('.acc-content'), header = selector.find('.acc-toggle'); header.off("click"); header.each(function () { if ($(this).data('default') == 'yes') { $(this).next().addClass('active').slideDown(300); $(this).parent().addClass('current') } }); header.on('click', function (e) { e.preventDefault(); var $this = $(this); $this.next().toggleClass('active').slideToggle(300); $this.parent().toggleClass('current'); content.not($this.next()).slideUp(300); header.not($this).parent().removeClass('current') }) }); $('.ot-tabs').each(function () { var selector = $(this), tabs = selector.find('.tabs-heading li'), content = selector.find('.tab-content'); tabs.first().addClass('current'); content.first().addClass('current'); tabs.on('click', function () { var tab_id = $(this).attr('data-tab'); $(this).siblings().removeClass('current'); $(this).parents('.ot-tabs').find('.tab-content').removeClass('current'); $(this).addClass('current'); $("#" + tab_id).addClass('current') }) }); $('.service-box').each(function () { var selector = $(this), imgPopup = selector.find('.image-box > div'); selector.lightGallery({ selector: imgPopup, share: !1, pager: !1, }) }); $('.team-wrap').each(function () { var selector = $(this).find('.team-social > span'); selector.on('click', function () { $(this).parent().toggleClass('active') }) }); $('.ot-process[data-tab]').each(function () { var selector = $(this); selector.find('.process_nav li').first().addClass('current'); selector.find('.process-des div.process-des-item').hide(); selector.find('.process-des div.process-des-item').first().show(); selector.find('.process_nav li').on('click', function () { $(this).parent().find('li').removeClass('current'); $(this).addClass('current'); $(this).parents('.ot-process').find('.process-des div.process-des-item').hide(); var index = $(this).index(); $(this).parents('.ot-process').find('.process-des div.process-des-item:eq(' + index + ')').fadeIn(300) }) }); $('.ot-countdown').each(function () { var selector = $(this), date = selector.data('date'), zone = selector.data('zone'), day = selector.data('day'), days = selector.data('days'), hour = selector.data('hour'), hours = selector.data('hours'), min = selector.data('min'), mins = selector.data('mins'), second = selector.data('second'), seconds = selector.data('seconds'); selector.countdown({ date: date, offset: zone, day: day, days: days, hour: hour, hours: hours, minute: min, minutes: mins, second: second, seconds: seconds }, function () { alert('Done!') }) }); $(window).on('load resize', function () {
          var
          hero = $('#hero-section'), heroContent = hero.find('.hero-content'), contentHeight = heroContent.height(), sliderHeight = $(window).height(), headerHeight = $('#site-header-wrap').height(); if ($('body').hasClass('header-sticky'))
              headerHeight = headerHeight / 2; var contentMargin = (sliderHeight - contentHeight - headerHeight) / 2; hero.css({ height: sliderHeight + "px" }); heroContent.css({ "margin-top": headerHeight + contentMargin + "px", "margin-bottom": contentMargin + "px" })
      })
      if ($().vegas) {
          $("#hero-section").each(function () {
              var
              $this = $(this), number = $this.data('number'), number = parseInt(number), effect = $this.data('effect'), i = 1, slides = []; while (i <= number) { slides.push({ src: $this.data('image-' + i) }); i++ }
              $this.vegas({ slides: slides, overlay: !0, transition: effect })
          })
      }
      $('a.scroll-target').on('click', function (e) { var $anchor = $(this); $('html, body').animate({ scrollTop: $($anchor.attr('href')).offset().top - 0 }); e.preventDefault() }); $('.message-box > i').on('click', function () { $(this).parent().fadeOut() }); $(".gallery-post").owlCarousel({ items: 1, nav: !0, dots: !1, auto: !0, loop: !0, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: [] }); $(".simple-slide").owlCarousel({ items: 2, nav: !0, dots: !1, auto: !0, loop: !0, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1000: { items: 2 }, 767: { nav: !1, dots: !0, items: 1 }, 0: { nav: !1, dots: !0, items: 1 } } }); $(".ot-testimonials-slider-s1").owlCarousel({ nav: !1, dots: !0, loop: !0, margin: 30, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1000: { items: 2 }, 767: { items: 1 }, 0: { items: 1 } } }); $(".testi-col-3").owlCarousel({ nav: !1, dots: !0, loop: !0, margin: 30, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1000: { items: 3 }, 767: { items: 1 }, 0: { items: 1 } } }); $(".testimonials-slide-2").owlCarousel({ nav: !0, dots: !1, loop: !0, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1000: { items: 1 }, 767: { items: 1 }, 0: { items: 1 } } }); $(".team-slider").owlCarousel({ nav: !1, dots: !0, loop: !0, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1200: { items: 5 }, 767: { items: 2 }, 0: { items: 1 } } }); $(".clients-slide").owlCarousel({ nav: !1, dots: !1, loop: !0, margin: 140, item: 'center', navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1600: { items: 6 }, 1200: { margin: 60, items: 6 }, 767: { margin: 60, items: 4 }, 0: { margin: 50, items: 3 } } }); $(".clients-slide-medium").owlCarousel({ nav: !1, dots: !1, loop: !0, margin: 100, item: 'center', navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1600: { items: 6 }, 1200: { margin: 60, items: 6 }, 767: { margin: 60, items: 4 }, 0: { margin: 100, items: 2 } } }); $(".project-slider").owlCarousel({ nav: !1, dots: !0, loop: !0, margin: 30, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1200: { items: 3 }, 767: { items: 2 }, 0: { items: 1 } } }); $(".project-slider-4item").owlCarousel({ nav: !1, dots: !1, loop: !0, navText: ['<i class="ot-flaticon-left-arrow"></i>', '<i class="ot-flaticon-right-arrow"></i>'], responsive: { 1200: { items: 4 }, 767: { items: 2 }, 0: { dots: !0, items: 1 } } }); $('.single-product').owlCarousel({ items: 1, loop: !0, dots: !1, callbacks: !0, URLhashListener: !0, autoplayHoverPause: !0, startPosition: 'URLHash' }); $('.image-gallery').each(function () { var selector = $(this), popup = selector.find('.gallery-icon > a'); popup.append('<a href="#" class="overlay"><i class="ot-flaticon-add"></i></a>'); selector.lightGallery({ selector: popup, share: !1, pager: !1, }) }); $('.single-product .item ').each(function () { var selector = $(this), imgPopup = selector.find('> a'); selector.lightGallery({ selector: imgPopup, share: !1, showThumbByDefault: !1, pager: !1, }) }); var video_popup = $('.video-popup'); if (video_popup.length > 0) { video_popup.each(function () { $(this).lightGallery({ selector: '.video-popup > a', }) }) }
      $('.portfolio-related-posts').each(function () { var selector = $(this); new Swiper(selector, { slidesPerView: 3, loop: !1, speed: 600, watchOverflow: !0, spaceBetween: 30, pagination: { el: '.octf-swiper-pagination', clickable: !0, }, breakpoints: { 360: { slidesPerView: 1, slidesPerGroup: 1, }, 768: { slidesPerView: 2, slidesPerGroup: 1, }, 1024: { slidesPerView: 3, slidesPerGroup: 1, pagination: { clickable: !0, }, }, } }) }); function updateFilter() { $('.project_filters a').each(function () { var data_filter = this.getAttribute('data-filter'); var num = $(this).closest('.project-filter-wrapper').find('.project-item').filter(data_filter).length; $(this).find('.filter-count').text(num); if (num != 0 && $(this).hasClass('empty')) { $(this).removeClass('empty') } }) }
      $('.project-filter-wrapper').each(function () {
          var $container = $(this).find('.projects-grid'); $container.isotope({ itemSelector: '.project-item', animationEngine: 'css', masonry: { columnWidth: '.grid-sizer' }, layoutMode: 'fitRows', }); var $optionSets = $(this).find('.project_filters'), $optionLinks = $optionSets.find('a'); $optionLinks.on('click', function () {
              var $this = $(this); if ($this.hasClass('selected')) { return !1 }
              var $optionSet = $this.parents('.project_filters'); $optionSet.find('.selected').removeClass('selected'); $this.addClass('selected'); var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector }); return !1
          }); if ($container.hasClass('img-popup')) { $('.img-popup').lightGallery({ selector: '.projects-thumbnail', share: !1, pager: !1, thumbnail: !1 }) }
          updateFilter()
      }); if ($('#back-to-top').length) { var scrollTrigger = 500, backToTop = function () { var scrollTop = $(window).scrollTop(); if (scrollTop > scrollTrigger) { $('#back-to-top').addClass('show') } else { $('#back-to-top').removeClass('show') } }; backToTop(); $(window).on('scroll', function () { backToTop() }); $('#back-to-top').on('click', function (e) { e.preventDefault(); $('html,body').animate({ scrollTop: 0 }, 700) }) }
  })(jQuery)