PageSourceSearch

https://www.agriturismoziocristoforo.com/wp-content/plugins/ova-br…?ver=3b96ea96e701ccde8705fc60bbb244cd

js agriturismoziocristoforo.com collected 2026-10-08 10:51:16 UTC 12,179 bytes, 396 lines download raw bytes

1(function($){
2	"use strict";
3	
4
5	$(window).on('elementor/frontend/init', function () {
6
7		/* Search Select 2 */
8		$(".ovabrw-search .ovabrw-search-form").each(function(){
9	        $('.search_in_taxonomy .brw_custom_taxonomy_dropdown, #ovabrw_package').select2({ 
10	        	width: '100%',
11	        });
12	    });
13
14		/* Search Ajax */
15		$(".ovabrw-search-ajax .wrap-search-ajax").each(function(){
16
17		    // Sort by filer dropdown
18			function sort_by_filter_dropdown(){
19
20				var sort_by  		      = $('.ovabrw-tour-filter .input_select_input');
21				var sort_by_value  	 	  = $('.ovabrw-tour-filter .input_select_input_value');
22				var term_item 		      = $('.ovabrw-tour-filter .input_select_list .term_item');
23				var sort_by_text_default  = $('.ovabrw-tour-filter .input_select_list .term_item_selected').data('value');
24				var sort_by_value_default = $('.ovabrw-tour-filter .input_select_list .term_item_selected').data('id');	
25                
26                sort_by.attr('value',sort_by_text_default);
27				sort_by_value.attr('value',sort_by_value_default);
28
29				sort_by.on('click', function () {
30		        	$(this).closest('.filter-sort').find('.input_select_list').toggle();
31		        	$(this).toggleClass( 'active' );
32		        });
33
34		        $('.ovabrw-tour-filter .asc_desc_sort').on('click', function () {
35		        	$(this).closest('.ovabrw-tour-filter').find('.input_select_list').toggle();
36		        	$(this).closest('.ovabrw-tour-filter').find('.input_select_input').toggleClass( 'active' );
37		        });
38
39		        term_item.on('click', function () {
40		        	$(this).closest('.ovabrw-tour-filter').find('.input_select_list').hide();
41
42		        	// change term item selected
43		        	var item_active   = $('.ovabrw-tour-filter .input_select_list .term_item_selected').data('id');
44		            var item          = $(this).data('id');
45		            if ( item != item_active ) {
46		                term_item.removeClass('term_item_selected');
47		                $(this).addClass('term_item_selected');
48		            }
49
50		            // get value, id sort by
51		            var sort_value = $(this).data('id');
52		            var sort_label = $(this).data('value');
53
54	                // change input select text
55		        	sort_by.val(sort_label);
56		        	// change input value
57		        	sort_by_value.val(sort_value);
58		        });
59		    } 
60
61		    sort_by_filter_dropdown();    
62
63	    });
64
65		/* Product slider */ 
66		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_slider.default', function(){
67
68			$(".ova-product-slider").each(function(){
69		        var owlsl      = $(this) ;
70		        var owlsl_ops  = owlsl.data('options') ? owlsl.data('options') : {};
71
72		        var responsive_value = {
73		            0:{
74                        items:1,
75                        dots: true,
76                    },
77                    576:{
78                        items:1,
79                    },
80                    767: {
81                    	items:2,
82                    },
83                    960:{
84                        items:owlsl_ops.items - 1,
85                    },
86                    1200:{
87                        items:owlsl_ops.items
88                    }
89		        };
90		        
91		        owlsl.owlCarousel({
92		            margin: owlsl_ops.margin,
93		            items: owlsl_ops.items,
94		            loop: owlsl_ops.loop,
95		            autoplay: owlsl_ops.autoplay,
96		            autoplayTimeout: owlsl_ops.autoplayTimeout,
97		            nav: owlsl_ops.nav,
98		            dots: owlsl_ops.dots,
99		            autoplayHoverPause: owlsl_ops.autoplayHoverPause,
100		            slideBy: owlsl_ops.slideBy,
101		            smartSpeed: owlsl_ops.smartSpeed,
102		            rtl: owlsl_ops.rtl,
103		            navText:[
104			            '<i class="ovaicon ovaicon-back"></i>',
105			            '<i class="ovaicon ovaicon-next"></i>'
106		            ],
107		            responsive: responsive_value,
108		        });
109
110		      	/* Fixed WCAG */
111				owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
112				owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
113				owlsl.find(".owl-dots button").attr("title", "Dots");
114
115		      });
116		});
117
118		/* Product slider syncing */ 
119		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_slider_syncing.default', function(){
120
121		  	$(".ova-product-slider-syncing .main-slider-content-wrapper").each(function(){
122        		var product_content = $(this);
123        		var data_options    = product_content.data('options') ? product_content.data('options') : {};
124        		var asNavFor = '';
125        		if ( data_options.rtl ) {
126        			product_content.parent().attr('dir','rtl');
127        		}
128
129        		if( $('.sub-slider-content-wrapper').length ){
130				   asNavFor = '.sub-slider-content-wrapper';
131				}
132
133			    product_content.slick({
134					infinite: data_options.loop,
135					slidesToShow: 1,
136					slidesToScroll: 1,
137					arrows: false,
138					fade: false,
139					adaptiveHeight: false,
140					autoplay: data_options.autoplay,
141					autoplaySpeed: data_options.autoplay_speed,
142					speed: data_options.smartSpeed,
143					rtl: data_options.rtl,
144					asNavFor: asNavFor,
145					lazyLoad: 'ondemand'
146				});
147                
148                // avoid break layout when window resize
149				$(window).resize(function(){
150				  	product_content.slick('setPosition');
151				});
152        		
153        	});
154
155
156        	$(".ova-product-slider-syncing .sub-slider-content-wrapper").each(function(){
157        		var product_sub_content = $(this);
158
159        		var responsive_value = [
160				    {
161						breakpoint: 1200,
162						settings: {
163							arrows : false
164						}
165					},
166				    {
167						breakpoint: 768,
168						settings: {
169							arrows : false
170						}
171				    }
172			  	];
173
174        		product_sub_content.slick({
175					slidesToShow: 2,
176					slidesToScroll: 1,
177					arrows: true,
178        			prevArrow: '<div class="slick-prev-custom"><i aria-hidden="true" class="ovaicon ovaicon-back-2"></i></div>',
179        			nextArrow: '<div class="slick-next-custom"><i aria-hidden="true" class="ovaicon ovaicon-next-4"></i></div>',
180		 			dots: true,
181					focusOnSelect: true,
182					asNavFor: '.main-slider-content-wrapper',
183					responsive : responsive_value
184				});
185
186                // avoid break layout when window resize
187				$(window).resize(function(){ 
188					product_sub_content.slick('setPosition');
189				});
190				
191        	});
192
193        });
194
195
196		/* Gallery Slideshow */
197		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_images.default', function(){
198
199			$('.elementor-product-image .ova-product-gallery-slideshow').each( function() {
200				var that 	= $(this);
201				var options = that.data('options') ? that.data('options') : {};
202
203				var responsive_value = {
204		            0:{
205		                items:1,
206		                nav:false,
207		                dots:true,
208		            },
209		            768:{
210		              	items: 2,
211		            },
212		            1025:{
213		              	items: options.items,
214		            },
215		            1300:{
216		              	items: options.items,
217		            }
218		        };
219		        
220		        that.owlCarousel({
221		        	autoWidth: options.autoWidth,
222					margin: options.margin,
223					items: options.items,
224					loop: options.loop,
225					autoplay: options.autoplay,
226					autoplayTimeout: options.autoplayTimeout,
227					center: options.center,
228					lazyLoad: options.lazyLoad,
229					nav: options.nav,
230					dots: options.dots,
231					autoplayHoverPause: options.autoplayHoverPause,
232					slideBy: options.slideBy,
233					smartSpeed: options.smartSpeed,
234					rtl: options.rtl,
235					navText:[
236			          	'<i aria-hidden="true" class="'+ options.nav_left +'"></i>',
237			          	'<i aria-hidden="true" class="'+ options.nav_right +'"></i>'
238			        ],
239					responsive: responsive_value,
240		        });
241
242		        that.find('.gallery-fancybox').off('click').on('click', function() {
243					var index = $(this).data('index');
244					var gallery_data = $(this).closest('.ova-product-gallery-popup').find('.ova-data-gallery').data('gallery');
245
246					Fancybox.show(gallery_data, {
247		            	Image: {
248						    Panzoom: {
249						      	zoomFriction: 0.7,
250						      	maxScale: function () {
251						        	return 3;
252						      	},
253						    },
254					  	},
255					  	startIndex: index,
256					});
257				});
258			});
259		});
260
261		/* Product Forms */
262		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_forms.default', function(){
263            /* Forms */
264			$('.ova-forms-product').each( function() {
265				var that = $(this);
266				var item = that.find('.tabs .item');
267
268				if ( item.length > 0 ) {
269					item.each( function( index ) {
270					  	if ( index == 0 ) {
271					  		$(this).addClass('active');
272					  		var id = $(this).data('id');
273					  		$(id).show();
274					  	}
275					});
276				}
277
278				item.on('click', function() {
279					item.removeClass('active');
280					$(this).addClass('active');
281					var id = $(this).data('id');
282
283					if ( id == '#booking-form' ) {
284						that.find('#request-form').hide();
285					}
286
287					if ( id == '#request-form' ) {
288						that.find('#booking-form').hide();
289					}
290					
291					$(id).show();
292				});
293			});
294		});
295
296		/* Product Tabs */
297		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_tabs.default', function(){
298
299			/* Tabs */
300			$('.ova-tabs-product').each( function() {
301				var that = $(this);
302				var item = that.find('.tabs .item');
303
304				if ( item.length > 0 ) {
305					item.each( function( index ) {
306					  	if ( index == 0 ) {
307					  		$(this).addClass('active');
308					  		var id = $(this).data('id');
309					  		$(id).show();
310					  	}
311					});
312				}
313
314				item.on('click', function() {
315					item.removeClass('active');
316					$(this).addClass('active');
317					var id = $(this).data('id');
318
319					if ( id == '#ova-product-description' ) {
320						that.find('#ova-product-conditions-and-rules, #ova-product-review, #ova-product-video').hide();
321					}
322
323					if ( id == '#ova-product-conditions-and-rules' ) {
324						that.find('#ova-product-description, #ova-product-review, #ova-product-video').hide();
325					}
326
327					if ( id == '#ova-product-video' ) {
328						that.find('#ova-product-description, #ova-product-review, #ova-product-conditions-and-rules').hide();
329					}
330
331					if ( id == '#ova-product-review' ) {
332						that.find('#ova-product-conditions-and-rules, #ova-product-description, #ova-product-video').hide();
333					}
334					
335					$(id).show();
336				});
337			});
338
339		});
340
341		/* related slide */
342		elementorFrontend.hooks.addAction('frontend/element_ready/ovabrw_product_related.default', function(){
343
344			$(".elementor-ralated-slide .elementor-ralated").each(function(){
345		        var owlsl      = $(this) ;
346		        var owlsl_ops  = owlsl.data('options') ? owlsl.data('options') : {};
347
348		        var responsive_value = {
349		            0:{
350                        items:1,
351                    },
352                    576:{
353                        items:1,
354                    },
355                    767: {
356                    	items:2,
357                    },
358                    960:{
359                        items:owlsl_ops.items - 1,
360                    },
361                    1200:{
362                        items:owlsl_ops.items
363                    }
364		        };
365		        
366		        owlsl.owlCarousel({
367		            margin: owlsl_ops.margin,
368		            items: owlsl_ops.items,
369		            loop: owlsl_ops.loop,
370		            autoplay: owlsl_ops.autoplay,
371		            autoplayTimeout: owlsl_ops.autoplayTimeout,
372		            nav: owlsl_ops.nav,
373		            dots: owlsl_ops.dots,
374		            autoplayHoverPause: owlsl_ops.autoplayHoverPause,
375		            slideBy: owlsl_ops.slideBy,
376		            smartSpeed: owlsl_ops.smartSpeed,
377		            rtl: owlsl_ops.rtl,
378		            navText:[
379			            '<i class="ovaicon ovaicon-back"></i>',
380			            '<i class="ovaicon ovaicon-next"></i>'
381		            ],
382		            responsive: responsive_value,
383		        });
384
385		      	/* Fixed WCAG */
386				owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
387				owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
388				owlsl.find(".owl-dots button").attr("title", "Dots");
389
390		    });
391		});
392
393	});
394
395
396})(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.