PageSourceSearch

https://outdoorphotographycanada.com/wp-content/themes/bepro-busin…?ver=21031b96b299f7ed8c1296cec5821c75

js outdoorphotographycanada.com collected 2026-10-04 06:56:34 UTC 10,047 bytes, 433 lines download raw bytes

1(function($) {
2	$(document).ready(function(){
3		/*$('.owl-carousel').owlCarousel({
4			loop:true,
5			margin:0,
6			responsiveClass:true,
7			responsive:{
8				0:{
9					items:1
10				},
11				600:{
12					items:1,
13					nav:true
14				},
15				1000:{
16					items:1,
17					nav:true
18				}
19			}
20		});*/
21		$(".backtop").click(function () {
22		   $("html, body").animate({scrollTop: 0}, 1000);
23		   return false;
24		});
25		$(window).scroll(function(){
26			if ($(this).scrollTop() > 200) {
27				$('.backtop').fadeIn();
28			} else {
29				$('.backtop').fadeOut();
30			};
31		});
32		$('.offcanvas-btn').click(function(){
33			$(this).toggleClass('active');
34			$('#header-right').toggleClass('active');
35			$('body').toggleClass('active')
36		})
37		
38		theme_num_results = 0;
39		if($('#search-results') && $('#bl_total_results')){
40			theme_num_results = $(".bpll_listing").length;
41			update_pagination(theme_num_results);
42		}
43			
44		$(document).ajaxSuccess(function() {
45			update_pagination(theme_num_results);
46		});
47		
48		//order by search feature on search page 1 template
49		if($("#bepro-order-insert"))
50		$("#bepro-order-insert").change(function(e) {
51			$("#bl_order_dir").html($(this).val());
52		});
53		
54		//distance search feature on search page 1 template
55		if($("#bepro-order-distance")){
56			//pre - set the distance
57			$("#listingsearchform > input[type=hidden]:nth-child(3)").val($("#bepro-order-distance").val());
58			$("#bepro-order-distance").change(function(e) {
59				$("#listingsearchform > input[type=hidden]:nth-child(3)").val($(this).val());
60			});
61		}
62		
63		
64		//add style class to BePro Elements
65		if($(".shortcode_results_1 .result_name")){
66			$(".shortcode_results_1 .result_name").each(function(){
67				$(this).addClass("bepro_color");
68			});
69		}
70		
71		if($(".bpll_listing .result_button")){
72			$(".bpll_listing .result_button").each(function(){
73				$(this).addClass("bepro_color");
74			});
75		}
76		
77		if($(".blsearchbuttons input")){
78			$(".blsearchbuttons input").each(function(){
79				$(this).addClass("bepro_color");
80			});
81		}
82		
83		if($("#search_filter_shortcode_button .form-submit")){
84			$("#search_filter_shortcode_button .form-submit").each(function(){
85				$(this).addClass("bepro_color");
86			});
87		}
88		
89		if($("#filter_search_form .form-submit")){
90			$("#filter_search_form .form-submit").each(function(){
91				$(this).addClass("bepro_color");
92			});
93		}
94		
95		if($("#listingsearchform .submit")){
96			$("#listingsearchform .submit").each(function(){
97				$(this).addClass("bepro_color");
98			});
99		}
100		
101		
102		
103		/* slider removed in favor of BePro Listings packaged solution
104		$( "#slider-range" ).slider({
105			range: true,
106			min: 0,
107			max: 30000,
108			values: [ 1000, 20000 ],
109			slide: function( event, ui ) {
110				$( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
111			}
112		});
113		$( "#slider" ).slider({
114			value:100,
115			min: 0,
116			max: 500,
117			step: 50,
118			slide: function( event, ui ) {
119				$( "#amount2" ).val( ui.value + "Mi");
120			}
121		});
122
123		$( "#amount2" ).val( $( "#slider" ).slider( "value" ) + "Mi" );
124		*/
125		var dateFormat = "mm/dd/yy",
126		from = $( "#from" )
127		.datepicker({
128			defaultDate: "+1w",
129			changeMonth: true,
130			numberOfMonths: 1
131		})
132		.on( "change", function() {
133			to.datepicker( "option", "minDate", getDate( this ) );
134		}),
135		to = $( "#to" ).datepicker({
136			defaultDate: "+1w",
137			changeMonth: true,
138			numberOfMonths: 1
139		})
140		.on( "change", function() {
141			from.datepicker( "option", "maxDate", getDate( this ) );
142		});
143
144		function getDate( element ) {
145			var date;
146			try {
147				date = $.datepicker.parseDate( dateFormat, element.value );
148			} catch( error ) {
149				date = null;
150			}
151
152			return date;
153		}
154		$('.AdvanceFilterBtn').click(function(){
155			$(this).toggleClass('active')
156			$('.filter-sec').slideToggle();
157			return false;
158		})
159
160		// $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) );
161		$('.MapShowHideBtn').click(function(){
162			$('.map-sec').toggleClass('active');
163			return false;
164		})
165		
166		$(".page-template-bpl_search .clear_search").click(function(){
167			window.location = window.location.origin + window.location.pathname;
168		})
169		
170		$(".banner .owl-carousel").owlCarousel({ 
171			autoPlay: 3000, //Set AutoPlay to 3 seconds 
172			loop: true,
173			items : 1 
174		});
175		
176		jQuery(".client-wrap .owl-carousel").owlCarousel({ 
177			autoPlay: 3000, //Set AutoPlay to 3 seconds
178			loop: true,
179			items : 1 
180		});
181		
182		
183		$(".textBox .owl-carousel").owlCarousel({
184			margin:30,
185			loop: true,
186			responsive: {
187				0: {
188					items: 1
189				},
190				480: {
191					items: 2
192				},
193				640: {
194					items: 3
195				},
196				768: {
197					items: 4,
198					nav:true
199				}
200			}
201		});
202		
203		$(".price .owl-carousel").owlCarousel({
204			margin:30,
205			loop: true,
206			responsive: {
207				0: {
208					items: 1
209				},
210				640: {
211					items: 2
212				},
213				768: {
214					items: 2,
215					nav:true
216				},
217				1024: {
218					items: 3,
219					nav:true
220				}
221			}
222		});
223		
224		$(".brand .owl-carousel").owlCarousel({
225			margin:30,
226			loop: true,			
227			autoplay:true,
228			responsive: {
229				0: {
230					margin:15,
231					items: 3
232				},
233				639: {
234					items: 4
235				},
236				767: {
237					items: 5
238				},
239				1023: {
240					items: 6
241				},
242				1176: {
243					items: 8
244				}
245			}
246		});
247		$(".agencies-wrap .owl-carousel").owlCarousel({
248			margin:30,
249			loop: true,			
250			autoplay:true,
251			responsive: {
252				0: {
253					margin:15,
254					items: 3
255				},
256				639: {
257					items: 4
258				},
259				767: {
260					items: 5
261				},
262				1023: {
263					items: 6
264				},
265				1176: {
266					items: 8
267				}
268			}
269		});
270		
271		if(($("#listingsearchform").length >
271 0) && (typeof mCustomScrollbar === 'function'))
272			try {
273				if (typeof $(this).addressLookup === 'function')
274				$(".blsearchwhere").addressLookup({
275					"input": "#listingsearchform input[name=addr_search]"
276				});
277				if($("#name_search"))
278				$("#name_search").autocomplete({
279				  source: function (request, response) {
280					$.post(ajaxurl, $("#listingsearchform").serialize() + "&action=bepro_ajax_get_title", function(data){
281						response(data);
282					}, "json");
283				  },
284				  minLength: 2
285				});
286			
287			} catch (e) {
288				console.log(e);
289			}
290		
291		
292		
293		// When the user scrolls the page, execute scrollPosTest 
294		window.onscroll = function() {scrollPosTest()};
295		
296		
297	}); // end ready
298	
299	function update_pagination(theme_num_results){
300		curr_num_results = $(".bl_frontend_search_section span .bpll_listing").length;
301		theme_selected_page = $(".pagination li a.selected span").html();
302		if(curr_num_results > 0){
303			if(theme_selected_page){
304				theme_num_start = (theme_num_results * theme_selected_page) - theme_num_results + 1;
305				theme_num_end = theme_num_start + curr_num_results - 1;
306			}else{
307				theme_num_start = 1;
308				theme_num_end = $('#bl_total_results').html();
309			}
310		}else{
311			theme_num_start = 0;
312			theme_num_end = 0;
313		}
314		$('#search-num-results').html("Showing "+ theme_num_start + " to " + theme_num_end + " of " + $('#bl_total_results').html() + " Results");
315	}
316	
317
318	// Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position
319	function scrollPosTest() {
320		navbar = document.getElementById("masthead");
321		sticky = navbar.offsetTop + 10;
322	  if (window.pageYOffset >= sticky) {
323		navbar.classList.add("sticky")
324	  } else {
325		navbar.classList.remove("sticky");
326	  }
327	}
328		
329	
330})(jQuery);
331
332
333//about us page
334
335var win = {x:0,y:0, m:767};
336function scrn_viewport() {
337    var e = window, a = 'inner';
338    if (!('innerWidth' in window )) {
339        a = 'client';
340        e = document.documentElement || document.body;
341    }
342    return { width : e[ a+'Width' ] , height : e[ a+'Height' ] };
343}
344
345function setWinProp(){
346	var vp = scrn_viewport();
347	win.x = vp.width;
348	win.y = vp.height;
349}
350
351(function($){	
352	$(document).ready(function() {
353		setWinProp();
354		
355		$('.mapBox').click(function () {
356			$('.mapBox iframe').css("pointer-events", "auto");
357		});
358		
359		var owl = $('.whowe .owl-carousel');
360		owl.owlCarousel({
361			margin:30,
362			loop: true,
363			responsive: {
364				0: {
365					items: 1
366				},
367				600: {
368					items: 2,
369					nav:true
370				},
371				1000: {
372					items: 3,
373					nav:true
374				}
375			}
376		})
377				
378		tabControl();
379	});
380	
381	$(window).on('load',function(){
382		reInitMe();
383		
384	}).on('resize', function(e) {
385		setWinProp();
386		reInitMe();
387	});
388	
389	function tabControl() {
390		$('.tabBtns').each(function(i,TB){
391			$('li > a',TB).on('click', function(e) {
392				e.preventDefault();
393				e.trgt = $(this).attr('href');
394				$(this.parentNode).addClass('active').siblings().removeClass('active');
395				$(e.trgt).addClass('active').siblings().removeClass('active');
396				return false;
397			});
398		});
399		
400		$('.tabItems').each(function(i,TI){
401			$('.tabItem').on('click', function(e){
402				if( win.x <= win.m ){ //!$('.tabBtns').is(':visible')){
403					if( $(e.target).closest('.tabCont').length == 0 ){
404						if( $(this).hasClass('active') ){
405							$(this).removeClass('active');
406							$('.tabBtns li a[href$="#'+ this.id +'"]').parent().removeClass('active');
407						}else{
408							$(this).addClass('active');//.siblings().removeClass('active');
409							$('.tabBtns li a[href$="#'+ this.id +'"]').parent().addClass('active').siblings().removeClass('active'); //last clicked!
410						}
411					}
412				}
413			});
414		});
415	}
416
417	var tmrInit = false;
418	function reInitMe(){
419		if(tmrInit)
420			clearTimeout(tmrInit);
421		tmrInit = setTimeout(function(){
422			
423			//---Tab switch---
424			if( win.x > win.m ){ //open only the last clicked;
425				if( $('.tabBtns li.active').length >0 )
426					$('.tabBtns li.active').eq(0).children('a').trigger('click');
427				else
428					$('.tabBtns li:eq(0) > a').trigger('click');
429			}
430			
431		},100);
432	}
433})(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.