PageSourceSearch

https://www.luxuryhomemarketing.com/2025_assets/js/public.js?v=1746109027

js luxuryhomemarketing.com collected 2026-09-24 18:04:29 UTC 4,376 bytes, 134 lines download raw bytes

1$(document).ready(function(){
2    //
3    // // styled selects
4    // $(".styled-select").select2({
5    //     theme: "bootstrap"
6    //     //, minimumResultsForSearch: Infinity
7    // });
8
9    $(function () {
10        $('[data-toggle="popover"]')
11            .on('click',function(e){
12                e.preventDefault();
13            })
14            .popover();
15    });
16
17    // Track if we're on desktop for minimum height application
18    var wasDesktop = window.innerWidth >= 992;
19
20    // Initialize equal height carousel for home testimonials section
21    // Small delay to ensure content is fully rendered
22    setTimeout(function() {
23        equalizeCarouselHeights();
24    }, 100);
25
26    // Recalculate on window resize with debounce for better performance
27    var resizeTimer;
28    $(window).resize(function() {
29        clearTimeout(resizeTimer);
30        resizeTimer = setTimeout(function() {
31            // Check if we crossed the desktop breakpoint
32            var isDesktop = window.innerWidth >= 992;
33            if (wasDesktop !== isDesktop) {
34                // We crossed the breakpoint, update the flag
35                wasDesktop = isDesktop;
36                // Force recalculation since min-height requirement changed
37                equalizeCarouselHeights();
38            } else {
39                // Normal resize within the same breakpoint
40                equalizeCarouselHeights();
41            }
42        }, 250); // Debounce to avoid excessive calculations during resize
43    });
44
45    // Handle image loading which might affect heights
46    $('.home-testimonials img').on('load', function() {
47        equalizeCarouselHeights();
48    });
49
50});
51
52function clearForm() {
53  $(':input', 'form').each(function() {
54    var type = this.type;
55    var tag = this.tagName.toLowerCase(); // normalize case
56
57    if (type == 'text' || type == 'password' || tag == 'textarea'){
58      this.value = "";
59
60    } else if (type == 'checkbox' || type == 'radio'){
61      this.checked = false;
62
63    } else if (tag == 'select'){
64      var reset_value = '';
65      if($(this).is('[multiple]')){
66        reset_value = null;
67      } else {
68        reset_value = $(this).find('option:eq(0)').val();
69      }
70      $(this).val(reset_value).trigger('change');
71    }
72  });
73}
74
75function copy_addresses2(obj) {
76	obj.x_ship_to_first_name.value = obj.x_first_name.value;
77	obj.x_ship_to_last_name.value = obj.x_last_name.value;
78
79	obj.x_ship_to_address.value = obj.x_address.value;
80	obj.x_ship_to_address2.value = obj.x_address2.value;
81	obj.x_ship_to_city.value = obj.x_city.value;
82	obj.x_ship_to_zip.value = obj.x_zip.value;
83
84	$("select[name='x_ship_to_state']").val(obj.x_state.value).trigger("change");
85	$("select[name='x_ship_to_country']").val(obj.x_country.value).trigger("change");
86}
87
88/**
89 * Equalizes the height of all carousel slides in the home-testimonials section
90 * This ensures all slides have the same height regardless of content
91 * Applies a minimum height of 250px on desktop screens (≥ 992px)
92 */
93function equalizeCarouselHeights() {
94    // Target only the carousel in the home-testimonials section
95    var $carousel = $('.home-testimonials .carousel');
96
97    if ($carousel.length === 0) {
98        return; // Exit if carousel doesn't exist on this page
99    }
100
101    // Reset any previously set heights
102    $('.home-testimonials .carousel-item').css('height', '');
103
104    // Get all carousel items
105    var $items = $('.home-testimonials .carousel-item');
106
107    if ($items.length <= 1) {
108        return; // No need to equalize if there's only one slide
109    }
110
111    var maxHeight = 0;
112    var isDesktop = window.innerWidth >= 992; // Check if we're on desktop (≥ 992px)
113    var minHeight = isDesktop ? 250 : 0; // Minimum height of 250px only on desktop
114
115    // Find the tallest item
116    $items.each(function() {
117        var itemHeight = $(this).outerHeight();
118        maxHeight = Math.max(maxHeight, itemHeight);
119    });
120
121    // Apply the greater of maxHeight or minHeight (on desktop)
122    if (maxHeight > 0) {
123        // On desktop, ensure height is at least 250px
124        if (isDesktop) {
125            maxHeight = Math.max(maxHeight, minHeight);
126        }
127        $items.css('height', maxHeight + 'px');
128    }
129
130    // Bind to Bootstrap carousel events to handle dynamic content
131    $carousel.off('slid.bs.carousel').on('slid.bs.carousel', function() {
132        equalizeCarouselHeights();
133    });
134}

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.