PageSourceSearch

https://pymesbalta.org/wp-content/themes/directory2/design/js/script.js?ver=f08f09510330947bf0cc87e333c1f6b8

js pymesbalta.org collected 2026-10-02 20:08:57 UTC 3,878 bytes, 145 lines download raw bytes

1/*
2 * AIT WordPress Theme
3 *
4 * Copyright (c) 2012, Affinity Information Technology, s.r.o. (http://ait-themes.com)
5 */
6var burgerMenuData = [{selectors: ['.header-container'], reservedSelectors: ['li.menu-item-wrapper']}, {selectors: ['.sticky-menu .grid-main'], reservedSelectors: ['li.menu-item-wrapper', '.sticky-menu .site-logo']}];
7
8/* Main Initialization Hook */
9jQuery(document).ready(function(){
10	window.isFirstLoad640 = isResponsive(640);
11
12	gm_authFailure = function(){
13		var apiBanner = document.createElement('div');
14		var a = document.createElement('a');
15		var linkText = document.createTextNode("Read more");
16		a.appendChild(linkText);
17		a.title = "Read more";
18		a.href = "https://www.ait-themes.club/knowledge-base/google-maps-api-error/";
19		a.target = "_blank";
20
21		apiBanner.className = "alert alert-info";
22		var bannerText = document.createTextNode("Please check Google API key settings");
23		apiBanner.appendChild(bannerText);
24		apiBanner.appendChild(document.createElement('br'));
25		apiBanner.appendChild(a);
26
27		jQuery(".google-map-container").html(apiBanner);
28	};
29
30	/* menu.js initialization */
31	desktopMenu();
32	responsiveMenu();
33	relocateMenuTools();
34
35	setTimeout(() => {
36		prepareBurgerMenus(burgerMenuData, function() {
37			burgerMenus(burgerMenuData)
38		});
39	}, isFirstLoad640 ? '0' : 1000);
40
41	/* menu.js initialization */
42
43	/* portfolio-item.js initialization */
44	portfolioSingleToggles();
45	/* portfolio-item.js initialization */
46
47	/* custom.js initialization */
48	touchFriendlyHover();
49
50	enableResponsiveToggleAreas(true);
51
52	renameUiClasses();
53	removeUnwantedClasses();
54
55	initWPGallery();
56	initColorbox();
57	initRatings();
58	initInfieldLabels();
59	initSelectBox();
60
61	notificationClose();
62	/* custom.js initialization */
63
64	/* Theme Dependent Functions */
65	// telAnchorMobile();
66	headerLayoutSize();
67
68	jQuery(document).on("toggle-search-top", function(e) {
69		setTimeout(function() {
70			var $el = jQuery(".header-search-wrap").parent();
71			if (isScrolledIntoView($el[0])) return;
72			jQuery("html, body").animate({ scrollTop: $el.offset().top}, 300);
73		}, 100);
74	});
75
76	/* Theme Dependent Functions */
77});
78/* Main Initialization Hook */
79
80jQuery(window).load(function(){
81	//prepareFitMenu();
82	//fitMenu();
83	updateSelectboxesOnWoocommerce();
84});
85
86/* Window Resize Hook */
87jQuery(window).resize(function(){
88	headerLayoutSize();
89	relocateMenuTools();
90
91	burgerMenus(burgerMenuData);
92	//fitMenu();
93});
94/* Window Resize Hook */
95
96/* Theme Dependenent Functions */
97
98
99function getLatLngFromAddress(address){
100	var geocoder = new google.maps.Geocoder();
101	geocoder.geocode({'address': address}, function(results, status){
102		console.log(status);
103		console.log(results[0].geometry.location);
104		return results[0].geometry.location;
105	});
106
107}
108
109// function telAnchorMobile(){
110// 	if (isUserAgent('mobile')) {
111// 		jQuery("a.phone").each(function() {
112// 			this.href = this.href.replace(/^callto/, "tel");
113// 		});
114// 	}
115// }
116
117function headerLayoutSize(){
118	// check for search form version
119	if(jQuery('body').hasClass('search-form-type-3')){
120		var $container = jQuery('.header-layout');
121		var $elementWrap = $container.find('.header-element-wrap');
122		var $searchWrap = $container.find('.header-search-wrap');
123
124		if($searchWrap.height() > $elementWrap.height()){
125			$container.addClass('search-collapsed');
126		} else {
127			$container.removeClass('search-collapsed');
128		}
129	}
130}
131
132function isScrolledIntoView(el) {
133    var rect = el.getBoundingClientRect();
134    var elemTop = rect.top;
135    var elemBottom = rect.bottom;
136
137    return (elemTop >= 0) && (elemBottom <= window.innerHeight);
138}
139
140function updateSelectboxesOnWoocommerce(){
141
142	jQuery('.woocommerce.widget_product_categories select').selectbox('detach');
143
144}
145/* Theme Dependenent Function */

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.