1(function($) { 2 'use strict'; 3 4$(document).ready(function() { 5 /* 6 * Slider Script 7 */ 8 var $owlHome = $('.main-slider'); 9 var $owlHomeParent = $('.slider-wrapper'); 10 $owlHome.owlCarousel({ 11 rtl: $("html").attr("dir") == 'rtl' ? true : false, 12 nav: $owlHomeParent.hasClass("slider-section-twelve") || $owlHomeParent.hasClass("slider-section-eleven") || $owlHomeParent.hasClass("slider-section-ten") ? false : $owlHome.children().length > 1, 13 navText: ["<i class='fa fa-angle-double-left'></i>","<i class='fa fa-angle-double-right'></i>"], 14 dots: true, 15 loop: $owlHome.children().length > 1, 16 autoplayTimeout:5000, 17 margin: 0, 18 animateIn: $owlHomeParent.hasClass("slider-section-three") ? false : false, 19 animateOut: $owlHomeParent.hasClass("slider-section-three") ? false : false, 20 //autoplay: 7000, 21 autoplay: true, 22 items:1, 23 smartSpeed:450, 24 responsive: { 25 0: { 26 items: 1, 27 nav: false, 28 dots: false 29 }, 30 600: { 31 items: 1 32 }, 33 1000: { 34 items: 1 35 } 36 } 37 }); 38 $owlHome.owlCarousel(); 39 $owlHome.on('translate.owl.carousel', function (event) { 40 var data_anim = $("[data-animation]"); 41 data_anim.each(function() { 42 var anim_name = $(this).data('animation'); 43 $(this).removeClass('animated ' + anim_name).css('opacity', '0'); 44 }); 45 }); 46 $("[data-delay]").each(function() { 47 var anim_del = $(this).data('delay'); 48 $(this).css('animation-delay', anim_del); 49 }); 50 $("[data-duration]").each(function() { 51 var anim_dur = $(this).data('duration'); 52 $(this).css('animation-duration', anim_dur); 53 }); 54 $owlHome.on('translated.owl.carousel', function() { 55 var data_anim = $owlHome.find('.owl-item.active').find("[data-animation]"); 56 data_anim.each(function() { 57 var anim_name = $(this).data('animation'); 58 $(this).addClass('animated ' + anim_name).css('opacity', '1'); 59 }); 60 }); 61 if ($owlHomeParent.hasClass('slider-section-six')) { 62 function owlHomeThumb() { 63 $('.owl-item').removeClass('prev next'); 64 var currentSlide = $('.main-slider .owl-item.active'); 65 currentSlide.next('.owl-item').addClass('next'); 66 currentSlide.prev('.owl-item').addClass('prev'); 67 var nextSlideImg = $('.owl-item.next').find('.item img').attr('data-img-url'); 68 var prevSlideImg = $('.owl-item.prev').find('.item img').attr('data-img-url'); 69 $('.owl-nav .owl-prev').css({ 70 backgroundImage: 'url(' + prevSlideImg + ')' 71 }); 72 $('.owl-nav .owl-next').css({ 73 backgroundImage: 'url(' + nextSlideImg + ')' 74 }); 75 } 76 owlHomeThumb(); 77 $owlHome.on('translated.owl.carousel', function() { 78 owlHomeThumb(); 79 }); 80 } 81 //First Word for 82 if ($owlHomeParent.hasClass('slider-section-twelve')) { 83 $(".specia-content h6").html(function(){ 84 var text= $(this).text().trim().split(" "); 85 var first = text.shift(); 86 return (text.length > 0 ? "<span>"+ first + "</span> " : first) + text.join(" "); 87 }); 88 } 89 var owlHeaderCarousel = $('.header-carousel'); 90 owlHeaderCarousel.owlCarousel({ 91 rtl: $("html").attr("dir") == 'rtl' ? true : false, 92 autoplay: 7000, 93 items:3, 94 margin: 13, 95 nav: false, 96 dots: false, 97 loop: true, 98 smartSpeed:450, 99 autoHeight: true, 100 autoHeightClass: 'owl-height100', 101 responsive: { 102 0: { 103 items: 1 104 }, 105 992: { 106 items: 3 107 }, 108 1200: { 109 items: 3 110 } 111 } 112 }); 113 var owl_widget_single = $('.header-single-carousel'); 114 owl_widget_single.owlCarousel({ 115 rtl: $("html").attr("dir") == 'rtl' ? true : false, 116 autoplay:true, 117 autoplay: 5000, 118 items : 1, 119 margin: 13, 120 nav: false, 121 dots: false, 122 //loop: true, 123 //loop: owl.children().length > 1, 124 loop: (owl_widget_single.children().length)==1 ? false:true, 125 smartSpeed: 450, 126 autoWidth:true, 127 autoHeight: true, 128 autoHeightClass: 'owl-height100', 129 responsiveClass: true, 130 responsive: { 131 0: { 132 items: 1 133 }, 134 992: { 135 items: 1 136 }, 137 1200: { 138 items: 1 139 } 140 } 141 });
142 143 // Add/Remove focus classess for accessibility 144 $('.menubar, .widget_nav_menu').find('a').on('focus blur', function() { 145 $( this ).parents('ul, li').toggleClass('focus'); 146 }); 147 // Mobile Menu Clone 148 $(".menubar .menu-wrap").clone().appendTo(".mobile-menu .mobile-menu-shift");if($('.bt-primary').hasClass('bt-effect-2') || $('.bt-primary').hasClass('bt-effect-3')){document.querySelectorAll('.bt-primary:not(.header-vertical-btn):not(.bt-effect-1)').forEach(btu => btu.innerHTML = '<div><span>' + btu.textContent.trim().split('').join('</span><span>') + '</span></div>');}else{document.querySelectorAll('.bt-primary:not(.header-vertical-btn).bt-effect-1').forEach(btu => btu.innerHTML = '<span>' + btu.textContent + '</span>');} 149 // Header Widget 150 if( !$('.header-widget').children().length > 0 ) { 151 $(".header-widget").hide(); 152 $(".headtop-mobi").hide(); 153 } else { 154 $(".headtop-mobi").show(); 155 $(".header-top-info .header-widget").clone().appendTo(".mobi-head-top"); 156 var $mob_h_topMain = $(".headtop-mobi"); 157 var $mob_h_top = $("#mob-h-top"); 158 $('.header-sidebar-toggle').on('click', function(e) { 159 if ( $mob_h_topMain.hasClass("active") ) { 160 $mob_h_topMain.removeClass("active"); 161 $mob_h_top.removeClass("active"); 162 $('.header-sidebar-toggle.open-toggle').show().focus(); 163 $('.header-sidebar-toggle.close-button').hide(); 164 $('.header-sidebar-toggle').removeClass("active"); 165 } else { 166 $('.header-sidebar-toggle.open-toggle').hide(); 167 $('.header-sidebar-toggle.close-button').show().focus(); 168 $mob_h_topMain.addClass("active"); 169 $mob_h_top.addClass("active"); 170 $('.header-sidebar-toggle').addClass("active"); 171 if ( $mob_h_topMain.hasClass("active") ) { 172 var links,i,len,headtopItem=document.querySelector('.headtop-mobi'),fieldToggle=document.querySelector('.header-sidebar-toggle.close-button');let focusableElements='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';let firstFocusableElement=fieldToggle;let focusableContent=headtopItem.querySelectorAll(focusableElements);let lastFocusableElement=focusableContent[focusableContent.length-1];if(!headtopItem){return!1} 173 links=headtopItem.getElementsByTagName('a');for(i=0,len=links.length;i<len;i++){links[i].addEventListener('focus',toggleFocus,!0);links[i].addEventListener('blur',toggleFocus,!0)} 174 function toggleFocus(){var self=this;while(-1===self.className.indexOf('headtop-shift')){if('input'===self.tagName.toLowerCase()){if(-1!==self.className.indexOf('focus')){self.className=self.className.replace('focus','')}else{self.className+=' focus'}} 175 self=self.parentElement}} 176 document.addEventListener('keydown',function(e){let isTabPressed=e.key==='Tab'||e.keyCode===9;if(!isTabPressed){return} 177 if(e.shiftKey){if(document.activeElement===firstFocusableElement){lastFocusableElement.focus();e.preventDefault()}}else{if(document.activeElement===lastFocusableElement){firstFocusableElement.focus();e.preventDefault()}}}) 178 } 179 } 180 e.preventDefault(); 181 }); 182 } 183 184 /* 185 Text Rotator Function 186 */ 187 $(".demo1 .rotate").textrotator({ 188 animation: "fade", 189 speed: 1000 190 }); 191 192 /* 193 Sticky Header Function 194 */ 195 $('a.page-scroll').bind('click', function(event) { 196 var $anchor = $(this); 197 var nav_height = $('.navbar').innerHeight(); 198 $('html, body').stop().animate({ 199 scrollTop: $($anchor.attr('href')).offset().top - nav_height 200 }, 1500, 'easeInOutExpo'); 201 event.preventDefault(); 202 }); 203 204 /* 205 Top Scroller Function 206 */ 207 $(".top-scroll").hide(); 208 $(window).scroll(function () { 209 if ($(this).scrollTop() > 500) { 210 $('.top-scroll').fadeIn(); 211 } else { 212 $('.top-scroll').fadeOut(); 213 } 214 }); 215 $("a.top-scroll").on('click', function(event) { 216 if (this.hash !== "") { 217 event.preventDefault(); 218 var hash = this.hash; 219 $('html, body').animate({
220 scrollTop: $(hash).offset().top 221 }, 2000, function(){ 222 window.location.hash = hash; 223 }); 224 } 225 }); 226 227 /* 228 //wow-animated 229 */ 230 var wow = new WOW({ 231 boxClass: 'wow', // animated element css class (default is wow) 232 animateClass: 'animated', // animation css class (default is animated) 233 offset: 100, // distance to the element when triggering the animation (default is 0) 234 mobile: true, // trigger animations on mobile devices (true is default) 235 live: true // consatantly check for new WOW elements on the page (true is default) 236 }) 237 wow.init(); 238}); 239 240}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.