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 gm_authFailure = function(){ 11 var apiBanner = document.createElement('div'); 12 var a = document.createElement('a'); 13 var linkText = document.createTextNode("Read more"); 14 a.appendChild(linkText); 15 a.title = "Read more"; 16 a.href = "https://www.ait-themes.club/knowledge-base/google-maps-api-error/"; 17 a.target = "_blank"; 18 19 apiBanner.className = "alert alert-info"; 20 var bannerText = document.createTextNode("Please check Google API key settings"); 21 apiBanner.appendChild(bannerText); 22 apiBanner.appendChild(document.createElement('br')); 23 apiBanner.appendChild(a); 24 25 jQuery(".google-map-container").html(apiBanner); 26 }; 27 28 /* menu.js initialization */ 29 desktopMenu(); 30 responsiveMenu(); 31 32 prepareBurgerMenus(burgerMenuData); 33 burgerMenus(burgerMenuData); 34 /* menu.js initialization */ 35 36 /* portfolio-item.js initialization */ 37 portfolioSingleToggles(); 38 /* portfolio-item.js initialization */ 39 40 /* custom.js initialization */ 41 renameUiClasses(); 42 removeUnwantedClasses(); 43 44 initWPGallery(); 45 initColorbox(); 46 initRatings(); 47 initInfieldLabels(); 48 initSelectBox(); 49 50 notificationClose(); 51 /* custom.js initialization */ 52 53 /* Theme Dependent Functions */ 54 // telAnchorMobile(); 55 headerLayoutSize(); 56 57 /* Theme Dependent Functions */ 58}); 59/* Main Initialization Hook */ 60 61jQuery(window).load(function(){ 62 //prepareFitMenu(); 63 //fitMenu(); 64}); 65 66/* Window Resize Hook */ 67jQuery(window).resize(function(){ 68 headerLayoutSize(); 69 70 burgerMenus(burgerMenuData); 71 //fitMenu(); 72}); 73/* Window Resize Hook */ 74 75/* Theme Dependenent Functions */ 76 77 78function getLatLngFromAddress(address){ 79 var geocoder = new google.maps.Geocoder(); 80 geocoder.geocode({'address': address}, function(results, status){ 81 console.log(status); 82 console.log(results[0].geometry.location); 83 return results[0].geometry.location; 84 }); 85 86} 87 88// function telAnchorMobile(){ 89// if (isUserAgent('mobile')) { 90// jQuery("a.phone").each(function() { 91// this.href = this.href.replace(/^callto/, "tel"); 92// }); 93// } 94// } 95 96function headerLayoutSize(){ 97 // check for search form version 98 if(jQuery('body').hasClass('search-form-type-3')){ 99 var $container = jQuery('.header-layout'); 100 var $elementWrap = $container.find('.header-element-wrap'); 101 var $searchWrap = $container.find('.header-search-wrap'); 102 103 if($searchWrap.height() > $elementWrap.height()){ 104 $container.addClass('search-collapsed'); 105 } else { 106 $container.removeClass('search-collapsed'); 107 } 108 } 109} 110 111/* 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.