PageSourceSearch

https://vaiduokliai.lt/wp-content/themes/vaiduokliai/js/common.js?1791489939

js vaiduokliai.lt collected 2026-10-08 20:06:13 UTC 4,828 bytes, 170 lines download raw bytes

1jQuery(document).ready(function()
2{
3    // For header menu
4
5    jQuery('.toggle, .close').click(function()
6    {
7        jQuery('.menu-panel').toggleClass('open');
8    });
9
10
11    // For about us in press tabs
12
13    if (jQuery( ".tabs" ).length > 0)
14    {
15        jQuery( ".tabs" ).tabs({active: activeTab});
16    }
17
18
19    // For nice selects
20
21    if (jQuery(".chosen").length > 0)
22    {
23        jQuery(function()
24        {
25            jQuery('.chosen').each(function()
26            {
27                new Select({ el: this, className: jQuery(this).attr('data-className') });
28            });
29        });
30    }
31
32
33    // For offer inner page slider
34
35    if (jQuery(".offer-inner .slider").length > 0)
36    {
37        jQuery('.bxslider').bxSlider(
38            {
39                auto: true,
40                controls: false,
41                default: 4000,
42                speed: 1000,
43                mode: 'fade'
44            }
45        );
46    }
47
48
49    // Truncate offer descriptions
50
51    truncateOfferDescriptions();
52
53
54    // For contacts map
55
56    /**
57     * Data for the markers consisting of a name, a LatLng and a zIndex for
58     * the order in which these markers should display on top of each
59     * other.
60     */
61    if (jQuery('#map-canvas').length > 0)
62    {
63        var places = [
64            ['', latitude,longitude, 1]
65        ];
66
67        var markersArray = [];
68
69
70        function initialize()
71        {
72            var mapOptions = {
73                zoom: 17,
74                center: new google.maps.LatLng(latitude,longitude,17)
75            };
76
77            var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
78
79            setMarkers(map, places);
80
81//            var styles = [
82//                {
83//                    stylers: [
84//                        { hue: "#005A9F" },
85//                        { saturation: -20 }
86//                    ]
87//                }
88//            ];
89//
90//            map.setOptions({styles: styles});
91        }
92
93
94        function setMarkers(map, locations) {
95            // Add markers to the map
96
97            // Marker sizes are expressed as a Size of X,Y
98            // where the origin of the image (0,0) is located
99            // in the top left of the image.
100
101            // Origins, anchor positions and coordinates of the marker
102            // increase in the X direction to the right and in
103            // the Y direction down.
104
105            var image = {
106                url: '/wp-content/themes/vaiduokliai/images/icons/point.png',
107                // This marker is 20 pixels wide by 32 pixels tall.
108                size: new google.maps.Size(24, 24),
109                // The origin for this image is 0,0.
110                origin: new google.maps.Point(0, 0),
111                // The anchor for this image is the base of the flagpole at 0,32.
112                anchor: new google.maps.Point(0, 24)
113            };
114
115            // Shapes define the clickable region of the icon.
116            // The type defines an HTML <area> element 'poly' which
117            // traces out a polygon as a series of X,Y points. The final
118            // coordinate closes the poly by connecting to the first
119            // coordinate.
120
121            var shape = {
122                coords: [1, 1, 1, 20, 18, 20, 18 , 1],
123                type: 'poly'
124            };
125
126            for (var i = 0; i < locations.length; i++) {
127                var place = locations[i];
128                var myLatLng = new google.maps.LatLng(place[1], place[2]);
129                var marker = new google.maps.Marker({
130                    position: myLatLng,
131                    map: map,
132                    icon: image,
133                    shape: shape,
134                    zIndex: place[3]
135                });
136
137                var content = '<div style="text-align: center;"><span style="font-weight: bold;">' + mapTitle + '</span><br />' + mapAddress +'</div>';
138
139                var infowindow = new google.maps.InfoWindow();
140                infowindow.setContent(content);
141                infowindow.open(map, marker);
142
143                markersArray.push(marker);
144            }
145        }
146
147        google.maps.Map.prototype.clearMarkers = function() {
148            for (var i = 0; i < markersArray.length; i++ ) {
149                markersArray[i].setMap(null);
150            }
151            markersArray.length = 0;
152        }
153
154        google.maps.event.addDomListener(window, 'load', initialize);
155
156    }
157
158
159    // For comments
160
161    jQuery('.single-vd_offer .more-posts-button').click(function()
162    {
163        jQuery('.comments-list-wrap').toggleClass('open');
164    });
165
166
167    // For images popups
168
169    jQuery('.gallery-icon a').fancybox();
170});

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.