1(function ($) { 2 $(document).on('click', '.location-row a.tatsu-button', function() { 3 $(this).parent().next().find('.the-signup').slideToggle(); 4 }); 5 6 $(document).ready(function() { 7 // Add 'loaded' class to body 8 window.onload = function() { 9 document.body.className += ' loaded' 10 }; 11 12 // DESKTOP: Create URL structure based on selections made in dream counter search bar 13 $('.desktop-search-bar-row .home-search-bar form').submit(function(e) { 14 e.preventDefault(); 15 16 var hsr_results = $(".desktop-search-bar-row .home-search-bar form :input") 17 .filter(function(index, element) { 18 return $(element).val() != ''; 19 }) 20 .serialize(); 21 22 var equals = hsr_results.replace(/\=/g, '/'); 23 var amp = equals.replace(/\&/g, '/'); 24 window.location.href = "https://inventory.agmimports.com/"+amp; 25 }); 26 27 // MOBILE: Create URL structure based on selections made in dream counter search bar 28 $('.mobile-sp-form .home-search-bar form').submit(function(e) { 29 e.preventDefault(); 30 31 var hsr_results = $(".mobile-sp-form .home-search-bar form :input") 32 .filter(function(index, element) { 33 return $(element).val() != ''; 34 }) 35 .serialize(); 36 37 var equals = hsr_results.replace(/\=/g, '/'); 38 var amp = equals.replace(/\&/g, '/'); 39 window.location.href = "https://inventory.agmimports.com/"+amp; 40 }); 41 42 //Open header popup notification 43 $('.custom-top-bar').on('click', '.middle li:last-of-type', function() { 44 $('.header-popup').fadeIn('slow'); 45 }); 46 47 //Close header popup notifiction 48 $('.custom-top-bar').on('click', '.hp-close', function() { 49 $('.header-popup').fadeOut('slow'); 50 }); 51 52 // Get custom height of popup content area and update 'bottom' value 53 var hpheight = $('.header-popup').outerHeight(); 54 $('.header-popup').css('bottom', -Math.abs(hpheight)); 55 56 57 58 // Check to see if a header notification exists 59 if ($('#header-top-bar .middle li a').length) { 60 61 } 62 else { 63 $('#header-top-bar').css('visibility', 'hidden'); 64 } 65 66 /* --------------------------------------------------------- 67 Footer Notice Bar 68 --------------------------------------------------------- */ 69 70 // Function to set a cookie 71 function setCookie(name, value, days) { 72 var expires = ""; 73 if (days) { 74 var date = new Date(); 75 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 76 expires = "; expires=" + date.toUTCString(); 77 } 78 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 79 } 80 81 // Function to get a cookie 82 function getCookie(name) { 83 var nameEQ = name + "="; 84 var ca = document.cookie.split(';'); 85 for (var i = 0; i < ca.length; i++) { 86 var c = ca[i]; 87 while (c.charAt(0) === ' ') c = c.substring(1, c.length); 88 if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); 89 } 90 return null; 91 } 92 93 // Check if the cookie exists when the document is ready 94 if (!getCookie('noticeClosed')) { 95 // If the cookie doesn't exist, add the animation class 96 $('.footer-notice-bar').addClass('footer-notice-bar-animate'); 97 } 98 99 // Close the Footer Notice Bar 100 $('.footer-notice-bar-close').on('click', function() { 101 // Fade out the notice bar and set a cookie when closed 102 $('.footer-notice-bar').fadeOut('slow', function() { 103 $(this).addClass('notice-closed'); 104 // Set a cookie for 24 hours upon closing the notice bar
105 setCookie('noticeClosed', 'true', 1); 106 }); 107 }); 108 109 }); 110}(jQuery)); 111
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.