PageSourceSearch

https://landmark-canada.com/wp-content/themes/landmark/mw-properti…/mw-properties-public.js?ver=1791595988

js landmark-canada.com collected 2026-10-10 01:33:48 UTC 44,115 bytes, 1,004 lines download raw bytes

1(function ($) {
2    'use strict';
3
4    function popupCenter(pageURL, title) {
5        window.open(pageURL, '_self', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no');
6    }
7
8    $.fn.isInViewport = function () {
9        var elementTop = $(this).offset().top;
10        var elementBottom = elementTop + $(this).outerHeight();
11
12        var viewportTop = $(window).scrollTop();
13        var viewportBottom = viewportTop + $(window).height();
14
15        return elementBottom > viewportTop && elementTop < viewportBottom;
16    };
17
18    window.MW = window.MW || {};
19
20    MW.mapStyles = [{
21        "featureType": "water",
22        "elementType": "geometry",
23        "stylers": [{"color": "#e9e9e9"}, {"lightness": 17}]
24    }, {
25        "featureType": "landscape",
26        "elementType": "geometry",
27        "stylers": [{"color": "#f5f5f5"}, {"lightness": 20}]
28    }, {
29        "featureType": "road.highway",
30        "elementType": "geometry.fill",
31        "stylers": [{"color": "#ffffff"}, {"lightness": 17}]
32    }, {
33        "featureType": "road.highway",
34        "elementType": "geometry.stroke",
35        "stylers": [{"color": "#ffffff"}, {"lightness": 29}, {"weight": 0.2}]
36    }, {
37        "featureType": "road.arterial",
38        "elementType": "geometry",
39        "stylers": [{"color": "#ffffff"}, {"lightness": 18}]
40    }, {
41        "featureType": "road.local",
42        "elementType": "geometry",
43        "stylers": [{"color": "#ffffff"}, {"lightness": 16}]
44    }, {"featureType": "poi", "elementType": "geometry", "stylers": [{"color": "#f5f5f5"}, {"lightness": 21}]}, {
45        "featureType": "poi.park",
46        "elementType": "geometry",
47        "stylers": [{"color": "#dedede"}, {"lightness": 21}]
48    }, {
49        "elementType": "labels.text.stroke",
50        "stylers": [{"visibility": "on"}, {"color": "#ffffff"}, {"lightness": 16}]
51    }, {
52        "elementType": "labels.text.fill",
53        "stylers": [{"saturation": 36}, {"color": "#333333"}, {"lightness": 40}]
54    }, {"elementType": "labels.icon", "stylers": [{"visibility": "off"}]}, {
55        "featureType": "transit",
56        "elementType": "geometry",
57        "stylers": [{"color": "#f2f2f2"}, {"lightness": 19}]
58    }, {
59        "featureType": "administrative",
60        "elementType": "geometry.fill",
61        "stylers": [{"color": "#fefefe"}, {"lightness": 20}]
62    }, {
63        "featureType": "administrative",
64        "elementType": "geometry.stroke",
65        "stylers": [{"color": "#fefefe"}, {"lightness": 17}, {"weight": 1.2}]
66    }];
67
68    MW.new_map = function ($el, cluster) {
69        var $markers = $el.find('.marker');
70        var args = {
71            zoom: 16,
72            center: new google.maps.LatLng(0, 0),
73            mapTypeId: google.maps.MapTypeId.ROADMAP,
74            styles: MW.mapStyles
75        };
76        var map = new google.maps.Map($el[0], args);
77
78        map.markers = [];
79        map.windows = [];
80        $markers.each(function () {
81            MW.add_marker($(this), map);
82        });
83
84        if (cluster)
85            new MarkerClusterer(map, map.markers, {imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
86
87        MW.center_map(map);
88
89        google.maps.event.addListener(map, "click", function (event) {
90            for (var i = 0; i < map.windows.length; i++) {
91                map.windows[i].close();
92            }
93        });
94
95        return map;
96
97    };
98
99    MW.add_marker = function ($marker, map) {
100        var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));
101
102        var marker = new google.maps.Marker({
103            position: latlng,
104            map: map,
105            icon: realEstateJs.pluginUrl + "/img/marker.png"
106        });
107        map.markers.push(marker);
108
109        if ($marker.html()) {
110            var infowindow = new google.maps.InfoWindow({
111                content: $marker.html()
112            });
113            map.windows.push(infowindow);
114            google.maps.event.addListener(marker, 'click', function () {
115                infowindow.open(map, marker);
116            });
117        }
118    };
119
120    MW.center_map = function (map) {
121
122        // vars
123        var bounds = new google.maps.LatLngBounds();
124
125        // loop through all markers and create bounds
126        $.each(map.markers, function (i, marker) {
127
128            var latlng = new google.maps.LatLng(marker.position.lat(), marker.position.lng());
129
130            bounds.extend(latlng);
131
132        });
133
134        // only 1 marker?
135        if (map.markers.length === 1) {
136            // set center of map
137            map.setCenter(bounds.getCenter());
138            map.setZoom(12);
139        } else {
140            // fit to bounds
141            map.fitBounds(bounds);
142        }
143
144    };
145
146    MW.initGoogleMap = function (id, lat, lng, streetView) {
147        var position = new google.maps.LatLng(lat, lng);
148        var image = realEstateJs.pluginUrl + "img/marker.png";
149        var mapOptions = {
150            zoom: 15,
151            scrollwheel: false,
152            center: position,
153            styles: MW.mapStyles,
154        };
155        var mapElement = document.getElementById(id);
156        var map = new google.maps.Map(mapElement, mapOptions);
157        if (streetView !== "") {
158            var streetViewService = new google.maps.StreetViewService(),
159                panorama = map.getStreetView(),
160                streetViewMaxDistance = 100;
161
162            streetViewService.getPanoramaByLocation(position, streetViewMaxDistance, function (streetViewPanoramadata, status) {
163
164                if (status === google.maps.StreetViewStatus.OK) {
165
166                    var oldPoint = position;
167                    position = streetViewPanoramadata.location.latLng;
168
169                    var heading = google.maps.geometry.spherical.computeHeading(position, oldPoint);
170
171                    panorama.setPosition(position);
172                    panorama.setPov({
173                        heading: heading,
174                        zoom: 1,
175                        pitch: 0
176                    });
177                    panorama.setVisible(true);
178
179                } else {
180                    $(this).text("Sorry! Street View is not available.");
181                    // no street view available in this range, or some error occurred
182                }
183            });
184        } else
185            new google.maps.Marker({position: position, map: map, icon: image});
186        return map;
187    };
188
189    MW.calculateLoan = function () {
190        var price = jQuery("#montant").val(), miseDeFond05 = price * 0.05, miseDeFond10 = price * 0.1,
191            miseDeFond15 = price * 0.15, miseDeFond20 = price * 0.2, downPayment = jQuery("#downpayment"),
192            mortgageInsurance = jQuery("#mortgageInsurance"), totalMortgage = jQuery("#totalMortgage"),
193            totalMortgagePayment = jQuery("#totalMortgagePayment"), mortgageRate = jQuery("#mortgageRate"),
194            frequency = jQuery("#frequency"), amortization = jQuery("#amortization"),
195            transferTax = jQuery("#transferTax");
196        downPayment.find("td:nth-child(3) span").html(MW.formatCurrency(miseDeFond05));
197        downPayment.find("td:nth-child(4) span").html(MW.formatCurrency(miseDeFond10));
198        downPayment.find("td:nth-child(5) span").html(MW.formatCurrency(miseDeFond15));
199        downPayment.find("td:nth-child(6) span").html(MW.formatCurrency(miseDeFond20));
200        var mortgageInsurance05 = (price - miseDeFond05) * 0.036, mortgageInsurance10 = (price - miseDeFond10) * 0.024,
201            mortgageInsurance15 = (price - miseDeFond15) * 0.018, mortgageInsurance20 = 0;
202        mortgageInsurance.find("td:nth-child(3)").html(MW.formatCurrency(mortgageInsurance05));
203        mortgageInsurance.find("td:nth-child(4)").html(MW.formatCurrency(mortgageInsurance10));
204        mortgageInsurance.find("td:nth-child(5)").html(MW.formatCurrency(mortgageInsurance15));
205        mortgageInsurance.find("td:nth-child(6)").html(MW.formatCurrency(mortgageInsurance20));
206        var totalMortgage05 = (price - miseDeFond05 + mortgageInsurance05),
207            totalMortgage10 = (price - miseDeFond10 + mortgageInsurance10),
208            totalMortgage15 = (price - miseDeFond15 + mortgageInsurance15), totalMortgage20 = price - miseDeFond15;
209        totalMortgage.find("td:nth-child(3)").html(MW.formatCurrency(totalMortgage05));
210        totalMortgage.find("td:nth-child(4)").html(MW.formatCurrency(totalMortgage10));
211        totalMortgage.find("td:nth-child(5)").html(MW.formatCurrency(totalMortgage15));
212        totalMortgage.find("td:nth-child(6)").html(MW.formatCurrency(totalMortgage20));
213        totalMortgagePayment.find("td:nth-child(3)").attr("amount", totalMortgage05);
214        totalMortgagePayment.find("td:nth-child(4)").attr("amount", totalMortgage10);
215        totalMortgagePayment.find("td:nth-child(5)").attr("amount", totalMortgage15);
216        totalMortgagePayment.find("td:nth-child(6)").attr("amount", totalMortgage20);
217        for (var i = 3; i <= 6; i++) {
218            var N = amortization.find("td:nth-child(" + i + ") select").val() * frequency.find("td:nth-child(" + i + ") select").val();
219            var I = mortgageRate.find("td:nth-child(" + i + ") input").val() / 100 / frequency.find("td:nth-child(" + i + ") select").val();
220            var amount = totalMortgagePayment.find("td:nth-child(" + i + ")").attr("amount");
221            totalMortgagePayment.find("td:nth-child(" + i + ")").html(MW.formatCurrency(MW.monthlyPayment(amount, N, I)));
222        }
223        transferTax.find("td:nth-child(3)").html(MW.formatCurrency(MW.getTransferTax(price, false)));
224        transferTax.find("td:nth-child(4)").html(MW.formatCurrency(MW.getTransferTax(price, true)));
225    };
226
227    MW.getTransferTax = function (amount, in_montreal) {
228        in_montreal = (typeof (in_montreal) === 'undefined') ? false : in_montreal;
229        var parts = [], lResult = 0;
230        parts.push((amount > 50000 ? 50000 : amount) * 0.005);
231        if (amount > 50000) {
232            parts.push((amount > 250000 ? 200000 : amount - 50000) * 0.01);
233            if (in_montreal) {
234                if (amount > 250000) parts.push((amount > 500000 ? 250000 : amount - 250000) * 0.015);
235                if (amount > 500000) parts.push((amount - 500000) * 0.02);
236            } else if (amount > 250000) parts.push((amount - 250000) * 0.015);
237        }
238        for (var i = 0; i < parts.length; i++) lResult += parts[i];
239        return lResult;
240    };
241
242    MW.formatCurrency = function (total) {
243        var neg = false;
244        if (total < 0) {
245            neg = true;
246            total = Math.abs(total);
247        }
248        return (neg ? "-$" : '$') + parseFloat(total).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString();
249    };
250
251    MW.monthlyPayment = function (p, n, i) {
252        return p * i * (Math.pow(1 + i, n)) / (Math.pow(1 + i, n) - 1);
253    };
254
255    MW.getRandomColor = function () {
256        var letters = '0123456789ABCDEF'.split('');
257        var color = '#';
258        for (var i = 0; i < 6; i++) {
259            color += letters[Math.floor(Math.random() * 16)];
260        }
261        return color + "AA";
262    };
263
264    /*Demographics*/
265    MW.getDemographics = function (id, lat, lng) {
266        $(id).css('opacity', 0.5).append(MW.loader);
267        //Chart.defaults.global.elements.arc.borderWidth = 1;
268        $.getJSON(`/wp-content/themes/landmark/demographics.php?lat=${lat}&lng=${lng}`, function (data) {
269            if (data) {
270                console.log(data);
271                if (document.getElementById("nio-marital")) {
272                    var martial_data = data.maritalStatus.data.map(function (obj) {
273                        return obj.value;
274                    });
275                    var martial_labels = data.maritalStatus.data.map(function (obj) {
276                        return obj.key;
277                    });
278                    console.log(martial_data);
279                    var ctx_marital = document.getElementById("nio-marital").getContext("2d");
280                    var maritalChart = new Chart(ctx_marital, {
281                        type: "doughnut",
282                        data: {
283                            labels: martial_labels,
284                            datasets: [{
285                                backgroundColor: Array.from({length: martial_data.length}, () => MW.getRandomColor()),
286                                data: martial_data
287                            }]
288                        },
289                        options: {
290                            legend: {
291                                display: true,
292                                labels: {
293                                    fontColor: 'rgb(255, 99, 132)'
294                                },
295                                position: "bottom"
296                            },
297                        }
298                    });
299                }
300
301                if (document.getElementById("nio-age")) {
302                    var age_data = data.age.data.map(function (obj) {
303                        return obj.value;
304                    });
305                    var age_labels = data.age.data.map(function (obj) {
306                        return obj.key;
307                    });
308                    //console.log(age_data);
309                    var ctx_marital_bar = document.getElementById("nio-age").getContext("2d");
310                    var maritalChartBar = new Chart(ctx_marital_bar, {
311                        type: "bar",
312                        data: {
313                            labels: age_labels,
314                            datasets: [{
315                                backgroundColor: Array.from({length: age_data.length}, () => MW.getRandomColor()),
316                                data: age_data
317                            }]
318                        },
319                        options: {
320                            legend: {
321                                display: false
322                            },
323                        }
324                    });
325                }
326                if (document.getElementById("nio-householdincome")) {
327                    var income_data = data.income.data.map(function (obj) {
328                        return obj.value;
329                    });
330                    var income_labels = data.income.data.map(function (obj) {
331                        return obj.key;
332                    });
333                    //console.log(income_data);
334                    var ctx_marital_pie = document.getElementById("nio-householdincome").getContext("2d");
335                    var maritalChartPie = new Chart(ctx_marital_pie, {
336                        type: "pie",
337                        data: {
338                            labels: income_labels,
339                            datasets: [{
340                                backgroundColor: Array.from({length: income_data.length}, () => MW.getRandomColor()),
341                                data: income_data
342                            }]
343                        },
344                        options: {
345                            legend: {
346                                display: true,
347                                labels: {
348                                    fontColor: 'rgb(255, 99, 132)'
349                                },
350                                position: "bottom"
351                            },
352                        }
353                    });
354                }
355                if (document.getElementById("nio-commonlanguages")) {
356                    var mothertounge_data = data.motherTongue.data.map(function (obj) {
357                        return obj.value;
358                    });
359                    var mothertounge_labels = data.motherTongue.data.map(function (obj) {
360                        return obj.key;
361                    });
362                    //console.log(income_data);
363                    var ctx_languages = document.getElementById("nio-commonlanguages").getContext("2d");
364                    var languagesChart = new Chart(ctx_languages, {
365                        type: "pie",
366                        data: {
367                            labels: mothertounge_labels,
368                            datasets: [{
369                                backgroundColor: Array.from({length: mothertounge_data.length}, () => MW.getRandomColor()),
370                                data: mothertounge_data
371                            }]
372                        },
373                        options: {
374                            legend: {
375                                display: true,
376                                labels: {
377                                    fontColor: 'rgb(255, 99, 132)'
378                                },
379                                position: "bottom"
380                            },
381                        }
382                    });
383                }
384                if (document.getElementById("nio-education")) {
385                    var education_data = data.education.data.map(function (obj) {
386                        return obj.value;
387                    });
388                    var education_labels = data.education.data.map(function (obj) {
389                        return obj.key;
390                    });
391                    var ctx_education = document.getElementById("nio-education").getContext("2d");
392                    var educationChart = new Chart(ctx_education, {
393                        type: "doughnut",
394                        data: {
395                            labels: education_labels,
396                            datasets: [{
397                                backgroundColor: Array.from({length: education_data.length}, () => MW.getRandomColor()),
398                                data: education_data
399                            }]
400                        },
401                        options: {
402                            legend: {
403                                display: true,
404                                labels: {
405                                    fontColor: 'rgb(255, 99, 132)'
406                                },
407                                position: "bottom"
408                            },
409                        }
410                    });
411                }
412                if (document.getElementById("nio-immigration")) {
413                    var immigration_data = data.ageImmigration.data.map(function (obj) {
414                        return obj.value;
415                    });
416                    var immigration_labels = data.ageImmigration.data.map(function (obj) {
417                        return obj.key;
418                    });
419                    var ctx_immigration = document.getElementById("nio-immigration").getContext("2d");
420                    var immigrationChart = new Chart(ctx_immigration, {
421                        type: "doughnut",
422                        data: {
423                            labels: immigration_labels,
424                            datasets: [{
425                                backgroundColor: Array.from({length: immigration_data.length}, () => MW.getRandomColor()),
426                                data: immigration_data
427                            }]
428                        },
429                        options: {
430                            legend: {
431                                display: true,
432                                labels: {
433                                    fontColor: 'rgb(255, 99, 132)'
434                                },
435                                position: "bottom"
436                            },
437                        }
438                    });
439                }
440                if (document.getElementById("nio-ownership")) {
441                    var ownership_data = data.ownership.data.map(function (obj) {
442                        return obj.value;
443                    });
444                    var ownership_labels = data.ownership.data.map(function (obj) {
445                        return obj.key;
446                    });
447                    //console.log(ownership_data);
448                    var ctx_ownership = document.getElementById("nio-ownership").getContext("2d");
449                    var ownershipChart = new Chart(ctx_ownership, {
450                        type: "doughnut",
451                        data: {
452                            labels: ownership_labels,
453                            datasets: [{
454                                backgroundColor: Array.from({length: ownership_data.length}, () => MW.getRandomColor()),
455                                data: ownership_data
456                            }]
457                        },
458                        options: {
459                            legend: {
460                                display: true,
461                                labels: {
462                                    fontColor: 'rgb(255, 99, 132)'
463                                },
464                                position: "bottom"
465                            },
466                        }
467                    });
468                }
469                if (document.getElementById("nio-employment")) {
470                    var employment_data = data.employment.data.map(function (obj) {
471                        return obj.value;
472                    });
473                    var employment_labels = data.employment.data.map(function (obj) {
474                        return obj.key;
475                    });
476                    //console.log(employment_data);
477                    var ctx_employment = document.getElementById("nio-employment").getContext("2d");
478                    var employmentChart = new Chart(ctx_employment, {
479                        type: "bar",
480                        data: {
481                            labels: employment_labels,
482                            datasets: [{
483                                backgroundColor: Array.from({length: employment_data.length}, () => MW.getRandomColor()),
484                                data: employment_data
485                            }]
486                        },
487                        options: {
488                            legend: {
489                                display: false
490                            },
491                        }
492                    });
493                }
494                if (document.getElementById("nio-constructiondate")) {
495                    var constructiondate_data = data.construction.data.map(function (obj) {
496                        return obj.value;
497                    });
498                    var constructiondate_labels = data.construction.data.map(function (obj) {
499                        return obj.key;
500                    });
501                    //console.log(constructiondate_data);
502                    var ctx_constructiondate = document.getElementById("nio-constructiondate").getContext("2d");
503                    var constructiondate = new Chart(ctx_constructiondate, {
504                        type: "line",
505                        data: {
506                            labels: constructiondate_labels,
507                            datasets: [{
508                                backgroundColor: Array.from({length: constructiondate_data.length}, () => MW.getRandomColor()),
509                                data: constructiondate_data
510                            }]
511                        },
512                        options: {
513                            legend: {
514                                display: false,
515                                labels: {
516                                    fontColor: 'rgb(255, 99, 132)'
517                                },
518                                position: "bottom"
519                            },
520                        }
521                    });
522                }
523                if (document.getElementById("nio-transportationtowork")) {
524                    var transportationtowork_data = data.workTransportation.data.map(function (obj) {
525                        return obj.value;
526                    });
527                    var transportationtowork_labels = data.workTransportation.data.map(function (obj) {
528                        return obj.key;
529                    });
530                    //console.log(transportationtowork_data);
531                    var ctx_transportationtowork = document.getElementById("nio-transportationtowork").getContext("2d");
532                    var transportationtowork = new Chart(ctx_transportationtowork, {
533                        type: "doughnut",
534                        data: {
535                            labels: transportationtowork_labels,
536                            datasets: [{
537                                backgroundColor: Array.from({length: transportationtowork_data.length}, () => MW.getRandomColor()),
538                                data: transportationtowork_data
539                            }]
540                        },
541                        options: {
542                            legend: {
543                                display: true,
544                                labels: {
545                                    fontColor: 'rgb(255, 99, 132)'
546                                },
547                                position: "bottom"
548                            },
549                        }
550                    });
551                }
552                if (document.getElementById("nio-worklocation")) {
553                    var worklocation_data = data.workLocation.data.map(function (obj) {
554                        return obj.value;
555                    });
556                    var worklocation_labels = data.workLocation.data.map(function (obj) {
557                        return obj.key;
558                    });
559                    //console.log(worklocation_data);
560                    var ctx_worklocation = document.getElementById("nio-worklocation").getContext("2d");
561                    var worklocation = new Chart(ctx_worklocation, {
562                        type: "doughnut",
563                        data: {
564                            labels: worklocation_labels,
565                            datasets: [{
566                                backgroundColor: Array.from({length: worklocation_data.length}, () => MW.getRandomColor()),
567                                data: worklocation_data
568                            }]
569                        },
570                        options: {
571                            legend: {
572                                display: true,
573                                labels: {
574                                    fontColor: 'rgb(255, 99, 132)'
575                                },
576                                position: "bottom"
577                            },
578                        }
579                    });
580                }
581                if (document.getElementById("nio-gender")) {
582                    var gender_data = data.gender.data.map(function (obj) {
583                        return obj.value;
584                    });
585                    var gender_labels = data.gender.data.map(function (obj) {
586                        return obj.key;
587                    });
588                    //console.log(gender_data);
589                    var ctx_gender = document.getElementById("nio-gender").getContext("2d");
590                    var gender = new Chart(ctx_gender, {
591                        type: "doughnut",
592                        data: {
593                            labels: gender_labels,
594                            datasets: [{
595                                backgroundColor: Array.from({length: gender_data.length}, () => MW.getRandomColor()),
596                                data: gender_data
597                            }]
598                        },
599                        options: {
600                            legend: {
601                                display: true,
602                                labels: {
603                                    fontColor: 'rgb(255, 99, 132)'
604                                },
605                                position: "bottom"
606                            },
607                        }
608                    });
609                }
610                if (document.getElementById("nio-dwellings")) {
611                    var dwellings_data = data.occupiedDwellings.data.map(function (obj) {
612                        return obj.value;
613                    });
614                    var dwellings_labels = data.occupiedDwellings.data.map(function (obj) {
615                        return obj.key;
616                    });
617                    //console.log(dwellings_data);
618                    var ctx_dwellings = document.getElementById("nio-dwellings").getContext("2d");
619                    var dwellings = new Chart(ctx_dwellings, {
620                        type: "doughnut",
621                        data: {
622                            labels: dwellings_labels,
623                            datasets: [{
624                                backgroundColor: Array.from({length: dwellings_data.length}, () => MW.getRandomColor()),
625                                data: dwellings_data
626                            }]
627                        },
628                        options: {
629                            legend: {
630                                display: true,
631                                labels: {
632                                    fontColor: 'rgb(255, 99, 132)'
633                                },
634                                position: "bottom"
635                            },
636                        }
637                    });
638                }
639
640            } else {
641                $(id).collapse('hide');
642            }
643            $(id).css('opacity', 1);
644            $(".css3-spinner-zig-zag").remove();
645        });
646    };
647    /*demographics end*/
648
649    (function ($) {
650        MW.mixer = $(".mix-container");
651        MW.filter = !!$("#filter-wrapper").offset();
652        MW.pager = !!$("#pagination-wrapper").offset();
653        MW.map = !!$("#map").offset();
654        MW.mixOptions = {};
655        MW.$wrapper = $(".mw-properties-container");
656        MW.loader = '<div class="css3-spinner-zig-zag"><div class="bgcolor"></div><div class="bgcolor"></div></div>';
657        MW.keyupTimeout;
658
659        if (!!MW.mixer.offset()) {
660            MW.mixOptions = {
661                animation: {
662                    duration: 500,
663                    nudge: true,
664                    reverseOut: false,
665                    effects: "fade translateX(20%) translateZ(-100px) rotateX(90deg) stagger(100ms)"
666                },
667                selectors: {
668                    control: '.mixitup-control'
669                },
670                load: {
671                    filter: '.all'
672                }
673            };
674
675            if (MW.pager)
676                MW.mixOptions.pagination = {
677                    limit: 6,
678                };
679
680            MW.mixer.each(function (idx, mixer) {
681                console.debug(mixer);
682                mixer.mixer = mixitup(mixer, MW.mixOptions);
683                mixer.mixer.filter('.all');
684            });
685        }
686
687        /*if (!!$(".swiper-slide").offset()) {
688            var menuButton = document.querySelector('.menu-button');
689            var mySwiper = new Swiper('.swiper-menu', {
690                slidesPerView: 'auto',
691                watchSlidesProgress: true,
692                watchSlidesVisibility: true,
693                initialSlide: 1,
694                resistanceRatio: 0,
695                slideToClickedSlide: false,
696                pagination: false,
697                scrollbar: false,
698                on: {
699                    init: function () {
700                        menuButton.addEventListener('click', function () {
701                            if (mySwiper.slideTo(0)) {
702                                menuButton.classList.add('cross');
703                            } else {
704                                mySwiper.slideTo(1);
705                                menuButton.classList.remove('cross');
706                            }
707                        }, true);
708                    }
709                }
710            });
711            var mySwiperSlider = new Swiper('.swiper-slider', {
712                direction: 'vertical',
713                lazy: true,
714                loop: false,
715                effect: 'coverflow',
716                mousewheel: true,
717                resistanceRatio: 0,
718                slideToClickedSlide: true,
719                pagination: {
720                    el: '.swiper-pagination',
721                },
722                scrollbar: {
723                    el: '.swiper-scrollbar',
724                },
725                on: {
726                    slideChangeTransitionEnd: function () {
727                        $(".swiper-slider .fadeInLeft").removeClass("fadeInLeft");
728                        $(".swiper-slider .swiper-slide-active .swiper-caption").addClass("fadeInLeft");
729                    }
730                }
731            });
732            var mySwiperThumbs = new Swiper('.swiper-thumbs', {
733                direction: 'vertical',
734                lazy: true,
735                loop: false,
736                slidesPerView: 8,
737                slidesPerGroup: 4,
738                mousewheel: true,
739                resistanceRatio: 0,
740                slideToClickedSlide: true,
741                pagination: {
742                    el: '.swiper-pagination',
743                },
744                scrollbar: {
745                    el: '.swiper-scrollbar',
746                },
747                breakpoints: {
748                    320: {
749                        slidesPerView: 3,
750                    },
751                    480: {
752                        slidesPerView: 3,
753                    },
754                    640: {
755                        slidesPerView: 3,
756                    }
757                }
758            });
759            $(".swiper-thumbs .swiper-slide").click(function (e) {
760                menuButton.classList.remove('cross');
761                mySwiper.slideTo(1);
762                mySwiperSlider.slideTo($(e.currentTarget).index());
763            });
764        }*/
765
766        if (!!$('.slick-slider').offset())
767            $('.slick-slider').each(function (idx, item) {
768                this.id = "carousel" + idx;
769                $(this).slick({
770                    infinite: true,
771                    slidesToShow: 3,
772                    slidesToScroll: 2,
773                    dots: true,
774                    prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-chevron-left" aria-hidden="true"></i></button>',
775                    nextArrow: '<button type="button" class="slick-next"><i class="fa fa-chevron-right" aria-hidden="true"></i></button>',
776                    responsive: [
777                        {
778                            breakpoint: 1024,
779                            settings: {
780                                slidesToShow: 3,
780
781                                slidesToScroll: 2,
782                                dots: true,
783                                infinite: true
784                            }
785                        },
786                        {
787                            breakpoint: 600,
788                            settings: {
789                                slidesToShow: 2,
790                                slidesToScroll: 1,
791                                dots: true,
792                                infinite: true
793                            }
794                        },
795                        {
796                            breakpoint: 480,
797                            settings: {
798                                slidesToShow: 1,
799                                slidesToScroll: 1,
800                                dots: true,
801                                infinite: true
802                            }
803                        }
804                    ]
805                });
806            });
807
808        if (!!$('.camera_wrap').offset())
809            $('.camera_wrap').each(function () {
810                $(this).camera({
811                    playPause: false,
812                    hover: false,
813                    loader: false,
814                    pagination: false,
815                    thumbnails: true,
816                    transPeriod: 1000
817                });
818            });
819
820
821        $("#search-props").on('submit', function (e) {
822            e.preventDefault();
823            $("#search-props").find("button[type=submit]").html("<i class='fa fa-refresh fa-spin fa-2x fa-fw'></i>");
824            MW.$wrapper = $(".mix-container");
825            MW.$wrapper.css('opacity', 0.5).append(MW.loader);
826            MW.$wrapper.load(window.location + "?" + $("#search-props").serialize() + " .mix-container > *", function (html) {
827                $(".css3-spinner-zig-zag").remove();
828                MW.$wrapper.css('opacity', 1);
829                if (MW.pager || MW.filter) {
830                    $("#search-props").find("button[type=submit]").html("<i class='fa fa-search fa-2x fa-fw'></i>");
831                    MW.mixer.destroy(true);
832                    MW.mixer = mixitup('#mix-container', MW.mixOptions);
833                }
834                if (typeof MW.propertiesMap !== 'undefined') {
835                    MW.propertiesMap = MW.new_map($("#map"), MW.propertiesMap.cluster);
836                }
837            });
838        });
839
840        $(function () {
841            let property_link = $('.property-link');
842            if (Cookies.get('favorites') === undefined) {
843                Cookies.set('favorites', []);
844            }
845            if (Cookies.get('comparable') === undefined) {
846                Cookies.set('comparable', []);
847            }
848
849            let comps = Cookies.getJSON('comparable');
850            if (comps.length > 0) {
851                $("#compare-props").slideDown();
852                $("#compare-props .total").text(comps.length);
853            }
854            let favs = Cookies.getJSON('favorites');
855            if (favs.length > 0) {
856                $("#favorites").slideDown();
857                $('#favorites .favorites-count').text('(' + favs.length + ')');
858            }
859
860            $('body').on('click', '.icoFav', function (e) {
861                e.preventDefault();
862                let favs = Cookies.getJSON('favorites'),
863                    prop = {
864                        mls: $(this).data("id").toString(),
865                    };
866
867                favs.push(prop);
868                Cookies.set('favorites', favs);
869
870                $(this).toggleClass("icoFav noFav");
871                $(this).find("i").toggleClass('fa-heart-o fa-heart');
872
873                if ($(this).is("[title]"))
874                    $(this).tooltip('dispose').attr('title', 'Remove from favorites').tooltip('show');
875                else {
876                    $(this).html($(this).html().replace("Ajouter à", "Enlever de").replace("Add to", "Remove from"));
877                }
878
879                favs = Cookies.getJSON('favorites');
880
881                if (favs.length > 0) {
882                    $('#favorites .favorites-count').text('(' + favs.length + ')');
883                    $("#favorites").slideDown();
884                } else {
885                    $("#favorites").slideUp();
886                }
887
888                $(this).trigger("change");
889            });
890
891            $('body').on('click', '.noFav', function (e) {
892                e.preventDefault();
893                let favs = Cookies.getJSON('favorites'),
894                    prop = {
895                        mls: $(this).data("id").toString(),
896                    };
897
898                Cookies.set('favorites', favs.filter((el) => {
899                    return el.mls !== prop.mls;
900                }));
901
902                $(this).toggleClass("icoFav noFav");
903                $(this).find("i").toggleClass('fa-heart-o fa-heart');
904
905                if ($(this).is("[title]")) {
906                    $(this).tooltip('dispose').attr('title', 'Add to favorites').tooltip('show');
907                } else {
908                    $(this).html($(this).html().replace("Ajouter à", "Enlever de").replace("Add to", "Remove from"));
909                }
910
911                favs = Cookies.getJSON('favorites');
912                if (favs.length > 0) {
913                    $('#favorites .favorites-count').text('(' + favs.length + ')');
914                    $("#favorites").slideDown();
915                } else {
916                    $("#favorites").slideUp();
917                }
918
919                $(this).trigger("change");
920            });
921
922            $('body').on('click', '.icoComp', function (e) {
923                e.preventDefault();
924                let favs = Cookies.getJSON('comparable'),
925                    prop = {
926                        mls: $(this).data("id").toString(),
927                    };
928
929                favs.push(prop);
930                Cookies.set('comparable', favs);
931
932                $(this).toggleClass("icoComp noComp");
933                $(this).find("i").toggleClass('fa-check fa-file-alt');
934
935                if ($(this).is("[title]")) {
936                    $(this).tooltip('dispose').attr('title', 'Added').tooltip('show');
937                } else {
938                    $(this).html($(this).html().replace("Ajouter à", "Enlever de").replace("Add to", "Remove from"));
939                }
940
941                $(this).trigger("change");
942
943                favs = Cookies.getJSON('comparable');
944                if (favs.length > 0) {
945                    $("#compare-props .total").text(favs.length);
946                    $("#compare-props").slideDown();
947                } else {
948                    $("#compare-props").slideUp();
949                }
950            });
951
952            $('body').on('click', '.noComp', function (e) {
953                e.preventDefault();
954                let favs = Cookies.getJSON('comparable'),
955                    prop = {
956                        mls: $(this).data("id").toString(),
957                    };
958
959                Cookies.set('comparable', favs.filter((el) => {
960                    return el.mls !== prop.mls;
961                }));
962
963                $(this).toggleClass("icoComp noComp");
964                $(this).find("i").toggleClass('fa-check fa-file-alt');
965
966                if ($(this).is("[title]"))
967                    $(this).tooltip('dispose').attr('title', 'Compare').tooltip('show');
968                else {
969                    $(this).html($(this).html().replace("Ajouter à", "Enlever de").replace("Add to", "Remove from"));
970                }
971
972                $(this).trigger("change");
973                favs = Cookies.getJSON('comparable');
974                if (favs.length > 0) {
975                    $("#compare-props .total").text(favs.length);
976                    $("#compare-props").slideDown();
977                } else {
978                    $("#compare-props").slideUp();
979                }
980            });
981
982            $('body').on('click', '.clear-comparable', function (e) {
983                e.preventDefault();
984                Cookies.set('comparable', []);
985
986                $("#compare-props").slideUp();
987                //$(".tools-container .noComp i.fa-check").toggleClass('fa-file-alt');
988            });
989        });
990
991
992        var $calculator = $("#calculForm");
993        $calculator.submit(function (e) {
994            e.preventDefault();
995            MW.calculateLoan();
996            $("#calculation-table").fadeIn();
997        });
998        $("#calculation-table-form input, #calculation-table-form select").on("blur change", function () {
999            MW.calculateLoan();
1000        });
1001
1002    })(jQuery);
1003
1004})(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.