PageSourceSearch

https://thebosleyteam.com/wp-content/themes/bosleyteam/js/scripts.js

js thebosleyteam.com collected 2026-10-04 07:12:50 UTC 8,594 bytes, 285 lines download raw bytes

1( function() {
2
3	var app = {
4		
5		initNavigation: function() {
6			var $nav = jQuery( '#nav' );
7			if ( $nav.length > 0 ) $nav.navTabDoubleTap();
8		},
9		initFixedNav: function() {
10			if( jQuery(window).scrollTop() > 1 && jQuery(window).width() > 991  ) {
11				if ( !jQuery('.header').hasClass('active') ) jQuery('.header').addClass('active');
12				if ( !jQuery('body').hasClass('scrolled') ) jQuery('body').addClass('scrolled');
13			} else {
14				jQuery('.header').removeClass('active');
15				jQuery('body').removeClass('scrolled');
16			}
17		},
18		initExpandedMenu: function() {
19			var $expandedMenu = jQuery('.expanded-menu-wrapper');
20			var $body = jQuery('body');
21			jQuery('.ex-nav-trigger').click(function(){
22				$body.addClass('no-scroll');
23				$expandedMenu.addClass('active');
24				setTimeout(function(){
25					var $hero = jQuery('#hero').outerHeight();
26					if(!$body.hasClass('scrolled')){
27						$expandedMenu.height($hero);
28					} else {
29						$expandedMenu.removeAttr('style');
30					}
31				}, 300);
32			});
33
34			jQuery('.expanded-menu-whitespace, .close-btn').click(function(){
35				$expandedMenu.removeClass('active');
36				$body.removeClass('no-scroll');
37			});
38		},
39		initExpandedMenuHeight: function(){
40			if(jQuery(window).width() > 991){
41				var $hero = jQuery('#hero').outerHeight();
42				
43				if(!jQuery('body').hasClass('scrolled')){
44					jQuery('.expanded-menu-wrapper').height($hero);
45				} else {
46					jQuery('.expanded-menu-wrapper').removeAttr('style');
47				}
48			} else {
49				jQuery('.expanded-menu-wrapper').removeClass('active');
50				jQuery('body').removeClass('no-scroll');
51			}
52		},
53		initHelpBubble: function() {
54			jQuery('.chat-bubble').click(function(){
55				jQuery('.bubble-chat-form').fadeIn();
56			});
57
58			jQuery('.bubble-close-btn i').click(function(){
59				jQuery('.bubble-chat-form').fadeOut();
60			});
61		},
62		initFeaturedProperties: function() {
63			/* Put featured properties code here */
64		},
65		initFeaturedCommunities: function() {
66			/* Put featured communities code here */
67            if(window.location.href.indexOf('/communities/') > -1 || (window.location.href.indexOf('/foreclosures/') > -1) || (window.location.href.indexOf('/rentals/') > -1) || (window.location.href.indexOf('/single-family-homes/') > -1)){
68				jQuery(".dropdown.sort-dropdown").click(function(){
69				   jQuery('.dropdown.sort-dropdown').toggleClass("open");
70				});
71			}
72		},
73		initSocialMediaTabs: function() {
74
75			this.initSocialMediaCarousel();
76
77			var $tabBtn = jQuery('.social-media-tabs span');
78			var $tabContent = jQuery('.social-media-gallery .gallery-content');
79
80			$tabBtn.click(function(){
81				$tabBtn.removeClass('active');
82				$tabContent.removeClass('active');
83
84				var $targetTab = jQuery(this).attr('data-target');
85
86				jQuery(this).addClass('active');
87				jQuery('div[class="gallery-content"][data-tab="'+$targetTab+'"]').addClass('active');
88				app.initSocialMediaCarousel();
89			});
90		},
91		initSocialMediaCarousel: function() {
92			// jQuery('.gallery-carousel').slick('unslick');
93			if(jQuery('.gallery-carousel').hasClass('slick-initialized')){
94				jQuery('.gallery-carousel').slick('unslick');
95			}
96
97			jQuery('.gallery-carousel').slick({
98				infinite: true,
99				slidesToShow: 3,
100				slidesToScroll: 1,
101				autoplay: false,
102				autoplaySpeed: 5000,
103				dots: false,
104				arrows: false,
105				rows: false,
106				pauseOnHover: true,
107				responsive: [
108				    {
109				      breakpoint: 769,
110				      settings: {
111				        slidesToShow: 2,
112				        slidesToScroll: 1,
113				      }
114				    },
115				    {
116				      breakpoint: 569,
117				      settings: {
118				        slidesToShow: 1,
119				        slidesToScroll: 1
120				      }
121				    }
122				  ]
123			});
124		},
125		initTestimonials: function() {
126			jQuery('.testimonials-list').slick({
127				infinite: true,
128				slidesToShow: 1,
129				slidesToScroll: 1,
130				autoplay: true,
131				autoplaySpeed: 5000,
132				dots: false,
133				arrows: true,
134				rows: false,
135				fade: true,
136				pauseOnHover: true,
137				nextArrow: jQuery('.testimonials-control .testi-next'),
138  				prevArrow: jQuery('.testimonials-control .testi-prev'),
139			});
140		},
141		initQuickSearch: function() {
142			/* Put quick search code here */
143		},
144		initFloatingVideo: function() {
145			
146			jQuery('.floating-video-ads-wrap').addClass('active');
147
148			jQuery('.floating-video-ads-close button').click(function(){
149				jQuery('.floating-video-ads-wrap').removeClass('active');	
150				jQuery('.floating-video-ads-video').removeClass('muted-false');
151			    jQuery('.floating-video-ads-video video').prop('muted', true);			
152			})
153
154			jQuery('.floating-video-ads-video button').click(function(){
155
156				if (!jQuery('.floating-video-ads-video').hasClass('muted-false')) {
157					jQuery('.floating-video-ads-video').addClass('muted-false');
158			    	jQuery('.floating-video-ads-video video').prop('muted', false);
159				}else{
160					jQuery('.floating-video-ads-video').removeClass('muted-false');
161			    	jQuery('.floating-video-ads-video video').prop('muted', true);
162				}
163				
164				jQuery(this).find('span').toggleClass('ai-font-volume-a ai-font-mute');
165			})
166
167		},
168		initFixedALT: function(){
169			if(jQuery('.single-communities').length){
170				jQuery('.listings-disclaimer img').attr('alt', 'IDX Logo');
171			}
172		},
173		initOptin: function(){
174
175			var _optin_verbiage = 'By checking this box, I agree to receive customer care, account notification and marketing SMS messages from the Bolsey Team at phone number provided above. The SMS frequency may vary. Data rates may apply. For assistance Reply HELP, Reply STOP to opt out of receiving SMS messages. <a href="/privacy-policy/">Visit our privacy policy and SMS terms and conditions for more details</a>';
176    
177			if(!jQuery('form#ihf-user-registration-create-form .ihf-modal-submit').hasClass('optin-appended')){
178			jQuery('form#ihf-user-registration-create-form .ihf-modal-submit').prepend('<p>'+_optin_verbiage+'</p>');
179			jQuery('form#ihf-user-registration-create-form .ihf-modal-submit').addClass('optin-appended');
180			}
181			if(!jQuery('.ihf-modal-form-disclaimer').hasClass('optin-appended')){
182			jQuery('.ihf-modal-form-disclaimer').append('<br><br>'+_optin_verbiage);
183			jQuery('.ihf-modal-form-disclaimer').addClass('optin-appended');
184			}
185			if(!jQuery('form#ihf-valuation-request-form span.help-block').hasClass('optin-appended')){
186			jQuery('form#ihf-valuation-request-form span.help-block').append('<br><br>'+_optin_verbiage);
187			jQuery('form#ihf-valuation-request-form span.help-block').addClass('optin-appended');
188			}
189			
190			if(!jQuery('#ihf-email-alert-popup-form .ihf-captcha').hasClass('optin-appended')){
191			jQuery('#ihf-email-alert-popup-form .ihf-captcha').append('<br><br>'+_optin_verbiage);
192			jQuery('#ihf-email-alert-popup-form .ihf-captcha').addClass('optin-appended');
193			}
194			
195
196			jQuery('.site-optin').each(function() {
197				var this_optin = jQuery(this);
198		
199				jQuery(this).find('input[type="checkbox"]').on('change', function() {
200					if(jQuery(this).is(':checked')) {
201						this_optin.find('input[name="consent"]').val('I agree');
202					} else {
203						this_optin.find('input[name="consent"]').val('I don\'t agree');
204					}
205				});
206			});
207		}
208		
209	}
210
211	
212	jQuery(document).ready( function() {
213		
214		/* Initialize navigation */
215		app.initNavigation();
216
217		/* Initialize fixed nav */
218		app.initFixedNav();
219
220		/* Initialize expanded menu */
221		app.initExpandedMenu();
222
223		/* Initialized Help Bubble */
224		app.initHelpBubble();
225		
226		/* Initialize featured properties */
227		app.initFeaturedProperties();
228
229		/* Initialize featured communities */
230		app.initFeaturedCommunities();
231
232		/* Initiialize Social Media Tab */
233		app.initSocialMediaTabs();
234		
235		/* Initialize testimonials */
236		
237		/* Initialize quick search */
238		app.initQuickSearch();
239
240		app.initFixedALT();
241		app.initOptin();
242		
243		
244	});
245
246	jQuery(window).scroll(function(){
247		/* Initialize fixed nav */
248		app.initFixedNav();
249
250
251	});
252
253	jQuery(window).resize(function(){
254		/* Initialize expanded menu height */
255		app.initExpandedMenuHeight();
256	});
257	
258	jQuery(window).on('load', function(){
259
260		app.initFloatingVideo();
261
262	});
263
264	jQuery(window).one('scroll mousemove touchmove', function(){
265
266	   jQuery('#testimonials-section').css('opacity', 1);
267	   jQuery('#welcome-section, #feauted-communties-section, #app-section, #social-media-section, #footer-contact-wrap, .footer').fadeIn();
268
269		app.initTestimonials();
270
271	   jQuery('.lazy-img').each(function(){
272        var imgsrc = jQuery(this).data('src');
273        jQuery(this).attr('src', imgsrc);
274      });
275
276	   jQuery('.lazy-vid').each(function(){
277        var vidsrc = jQuery(this).data('src');
278        jQuery(this).attr('src', vidsrc);
279      })
280
281	});
282
283
284
285})();

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.