1(function ($) { 2 3 var aThemesTeamCarouselrun = function ($scope, $) { 4 5 if ( $().owlCarouselFork ) { 6 $(".roll-team:not(.roll-team.no-carousel)").owlCarouselFork({ 7 navigation : false, 8 pagination: true, 9 responsive: true, 10 items: 3, 11 itemsDesktopSmall: [1400,3], 12 itemsTablet:[970,2], 13 itemsTabletSmall: [600,1], 14 itemsMobile: [360,1], 15 touchDrag: true, 16 mouseDrag: true, 17 autoHeight: false, 18 autoPlay: false, 19 }); // end owlCarouselFork 20 } // end if 21 }; 22 23 var aThemesTestimonialsCarouselrun = function ($scope, $) { 24 25 if ( $().owlCarouselFork ) { 26 $('.roll-testimonials').not('.owl-carousel').owlCarouselFork({ 27 navigation : false, 28 pagination: true, 29 responsive: true, 30 items: 1, 31 itemsDesktop: [3000,1], 32 itemsDesktopSmall: [1400,1], 33 itemsTablet:[970,1], 34 itemsTabletSmall: [600,1], 35 itemsMobile: [360,1], 36 touchDrag: true, 37 mouseDrag: true, 38 autoHeight: true, 39 autoPlay: $('.roll-testimonials').data('autoplay') 40 }); 41 } 42 43 }; 44 45 var aThemesNewsCarouselrun = function ($scope, $) { 46 47 if ( $().owlCarouselFork ) { 48 $(".panel-grid-cell .latest-news-wrapper").owlCarouselFork({ 49 navigation : false, 50 pagination: true, 51 responsive: true, 52 items: 3, 53 itemsDesktopSmall: [1400,3], 54 itemsTablet:[970,2], 55 itemsTabletSmall: [600,1], 56 itemsMobile: [360,1], 57 touchDrag: true, 58 mouseDrag: true, 59 autoHeight: false, 60 autoPlay: false 61 }); // end owlCarouselFork 62 63 } // end if 64 65 }; 66 67 var aThemesteamStyle2 = function ($scope, $) { 68 $( '.roll-team.type-b.style2').find( '.team-item' ).each( function() { 69 var socials = $(this).find( '.team-social' ); 70 socials.appendTo( $(this).find( '.team-inner') ); 71 }); 72 } 73 74 var aThemesgroupProductYITHActions = function() { 75 76 var product = $( '.woocommerce ul.products li.product' ); 77 product.each(function (index, el) { 78 var placeholder = $( el ).find( '.yith-placeholder' ); 79 80 var wcqv = $( el ).find( '.yith-wcqv-button' ); 81 var wcwl = $( el ).find( '.yith-wcwl-add-to-wishlist' ); 82 var compare = $( el ).find( '.compare.button' ); 83 84 placeholder.append( wcqv, wcwl, compare); 85 86 }); 87 } 88 89 var aThemesAnimatedHeading = function($scope, $) { 90 var $strings = $scope.find( ".sydney-typed-strings" ).data( 'strings' ).split('|');
91 var $id = $scope.find( ".sydney-typed-strings" ).data( 'id' ); 92 var $typeSpeed = $scope.find( ".sydney-typed-strings" ).data( 'type-speed' ); 93 var $backSpeed = $scope.find( ".sydney-typed-strings" ).data( 'back-speed' ); 94 var $backDelay = $scope.find( ".sydney-typed-strings" ).data( 'back-delay' ); 95 96 new Typed( "#sydney-animated-heading-" + $id, { 97 strings: $strings, 98 loop: true, 99 typeSpeed: $typeSpeed, 100 backSpeed: $backSpeed, 101 backDelay: $backDelay, 102 }); 103 } 104 105 var aThemesHotspotImage = function($scope, $) { 106 var elements = $scope.find( ".hotspot-element" ); 107 108 $.each(elements, function (i, v) { 109 110 $( this ).on( "click", function(e) { 111 e.preventDefault(); 112 $( this ).find( '.hotspot-tooltip.on-hover' ).toggleClass( 'hotspot-clicked' ); 113 }); 114 }); 115 116 } 117 118 var aThemesNavigation = function($scope, $) { 119 sydney.navigation.init(); 120 } 121 122 var aThemesLinkWrapper = function($scope, $) { 123 $('[data-syd-wrapper-link]').each(function() { 124 var link = $(this).data('syd-wrapper-link'); 125 $(this).on('click', function() { 126 if (link.is_external) { 127 window.open(link.url); 128 } else { 129 location.href = link.url; 130 } 131 }) 132 }); 133 } 134 135 var aThemesMailChimp = function ($scope, $) { 136 137 var $mailchimp = $('.sydney-mailchimp-form-wrapper', $scope), 138 $mailchimp_id = $mailchimp.data('mc-id') !== undefined ? $mailchimp.data('mc-id') : '', 139 $button_text = $mailchimp.data('button-text') !== undefined ? $mailchimp.data('button-text') : '', 140 $success_text = $mailchimp.data('success') !== undefined ? $mailchimp.data('success') : '', 141 $loading_text = $mailchimp.data('loading') !== undefined ? $mailchimp.data('loading') : ''; 142 $list_id = $mailchimp.data('list-id') !== undefined ? $mailchimp.data('list-id') : ''; 143 144 $('#sydney-mailchimp-form-' + $mailchimp_id, $scope).on('submit', function (e) { 145 e.preventDefault(); 146 147 var _this = $(this); 148 149 $('.sydney-mc-response', _this).css('display', 'none').html(''); 150 $('.sydney-mailchimp-subscribe', _this).addClass('button--loading'); 151 $('.sydney-mailchimp-subscribe span', _this).html($loading_text); 152 153 $.ajax({ 154 url: sydney.ajaxurl, 155 type: 'POST', 156 data: { 157 action: 'mailchimp_subscribe', 158 fields: _this.serialize(), 159 listId: $list_id 160 }, 161 success: function success(data) { 162 if (data.status == 'subscribed') { 163 $('input[type=text], input[type=email], textarea', _this).val(''); 164 $('.sydney-mc-response', _this).css('display', 'block').html('<p>' + $success_text + '</p>'); 165 } else { 166 $('.sydney-mc-response', _this).css('display', 'block').html('<p>' + data.status + '</p>'); 167 } 168 169 $('.sydney-mailchimp-subscribe', _this).removeClass('button--loading'); 170 $('.sydney-mailchimp-subscribe span', _this).html($button_text); 171 } 172 }); 173 }); 174 175 } 176 177 var aThemesAdvancedCarousel = function($scope, $) { 178 179 var $carousel = $scope.find('.athemes-advanced-carousel').eq(0); 180 var $id = $carousel.data('id'); 181 var $autoplay = $carousel.data('autoplay'); 182 var $autoplay_speed = $carousel.data('autoplay-speed'); 183 var $transition_speed = $carousel.data('transition-speed'); 184 var $infinite = $carousel.data('infinite') !== undefined ? $carousel.data('infinite') : false; 185 var $pause_on_hover = $carousel.data('pause-on-hover') !== undefined ? $carousel.data('pause-on-hover') : false; 186 187 $items = $carousel.data('items') !== undefined ? $carousel.data('items') : 3; 188 $items_tablet = $carousel.data('items-tablet') !== undefined ? $carousel.data('items-tablet') : 2; 189 $items_mobile = $carousel.data('items-mobile') !== undefined ? $carousel.data('items-mobile') : 1; 190 191 var swiperConfig = { 192 effect: 'slide', 193 direction: 'horizontal', 194 loop: $infinite, 195 autoplay: { 196 delay: $autoplay_speed, 197 disableOnInteraction: false 198 }, 199 autoHeight: true, 200 speed: $transition_speed, 201 navigation: { 202 nextEl: '.swiper-button-next', 203 prevEl: '.swiper-button-prev', 204 }, 205 pagination: { 206 el: '.advanced-carousel-pagination', 207 clickable: true, 208 }, 209 breakpoints: { 210 1024: { 211 slidesPerView: $items, 212 spaceBetween: 30, 213 }, 214 768: { 215 slidesPerView: $items_tablet, 216 spaceBetween: 20, 217 }, 218 320: { 219 slidesPerView: $items_mobile, 220 spaceBetween: 20, 221 }, 222 } 223 } 224 225 const asyncSwiper = elementorFrontend.utils.swiper; 226 227 new asyncSwiper( $carousel, swiperConfig ).then( ( newSwiperInstance ) => { 228 swiperElement = newSwiperInstance; 229 } ); 230 231 if ( $pause_on_hover ) { 232 $carousel.on("mouseenter", function () { 233 swiperElement.autoplay.stop(); 234 235 }); 236 $carousel.on("mouseleave", function () { 237 swiperElement.autoplay.start(); 238 }); 239 } 240 241 } 242 243 var aThemesNewsBar = function($scope, $) { 244 245 //news bar ticker with fade effect powered by swiperjs. posts container is .news-bar-posts 246 var $newsbar = $scope.find('.news-bar-posts').eq(0); 247 var $autoplay_speed = $newsbar.data('autoplay-speed'); 248 var $effect = $newsbar.data('effect'); 249 var $transition_speed = $newsbar.data('transition-speed');
250 var $pause_on_hover = $newsbar.data('pause-on-hover') !== undefined ? $newsbar.data('pause-on-hover') : false; 251 252 var swiperConfig = { 253 effect: $effect, 254 fadeEffect: { 255 crossFade: true 256 }, 257 loop: true, 258 spaceBetween: 30, 259 centeredSlides: true, 260 autoplay: { 261 delay: $autoplay_speed, 262 disableOnInteraction: false, 263 }, 264 autoHeight: true, 265 speed: $transition_speed, 266 //navigation 267 navigation: { 268 nextEl: '.bar-button-next', 269 prevEl: '.bar-button-prev', 270 }, 271 } 272 273 if ( 'undefined' === typeof Swiper ) { 274 const asyncSwiper = elementorFrontend.utils.swiper; 275 276 new asyncSwiper( $newsbar, swiperConfig ).then( ( newSwiperInstance ) => { 277 swiperElement = newSwiperInstance; 278 } ); 279 } else { 280 var swiperElement = new Swiper ( $newsbar, swiperConfig ) 281 } 282 283 if ( $pause_on_hover ) { 284 $newsbar.on("mouseenter", function () { 285 swiperElement.autoplay.stop(); 286 287 }); 288 $newsbar.on("mouseleave", function () { 289 swiperElement.autoplay.start(); 290 }); 291 } 292 293 } 294 295 var aThemesAdvancedTabs = function ($scope, $) { 296 var $tabs = $scope.find('.athemes-tabs').eq(0); 297 298 // Get all the tab elements 299 const tabTitles = $tabs.find('.athemes-tab-title'); 300 301 // Get all the tab content elements 302 const tabContents = $tabs.find('.athemes-tab-content'); 303 304 // Loop through each tab and add event listener 305 tabTitles.each((index, tabTitle) => { 306 $(tabTitle).on('click', () => { 307 // Remove the 'active-tab' class from all tab titles except the clicked one 308 tabTitles.not(tabTitle).removeClass('active-tab').attr('aria-selected', 'false'); 309 310 // Add the 'active-tab' class to the clicked tab title 311 $(tabTitle).addClass('active-tab').attr('aria-selected', 'true'); 312 313 // Hide all tab contents and remove the 'active-tab' class 314 tabContents.attr('hidden', 'hidden').removeClass('active-tab'); 315 316 // Show the corresponding tab content based on the aria-controls attribute 317 const tabId = $(tabTitle).attr('aria-controls'); 318 const tabContent = $tabs.find(`#${tabId}`); 319 if (tabContent.length) { 320 tabContent.removeAttr('hidden').addClass('active-tab'); 321 } 322 }); 323 }); 324 }; 325 326 327 $(window).on('elementor/frontend/init', function () { 328 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-testimonials.default', aThemesTestimonialsCarouselrun); 329 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-posts.default', aThemesNewsCarouselrun); 330 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-employee-carousel.default', aThemesTeamCarouselrun); 331 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-employee-carousel.default', aThemesteamStyle2); 332 elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) { 333 aThemesgroupProductYITHActions(); 334 } ); 335 elementorFrontend.hooks.addAction("frontend/element_ready/athemes-animated-heading.default", aThemesAnimatedHeading ); 336 elementorFrontend.hooks.addAction("frontend/element_ready/athemes-image-hotspots.default", aThemesHotspotImage ); 337 //elementorFrontend.hooks.addAction("frontend/element_ready/athemes-elementor-site-navigation.default", aThemesNavigation ); 338 elementorFrontend.hooks.addAction('frontend/element_ready/global', aThemesLinkWrapper ); 339 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-mailchimp.default', aThemesMailChimp ); 340 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-advanced-carousel.default', aThemesAdvancedCarousel ); 341 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-news-bar.default', aThemesNewsBar ); 342 elementorFrontend.hooks.addAction('frontend/element_ready/athemes-advanced-tabs.default', aThemesAdvancedTabs ); 343 }); 344 345})(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.