PageSourceSearch

https://www.cohostmarket.com/js/customJs.js?v=1791155993

js cohostmarket.com collected 2026-10-04 23:20:03 UTC 14,979 bytes, 372 lines download raw bytes

1function CalanderUpdate(e, t, o) {
2    $("#calander_listing").show(), $(".pric").hide();
3    var a = e.value,
4        l = $("#saved").val();
5    $.ajax({
6        type: "post",
7        url: baseURL + "site/product/saveDetailPage",
8        data: {
9            catID: a,
10            title: t,
11            chk: o
12        },
13        complete: function (e) {
14            $("#imgmsg_" + t).hide(), $("#imgmsg_" + t).show().text(l)
15        }
16    })
17}
18
19function CalanderUpdate_some(e, t, o) {
20    $("#calander_listing").show(), $(".pric").show();
21    var a = e.value,
22        l = $("#saved").val();
23    $.ajax({
24        type: "post",
25        url: baseURL + "site/product/saveDetailPage",
26        data: {
27            catID: a,
28            title: t,
29            chk: o
30        },
31        complete: function (e) {
32            $("#imgmsg_" + t).hide(), $("#imgmsg_" + t).show().text(l)
33        }
34    })
35}
36
37function Detaillist(e, t, o) {
38    var a = e.value;
39    $.ajax({
40        type: "post",
41        url: baseURL + "site/product/Save_Listing_Details",
42        data: {
43            catID: t,
44            title: a,
45            chk: o
46        },
47        complete: function () {
48            $("#imgmsg_" + t).hide(), $("#imgmsg_" + t).show().text("Saved")
49        }
50    })
51}
52
53function experienceDetailview(e, t, o) {
54    var a = e.value;
55    no_ajax = 0, "video_url" == o && (/^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}/.test(a) ? $("#VideoError").html("") : ($("#video_url").val(""), $("#VideoError").html("Please enter a valid URL."), no_ajax = 1)), 0 == no_ajax && $.ajax({
56        type: "post",
57        url: baseURL + "site/experience/saveDetailPage",
58        data: {
59            catID: t,
60            title: a,
61            chk: o
62        },
63        complete: function () {
64            $("#imgmsg_" + t).hide(), $("#imgmsg_" + t).show().text("Saved")
65        }
66    })
67}
68
69function Detailview(e, t, o) {
70    var a = e.value,
71        l = $("#saved").val();
72    $.ajax({
73        type: "post",
74        url: baseURL + "site/product/saveDetailPage",
75        data: {
76            catID: t,
77            title: a,
78            chk: o
79        },
80        complete: function (e) {
81            $("#imgmsg_" + t).hide(), $("#imgmsg_" + t).show().text(l)
82        }
83    })
84}
85
86function fillInAddress() {
87    var e = autocomplete.getPlace();
88    $("#latitude").val(e.geometry.location.lat()), $("#longitude").val(e.geometry.location.lng());
89    for (var t = 0; t < e.address_components.length; t++) {
90        var o = e.address_components[t].types[0];
91        if (componentForm[o]) {
92            var a = e.address_components[t][componentForm[o]];
93            "route" == o ? $("#address").val(a) : "locality" == o ? $("#city").val(a) : "administrative_area_level_1" == o ? $("#state").val(a) : "country" == o ? $("#country").val(a) : "postal_code" == o && $("#post_code").val(a)
94        }
95    }
96}
97
98function boot_success_alert(e) {
99    $("#model-alert-success").modal(), $("#alert_message_content_success").text(e)
100}
101
102function boot_alert(e) {
103    // $("#model-alert").modal(), $("#alert_message_content").text(e)
104    $("#model-alert").modal(), $("#alert_message_content").html(e);
105}
106$(document).ready(function () {
107    ! function () {
108
109        if (userPlanTypesCheckCust == '1' && (getIPInfoMaster >= '2' || getIPInfoWithoutLoginMaster >= '2')) {
110            console.log('loc check 1');
111        } else if (userPlanTypesCheckCust == '' && (getIPInfoMaster >= '2' || getIPInfoWithoutLoginMaster >= '2')) {
112            console.log('loc check 2');
113        } else {
114
115            console.log('loc check 3');
116            //console.log(userIsLogin);
117
118            if (userIsLogin == 'yes') {
119
120                var e = new google.maps.places.Autocomplete(document.getElementById("autocomplete"), {
121                    types: ["geocode"]
122                }),
123                    t = "explore_cohost?city=";
124                0 == IsExpriencePage && (t = "explore_cohost?city=");
125                e.addListener("place_changed", function () {
126                    var e = $("#autocomplete").val();
127                    // window.location = BaseURL + t + e
128                });
129            } else {
130
131
132                console.log("Checking whithout login");
133
134                $('#autocomplete').on("input", function () {
135                    //var dInput = this.value;
136                    //console.log("Check for not login user limit");
137                    searchLimitsCheckData()
138                        .then(function (data) {
139                            //console.log("Received Data:", data);
140                            if (data.limitsCounter > 3) {
141                                $("#signIn").modal('show');
142
143                                $("#autocomplete").val("").prop("disabled", true);
144
145                                // Remove Google Autocomplete event listener
146                                google.maps.event.clearInstanceListeners(autocomplete);
147
148                                return false;
149                            }
150                        })
151                        .catch(function (error) {
152                            console.error("Error fetching data:", error);
153                        });
154                    //$("#signIn").modal('show');
155                });
156
157                var e = new google.maps.places.Autocomplete(document.getElementById("autocomplete"), {
158                    types: ["geocode"]
159                }),
160                    t = "explore_cohost?city=";
161                0 == IsExpriencePage && (t = "explore_cohost?city=");
162
163                e.addListener("place_changed", function () {
164                    console.log("place_changed");
165                    updateSearchLimit();
166                    var e = $("#autocomplete").val();
167                    // window.location = BaseURL + t + e
168                });
169
170
171                // $('#autocomplete').on("input", function () {
172                //     //var dInput = this.value;
173                //     $("#signIn").modal('show');
174                // });
175
176            }
177        }
178    }(),
179        function () {
180
181            if (userPlanTypesCheckCust == '1' && (getIPInfoMaster >= '2' || getIPInfoWithoutLoginMaster >= '2')) {
182                console.log('loc check 1-1');
183            } else if (userPlanTypesCheckCust == '' && (getIPInfoMaster >= '2' || getIPInfoWithoutLoginMaster >= '2')) {
184                console.log('loc check 1-2');
185            } else {
186
187                console.log('loc check 1-3');
188                var e = new google.maps.places.Autocomplete(document.getElementById("headautocomplete"), {
189                    types: ["geocode"]
190                });
191                IsExpriencePage;
192                (0 == IsHomePage) && e.addListener("place_changed", function () {
193                    $("#headautocomplete").val();
194                })
195
196            }
197        }(),
198        function () {
199            // console.log('dddddddd');
200
201            if (userPlanTypesCheckCust != '1') {
202                // console.log('dddd'+userPlanTypes);
203                var autcom = $("#autocomplete-admin").val();
204
205                if (autcom != '') {
206                    // console.log('ddd');
207                    var e = new google.maps.places.Autocomplete(document.getElementById("autocomplete-admin"), {
208                        types: ["geocode"]
209                    });
210                    IsExpriencePage;
211                    (0 == IsHomePage) && e.addListener("place_changed", function () {
212                        $("#autocomplete-admin").val();
213                    })
214                }
215            }
216        }(), $("body").click(function (e) {
217            1 == $(e.target).closest(".searchLocation").length && "" == $(".searchInput").val() ? $(".exploreDetail").show() : $(".exploreDetail").hide()
218        }), $(document).on("click", ".toggleFooter", function () {
219            $("footer").slideToggle(200), $(this).toggleClass("closeIcon"), $(this).hasClass("closeIcon") ? $(this).html('<i class="fa fa-times" aria-hidden="true"></i> Close') : $(this).html('<i class="fa fa-globe" aria-hidden="true"></i>
219 Language and Currency')
220        }), $(document).on("click", ".inc", function () {
221            var e = $(this).prev(".guestVal").val();
222            $(this).prev(".guestVal").val(++e)
223        }), $(document).on("click", ".dec", function () {
224            var e = $(this).next(".guestVal").val();
225            0 != e && $(this).next(".guestVal").val(--e)
226        }), $(document).on("click", ".toggleMore", function () {
227            $(this).prevAll(".more").toggleClass("active")
228        }), $(document).keyup(function (e) {
229            27 == e.keyCode && $(".exploreDetail").hide()
230        }), $(".fixedContainer a").click(function () {
231            $("html, body").animate({
232                scrollTop: $($.attr(this, "href")).offset().top - 60
233            }, 500)
234        }), $(".goToLoc").click(function () {
235            $("html, body").animate({
236                scrollTop: $($.attr(this, "href")).offset().top
237            }, 500)
238        }), $(document).on("click", ".lightboxBanner, .closeLightBox", function () {
239            $("#lightBox").toggleClass("active")
240        }), $(".showResult").click(function () {
241            $(this).next(".guestInfo").toggle(), $(this).children(".arrow").toggleClass("active")
242        }), $(document).on("click", ".tRB", function () {
243            $(".toggleRequestBook").slideToggle(200)
244        }), $(document).on("hidden.bs.modal", function (e) {
245            $(".modal:visible").length && $("body").addClass("modal-open")
246        }), $(".signupOpen").click(function () {
247            $(".hide_signUp").hide(), $(".SignupBlock").show()
248        }), $(".showPass").click(function () {
249            "password" == $(".password_l").attr("type") ? ($(".password_l").prop("type", "text"), $(this).text("Hide Password")) : ($(".password_l").prop("type", "password"), $(this).text("Show Password"))
250        }), $(document).on("click", ".menuArrow", function () {
251            $(".menuArrow .icon").toggleClass("active"), $(".responsiveMenu").slideToggle(300)
252        }), $(document).on("click", ".toggleMenuD", function () {
253            $(this).toggleClass("change");
254            var e = $(".leftSlideBlock");
255            e.hasClass("active") ? e.animate({
256                left: "-100%"
257            }, "100").removeClass("active") : (e.addClass("active"), e.animate({
258                left: "0px"
259            }, "100"))
260        }), $(document).on("click", ".toggleNotes", function () {
261            $(".rightBlock").toggle("100")
262        }), $(".allowGuest").change(function () {
263            $(this).is(":checked") ? ($(".togglePreapprove").hide(), $(".allowGuest").not($(this)).prop("checked", !1), $(this).parent().parent().next(".togglePreapprove").show()) : $(".togglePreapprove").hide()
264        })
265});
266
267$(document).ready(function () {
268
269    handleMobileCollapse();
270
271    // set slider for sibde bar menus
272
273    // Initialize Slick on mobile
274    if ($('#mobile-sideBarMenu').length) {
275        if ($(window).width() <= 768) {
276            $('#mobile-sideBarMenu').slick({
277                infinite: false,         // Enable infinite scrolling
278                slidesToShow: 1.7,        // Show 1 slide at a time
279                slidesToScroll: 1,      // Scroll 1 slide at a time
280                arrows: false,           // Enable navigation arrows
281                dots: false,             // Show dots for navigation
282                // centerMode: true,       // Center the current slide
283                variableWidth: false,    // Allow variable width of items
284                focusOnSelect: true,     // Focus on the selected slide
285                responsive: [
286                    {
287                        breakpoint: 426, // screen width <= 768
288                        settings: {
289                            slidesToShow: 1.7
290                        }
291                    },
292                    {
293                        breakpoint: 768, // screen width <= 768
294                        settings: {
295                            slidesToShow: 1.7
296                        }
297                    }
298                ]
299            });
300        }
301
302        // Reinitialize Slick on window resize
303        $(window).resize(function () {
304
305            /** jquery for custom accordians base class is : mobile-accords-only */
306            handleMobileCollapse();
307
308            if ($(window).width() <= 768) {
309                if (!$('#mobile-sideBarMenu').hasClass('slick-initialized')) {
310                    $('#mobile-sideBarMenu').slick({
311                        infinite: false,
312                        slidesToShow: 1.5,
313                        slidesToScroll: 1,
314                        arrows: false,
315                        dots: false,
316                        // centerMode: true,
317                        variableWidth: false,
318                        focusOnSelect: true,     // Focus on the selected slide
319                        responsive: [
320                            {
321                                breakpoint: 426, // screen width <= 768
322                                settings: {
323                                    slidesToShow: 1.7
324                                }
325                            },
326                            {
327                                breakpoint: 768, // screen width <= 768
328                                settings: {
329                                    slidesToShow: 2.7
330                                }
331                            }
332                        ]
333                    });
334                }
335            } else {
336                if ($('#mobile-sideBarMenu').hasClass('slick-initialized')) {
337                    $('#mobile-sideBarMenu').slick('unslick'); // Destroy Slick if window is resized to larger than mobile
338                }
339            }
340        });
341    }
342});
343
344function handleMobileCollapse() {
345    var main_custom_accord_elment = $('.mobile-accords-only');
346
347    if ($(window).width() <= 768) {
348        // Collapse the panel on mobile screens
349
350
351        if (main_custom_accord_elment.length) {
352            main_custom_accord_elment.find('.panel-title a').prop('disabled', false);
353            main_custom_accord_elment.find('.panel-collapse.collapse').removeClass('in');
354            main_custom_accord_elment.find('.panel-title a').attr("aria-expanded", "false");
355        }
356    } else {
357
358
359        if (main_custom_accord_elment.length) {
360
361            main_custom_accord_elment.find('.panel-title a').prop('disabled', true);
362            main_custom_accord_elment.find('.panel-title a').off('click').on('click', function (event) {
363                event.preventDefault(); // Prevent the default action (panel toggle)
364            });
365
366            if (!main_custom_accord_elment.find('.panel-collapse.collapse').hasClass('in')) {
367                main_custom_accord_elment.find('.panel-collapse.collapse').addClass('in');
368                main_custom_accord_elment.find('.panel-title a').attr("aria-expanded", "true");
369            }
370        }
371    }
372}

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.