PageSourceSearch

https://cicloturismoserrasverdes.com.br/wp-content/plugins/wpadverts/assets/js/wpadverts-frontend.js?ver=2.1.7

js cicloturismoserrasverdes.com.br collected 2026-10-02 23:09:30 UTC 8,430 bytes, 266 lines download raw bytes

1var WPADVERTS = WPADVERTS || {};
2
3WPADVERTS.ListSort = function() {
4    this.element = { };
5    this.element.button = jQuery(".adverts-list-sort-button");
6    this.element.options = jQuery(".adverts-list-sort-options");
7    this.element.button.on("click", jQuery.proxy(this.button_clicked, this));
8};
9
10WPADVERTS.ListSort.prototype.button_clicked = function(e) {
11    if( typeof e !== 'undefined' ) {
12        e.preventDefault();
13    }
14    this.element.options.toggle();
15};
16
17jQuery(function($) {
18    if($(".adverts-list-sort-button").length > 0) {
19        new WPADVERTS.ListSort();
20    }
21});
22
23jQuery(function($) {
24    var currentTallest = 0,
25        currentRowStart = 0,
26        rowDivs = new Array(),
27        $el,
28        topPosition = 0;
29
30   $(".adverts-js").show();
31   $(".adverts-no-js").hide();
32
33   $('.advert-post-title a').css('overflow', 'initial').css("height", 'auto');
34   
35   $(".adverts-form-submit").click(function(e) {
36       e.preventDefault();
37       $(this).closest("form").submit();
38   });
39   
40   $('.advert-item .advert-link').each(function() {
41
42    $el = $(this);
43    // added closest(...)
44    var topPostion = $el.closest('.advert-item').position().top;
45
46    if($el.closest('.advert-item').hasClass('advert-item-col-1')) {
47        return;
48    }
49
50    if (currentRowStart != topPostion) {
51        // we just came to a new row.  Set all the heights on the completed row
52        for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
53            rowDivs[currentDiv].height(currentTallest);
54        }
55
56        // set the variables for the new row
57        rowDivs.length = 0; // empty the array
58        currentRowStart = topPostion;
59        currentTallest = $el.height();
60        rowDivs.push($el);
61
62    } else {
63        // another div on the current row.  Add it to the list and check if it's taller
64        rowDivs.push($el);
65        currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
66   }
67
68   // do the last row
69    for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
70        rowDivs[currentDiv].height(currentTallest);
71    }
72   
73   }); 
74  
75   if( $(".wpadverts-slides").length > 0 ) {
76       
77        if(adverts_frontend_lang.lightbox === "1") {
78            $( '.wpadverts-swipe' ).swipebox({
79                afterMedia: function(e) {
80                    $( '#swipebox-container .wpadverts-video-player' ).each(function(index, item) {
81                        var $this = jQuery(item);
82                        
83                        if($this.data("wpadverts-single-player") != "1") {
84                            new WPADVERTS.Single.Player($this);
85                            $this.data("wpadverts-single-player", "1");
86                        }
87                    });
88                }
89            });
90        }
91   }
92   
93   
94    $(".adverts-show-contact").click(function(e) {
95        
96        e.preventDefault();
97        
98        $(".adverts-loader").css("display", "inline-block");
99        //$(".adverts-loader").addClass("animate-spin");
100        
101        var data = {
102            action: 'adverts_show_contact',
103            security: $(this).data("security"),
104            id: $(this).data("id")
105        };
106        
107        $.ajax(adverts_frontend_lang.ajaxurl, {
108            data: data,
109            dataType: 'json',
110            type: 'post',
111            success: function(response) {
112                
113                var phone = "\u2014";
114                var email = "\u2014";
115                
116                if(response.phone) {
117                    phone = $("<a></a>").attr("href", "tel:"+response.phone).html(response.phone);
118                }
119                
120                if(response.email) {
121                    email = $("<a></a>").attr("href", "mailto:"+response.email).html(response.email);
122                }
123                
124                if(response.result == 1) {
125                    $('.adverts-contact-phone').html(phone);
126                    $('.adverts-contact-email').html(email);
127                    $('.adverts-contact-box-toggle').slideToggle("fast");
128                } else {
129                    alert(response.error);
130                }
131                
132
133                $('.adverts-loader').hide();
134                //$(".adverts-loader").removeClass("animate-spin");
135                
136            }
137        });
138        
139
140    });
141    
142    if($(".adverts-show-contact-form").length > 0) {
143        $(".adverts-show-contact-form").click(function(e) {
144            e.preventDefault();
145            $('.adverts-contact-box-toggle').slideToggle("fast");
146        });
147    }
148    
149    if($(".adverts-filter-money").length > 0) {
150        new AutoNumeric(".adverts-filter-money", adverts_currency);
151    }
152    
153    if($(".adverts-form-filters").length > 0) {
154        $(".adverts-form-filters").click(function(e) {
155            e.preventDefault();
156
157            if($(".adverts-advanced-search-icon").hasClass("adverts-icon-down-open")) {
158                $(".adverts-advanced-search-icon").addClass("adverts-icon-up-open");
159                $(".adverts-advanced-search-icon").removeClass("adverts-icon-down-open");
160                if($("#reveal_hidden").length < 1) {
161                    var rh = $('<input type="hidden" name="reveal_hidden" id="reveal_hidden" value="1" />');
162                    $(".adverts-search-form").prepend(rh);
163                }
164            } else {
165                $(".adverts-advanced-search-icon").removeClass("adverts-icon-up-open");
166                $(".adverts-advanced-search-icon").addClass("adverts-icon-down-open");
167                $("#reveal_hidden").remove();
168            }
169            
170            $(".adverts-search-hidden").slideToggle("fast");
171        });
172    }
173    
174    if($("#reveal_hidden").length > 0) {
175        $(".adverts-advanced-search-icon").addClass("adverts-icon-up-open");
176        $(".adverts-advanced-search-icon").removeClass("adverts-icon-down-open");
177        $(".adverts-search-hidden").show();
178    }
179    
180    if($(".adverts-search-form").length > 0) {
181        $(".adverts-search-form").submit(function(e) {
182            $(this).find(":input").filter(function(){ 
183                return !this.value; 
184            }).attr("name", "");
185            
186            return true; // ensure form still submits
187        });
188    }
189    
190    if($(".wpadverts-reveal-phone").length > 0) {
191        $(".wpadverts-reveal-phone .wpadverts-reveal-button").on("click", function(e) {
192            e.preventDefault();
193            
194            var p1 = $(".wpadverts-reveal-partial-1").text();
195            var p2 = $(".wpadverts-reveal-final").data("partial");
196            var p = p1 + p2;
197            
198            $(".wpadverts-reveal-wrap").hide();
199            $(".wpadverts-reveal-final").attr("href", "tel:"+p);
200            $(".wpadverts-reveal-final").text(p);
201            $(".wpadverts-reveal-final").fadeIn("fast");
202            
203            
204        });
205    }
206    
207});
208
209
210/* BLOCK CONTACT DETAILS */
211
212jQuery(function($) {
213    $(".adverts-button.wpadverts-reveal-phone").on("click", function(e) {
214        e.preventDefault();
215
216        if($(this).find(".wpadverts-phone-reveal").length > 0) {
217            return;
218        }
219
220        var phone = $(this).data("ph1") + "" + $(this).data("ph2");
221        location.href='tel:'+phone;
222    });
223
224    $(".adverts-button.wpadverts-show-contact-form").on("click", function(e) {
225        e.preventDefault();
226
227        var $this = $(this);
228
229        if($(".wpadverts-block-contact-box").is(":visible")) {
230            $(".wpadverts-block-contact-box").hide();
231            //window.location.hash = "";
232        } else {
233            $(".wpadverts-block-contact-box").show();
234            window.location.hash = "#wpadverts-block-contact-box";
235        }
236    });
237
238    $(".wpa-sticky-close").on("click", function(e) {
239        e.preventDefault();
240
241        
242        var bg = $(".wpa-utility-sticky-bg");
243        var st = $(".wpa-utility-sticky");
244
245        bg.css("opacity", "0");//.addClass("atw-opacity-100");
246        st.addClass("atw-translate-x-full");
247
248        $(".wpa-utility-sticky-wrap").hide();
249
250    });
251
252    $(".wpadverts-more").on("click", function(e) {
253        e.preventDefault();
254        $(".wpa-contact-more").addClass("atw-bottom-0");
255        $(".wpa-more-bg").show();
256    });
257
258    $(".wpa-more-bg").on("click",function() {
259        $(".wpa-contact-more").removeClass("atw-bottom-0");
260        $(".wpa-more-bg").hide();
261    });
262});
263
264function wpadverts_close_more() {
265
266}

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.