1/* 2 * AIT WordPress Theme 3 * 4 * Copyright (c) 2012, Affinity Information Technology, s.r.o. (http://ait-themes.com) 5 */ 6/* Main Initialization Hook */ 7jQuery(document).ready(function(){ 8 gm_authFailure = function(){ 9 var apiBanner = document.createElement('div'); 10 var a = document.createElement('a'); 11 var linkText = document.createTextNode("Read more"); 12 a.appendChild(linkText); 13 a.title = "Read more"; 14 a.href = "https://www.ait-themes.club/knowledge-base/google-maps-api-error/"; 15 a.target = "_blank"; 16 17 apiBanner.className = "alert alert-info"; 18 var bannerText = document.createTextNode("Please check Google API key settings"); 19 apiBanner.appendChild(bannerText); 20 apiBanner.appendChild(document.createElement('br')); 21 apiBanner.appendChild(a); 22 23 jQuery(".google-map-container").html(apiBanner); 24 }; 25 26 /* menu.js initialization */ 27 desktopMenu(); 28 responsiveMenu(); 29 relocateSiteTools(); 30 /* menu.js initialization */ 31 32 /* portfolio-item.js initialization */ 33 portfolioSingleToggles(); 34 /* portfolio-item.js initialization */ 35 36 /* custom.js initialization */ 37 renameUiClasses(); 38 removeUnwantedClasses(); 39 40 initWPGallery(); 41 initColorbox(); 42 initRatings(); 43 //initInfieldLabels(); 44 initSelectBox(); 45 46 notificationClose(); 47 /* custom.js initialization */ 48 49 /* Theme Dependent FIX Functions */ 50 /* LANGWITCH */ 51 fixLanguageMenu(); 52 fixWooCart(); 53 /* LANGWITCH */ 54 /* Theme Dependent FIX Functions */ 55}); 56/* Main Initialization Hook */ 57 58/* Window Resize Hook */ 59jQuery(window).resize(function(){ 60 relocateSiteTools(); 61}); 62/* Window Resize Hook */ 63 64/* Theme Dependenent Fix Functions */ 65// Langwitch | Language Dropdown 66function fixLanguageMenu(){ 67 if(isResponsive(640)){ 68 // only run at 640px- 69 jQuery('.language-icons a.current-lang').bind('touchstart MSPointerDown', function(){ 70 if(jQuery('.language-icons').hasClass('menu-opened')){ 71 jQuery('.language-icons .language-icons__list').hide(); 72 } else { 73 jQuery('.language-icons .language-icons__list').show(); 74 } 75 jQuery('.language-icons').toggleClass('menu-opened'); 76 77 return false; 78 }); 79 } 80} 81 82// WooCommerce Cart 83function fixWooCart(){ 84 var $cartWrapper = jQuery('#ait-woocommerce-cart-wrapper'); 85 var $cart = $cartWrapper.find('#ait-woocommerce-cart'); 86 87 if(isResponsive(768)){ 88 if($cart.children().length){ 89 $cartWrapper.unbind('hover'); 90 $cartWrapper.find('.cart-header').bind('touchstart MSPointerDown mousedown', function(e){ 91 e.stopPropagation(); 92 e.preventDefault(); 93 if(!$cartWrapper.hasClass('hover')){ 94 $cart.css({display: 'block'}).stop().animate({opacity: 1}); 95 } else { 96 $cart.stop().animate({opacity: 0}, function(){ 97 $cart.css({display:'none'}); 98 }); 99 } 100 $cartWrapper.toggleClass('hover'); 101 }); 102 } 103 } else { 104 if($cart.children().length){ 105 $cartWrapper.hover( 106 function(){ 107 $cartWrapper.addClass('hover'); 108 }, 109 function(){ 110 $cartWrapper.removeClass('hover'); 111 } 112 ); 113 } 114 } 115} 116/* Theme Dependenent Fix 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.