PageSourceSearch

https://oncue.nu/wp-content/plugins/th-widget-pack/js/themo-foot.js?ver=2.2.9

js oncue.nu collected 2026-10-02 01:06:25 UTC 11,010 bytes, 336 lines download raw bytes

1"use strict";
2
3//-----------------------------------------------------
4// Initiate Slider (flexslider)
5//-----------------------------------------------------
6function themo_start_flex_slider(flex_selector,themo_autoplay,themo_flex_animation, themo_flex_easing,
7                                 themo_flex_animationloop, themo_flex_smoothheight, themo_flex_slideshowspeed, themo_flex_animationspeed,
8                                 themo_flex_randomize, themo_flex_pauseonhover, themo_flex_touch, themo_flex_directionnav,themo_flex_controlNav){
9    // SETUP FLEXSLIDER OPTIONS
10    // Remove ajax_loader.gif from Formidable Plugin
11    jQuery("img.frm_ajax_loading").remove();
12    jQuery(flex_selector).flexslider({
13        slideshow: themo_autoplay,
14        animation: themo_flex_animation,
15        smoothHeight: themo_flex_smoothheight,
16        easing: themo_flex_easing,
17        animationLoop: themo_flex_animationloop,
18        slideshowSpeed: themo_flex_slideshowspeed,
19        animationSpeed: themo_flex_animationspeed,
20        randomize: themo_flex_randomize,
21        pauseOnHover: themo_flex_pauseonhover,
22        touch: themo_flex_touch,
23        directionNav: themo_flex_directionnav,
24        controlNav: themo_flex_controlNav,
25        //directionNav: false,
26        prevText: '',
27        nextText: '',
28        start: function (slider) {
29            //slider.removeClass( "flexpreloader");
30            jQuery('body').addClass('loaded');
31        },
32        after: function (slider) {
33        },
34        before: function () {
35        }
36    });
37}
38
39//-----------------------------------------------------
40// Active Lightbox
41//-----------------------------------------------------
42function themo_active_lightbox(){
43    // delegate calls to data-toggle="lightbox"
44    jQuery(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
45        event.preventDefault();
46        return jQuery(this).ekkoLightbox({
47            always_show_close: true,
48            gallery_parent_selector: '.gallery',
49            right_arrow_class: '.flex-next',
50            left_arrow_class: '.flex-prev'
51        });
52    });
53}
54
55
56jQuery( function ( $ ) {
57
58    // fix pricing columns
59	themo_adjust_pricing_table_height();
60
61    // start isotope
62    themo_init_isotope();
63
64    // Add class to section if parallax enabled and we detect an IOS or Andriod device .
65    if (navigator.userAgent.match(/(iPod|iPhone|iPad)/) || (navigator.userAgent.match(/(Android)/))) {
66        //console.log('IOS or Android');
67        $(".th-parallax").addClass( "th-mobile" );
68    }
69
70
71
72
73    //-----------------------------------------------------
74    // Start isotope / for masonry blog and tours filtering
75    //-----------------------------------------------------
76
77    function themo_init_isotope() {
78
79        // Equalize Heights
80        $.fn.equalizeHeights = function() {
81
82            // construct an array that contains the height of every <div> element
83            var two = $(this).map(function(i, e) {
84                return $(e).height();
85            });
86
87
88
89            return this.height(    // set the height of element <div> element to...
90                Math.max.apply(    // the largest value in...
91                    this,two.get() // the array of height values
92                )
93            ); // ...and finally, return the original jQuery object to enable chaining
94        };
95
96
97
98        // Room Grid / Portfolio
99        var $container = $('.th-portfolio-row').not('.elementor-element-edit-mode .th-portfolio-row');
100
101        // init
102        var $port_grid = $container.isotope({
103        // options
104           itemSelector: '.th-portfolio-item',
105            layoutMode: 'fitRows'
106             /*itemSelector: '.th-portfolio-item',
107            masonry: {
108                //columnWidth: 100
109            }*/
110        });
111
112        // layout Isotope after each image loads
113        $port_grid.imagesLoaded().progress( function() {
114            $port_grid.isotope('layout');
115        });
116
117
118        var $th_cardbody = $('.th-portfolio-row .th-port-card-body');
119
120        // Equalize Card Body
121        $($th_cardbody).equalizeHeights();
122
123
124        // filter items on click handler
125        $('.th-portfolio-filters').on( 'click', 'a', function(e) {
126
127            e.preventDefault();
128
129            // Get Data-filter value
130            var filterValue = $(this).attr('data-filter');
131
132            // Get Parent Class
133            if (filterValue == '*') {
134                var parent_class = $(this).closest('.th-portfolio').attr("id");
135            } else {
136                var parent_class = $(filterValue).closest('.th-portfolio').attr("id");
137            }
138
139            // Remove .current class from all a links inside .th-portfolio-filters
140            $('#'+parent_class+' .th-portfolio-filters a').removeClass( "current" );
141
142            // Add .current class to current filter link.
143            $(this).addClass( "current" );
144
145            // Get the container element to initialize isotope.
146           var $thiscontainer = $('#'+parent_class+' .th-portfolio-row');
147
148            $thiscontainer.isotope({ filter: filterValue });
149
150        });
151
152        // Masonry Blog
153
154        var $bloggrid = $('.mas-blog').isotope({
155            itemSelector: '.mas-blog-post',
156            transitionDuration: '0.2s',
157            percentPosition: true,
158            originLeft: true,
159            masonry: {
160                columnWidth: '.mas-blog-post-sizer'
161                //gutter: 30
162
163            }
164        });
165
166
167
168
169        // layout Isotope after each image loads
170        $bloggrid.imagesLoaded().progress( function() {
171
172            $bloggrid.isotope('layout');
173            $bloggrid.on('layoutComplete', function (event, laidOutItems) {
174                //console.log('layoutComplete with ' + laidOutItems.length + ' items');
175            });
176        });
177
178
179
180
181    }
182
183    //-----------------------------------------------------
184	// Adjust Pricing Table Height
185	//-----------------------------------------------------
186
187    function themo_adjust_pricing_table_height(){
188
189        var $tallestCol;
190
191
192
193        // For each pricing-table element
194        $('.th-pricing-table').each(function(){
195            $tallestCol = 0;
196
197            // Find the plan name
198            $(this).find('> div .th-pricing-title').each(function(){
199                ($(this).height() > $tallestCol) ? $tallestCol = $(this).height() : $tallestCol = $tallestCol;
200            });
201
202            // Safety net increase pricing tables height couldn't be determined
203            if($tallestCol == 0) $tallestCol = 'auto';
204
205            // set even height
206            $(this).find('> div .th-pricing-title').css('height',$tallestCol);
207
208            // Button Wrap
209            $(this).find('> div .th-btn-wrap').each(function(){
210                ($(this).height() > $tallestCol) ? $tallestCol = $(this).height() : $tallestCol = $tallestCol;
211            });
212
213            // Safety net incase pricing tables height couldn't be determined
214            if($tallestCol == 0) $tallestCol = 'auto';
215
216            // Set even height
217            $(this).find('> div .th-btn-wrap').css('height',$tallestCol);
218
219            // FEATURES UL
220            $(this).find('> div .th-pricing-features').each(function(){
221                ($(this).height() > $tallestCol) ? $tallestCol = $(this).height() : $tallestCol = $tallestCol;
222            });
223
224            // Safety net incase pricing tables height couldn't be determined
225            if($tallestCol == 0) $tallestCol = 'auto';
226
227            // Set even height
228            $(this).find('> div .th-pricing-features').css('height',$tallestCol);
229
230
231            // END FEATURES UL
232
233        });
234    }
235
236    // Intinerary Toggles
237
238	$( '.th-itinerary' ).find( '.th-itin-single' ).each( function() {
239		var $$ = $( this ),
240			$title = $$.find( '.th-itin-title' ),
241			$content = $$.find( '.th-itin-content' );
242
243
244		$title.on( 'click', function() {
245			if ( $$.hasClass( 'th-itin-active' ) ) {
246                $content.slideUp('fast', function() {
247                    $$.addClass( 'th-itin-inactive' );
248                    $$.removeClass( 'th-itin-active' );
249                });
250			} else {
251                $content.slideDown('fast', function() {
252                    $$.addClass( 'th-itin-active' );
253                    $$.removeClass( 'th-itin-inactive' );
254                });
255			}
256		} );
257
258	} );
259
260
261
262    // tooltips
263    $('a[rel=tooltip]').tooltip();
264
265    // popovers
266    $("a[rel=popover]").popover();
267
268} );
269
270
271
272//======================================================================
273// On Window Load - executes when complete page is fully loaded, including all frames, objects and images
274//======================================================================
275
276jQuery(window).on('load',function ($) {
277    "use strict";
278
279    // Initiate Lightbox
280    themo_active_lightbox();
281});
282
283
284jQuery(window).on('elementor/frontend/init', function () {
285    elementorFrontend.hooks.addAction( 'frontend/element_ready/image-carousel.default', function( $scope ) {
286
287        //var $carousel_wrapper = $scope.find( '.elementor-image-carousel-wrapper' );
288
289        //$carousel_wrapper.parents("div.elementor-widget-image-carousel").css("border",'red solid 5px');
290
291        //var $slick_div = $carousel_wrapper.parents("div.elementor-widget-image-carousel");
292
293
294        //$carousel_wrapper.parents("div.elementor-widget-image-carousel").data( "settingsNEW", "HELLO" );
295
296        //if ( $scope.find( '.elementor-image-carousel-wrapper' ) ){
297
298        //}
299
300        //$scope.find("[data-element_type='image-carousel.default']").data( "settingsNEW", { slides_to_show: "10"}) ;
301
302        //var $image_carousel_div = $scope.find( "elementor-widget-image-carousel" );
303        // console.log($image_carousel_div.id);
304
305        //if ( $scope.find( ".elementor-widget-image-carousel" ) ){
306        //console.log('FOUND IT');
307        //console.log($scope.find( ".elementor-widget-image-carousel" ));
308        //$scope.find( ".elementor-widget-image-carousel" ).data( "settingsNEW", { slides_to_show: "10"} );
309        //}
310
311        //console.log('HELLO');
312    } );
313})
314
315//-----------------------------------------------------
316// Initialize Image Carousel Timeline Slick Slider
317//-----------------------------------------------------
318
319jQuery(document).ready(function ($) {
320
321    if (typeof jQuery.fn.slick === 'function' ) {
322        $('.th-image-carousel-timeline .elementor-image-carousel').slick();
323    }
324
325    // Reinitialize slick when "image carousel timeline" element changes.
326    if (typeof elementorFrontend !== 'undefined' && typeof elementorFrontend.hooks !== 'undefined') {
327        elementorFrontend.hooks.addAction('frontend/element_ready/themo-image-carousel-timeline.default', function ($scope) {
328            var $carousel = $scope.find('.elementor-image-carousel');
329            // Check if slick is not already initialized on the same element.
330            if (typeof jQuery.fn.slick === 'function' && ! $carousel.hasClass('slick-initialized')) {
331                $carousel.slick();
332            }
333        });
334    }
335
336});

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.