$('.js-tabs-title').on('click', function() { var openTab = $(this).data('tab'), linePosition = $(this).position().left; $('.js-tabs-underline').css('transform', 'translateX(' + linePosition + 'px)'); $('.js-tabs-title').removeClass('active'); $(this).addClass('active'); $('.js-tabs-content').removeClass('active'); $(openTab).addClass('active'); }); function printImg(url) { var win = window.open(''); win.document.write(''); win.focus(); } $(window).on("load",function() { $(window).scroll(function() { var windowBottom = $(this).scrollTop() + $(this).innerHeight(); $(".coupon-top-img img").each(function() { /* Check the location of each desired element */ var objectBottom = $(this).offset().top + $(this).outerHeight(); /* If the element is completely within bounds of the window, fade it in */ if (objectBottom < windowBottom) { //object comes into view (scrolling down) if ($(this).css("opacity")==0) {$(this).fadeTo(250,1);$(this).addClass("ford-fadeLeft");} } else { //object goes out of view (scrolling up) if ($(this).css("opacity")==1) {$(this).fadeTo(500,0);$(this).removeClass("ford-fadeLeft");} } }); }).scroll(); //invoke scroll-handler on page-load }); $(document).ready(function (){ $(".open").click(function (){ event.preventDefault(); $(".pop-outer").fadeIn("slow"); }); $(".close").click(function (){ $(".pop-outer").fadeOut("slow"); }); }); $(document).ready(function (){ var str = window.location.href; if (str.indexOf('?') > -1) { str = str.split("?").pop(); var zip = str.split("=").pop(); $( ".wpsl-search .wpsl-input input" ).attr( "value", zip ); $( ".wpsl-search-btn-wrap #wpsl-search-btn" ).click(); $('.wpsl-search-btn-wrap #wpsl-search-btn input').trigger('click');$( '.gm-style iframe' ).attr( 'src', function ( i, val ) { return val; });$( ".wpsl-stores" ).change(function() { alert( "Handler for .change() called." ); });! function () { var ulContent; $(document).ajaxStop(function () { var $ul = $('.ProductList'); if(ulContent !== $ul.html()){ ulContent = $ul.html(); $ul.trigger('contentChanged'); } }); }();$('.wpsl-stores ul').on('contentChanged',locationChange); function locationChange() { $( '.wpsl-stores ul li:first').mouseenter().mouseleave(); }console.log("Test 1"); $( '.wpsl-stores ul li:first').mouseenter().mouseleave(); console.log("Test 2"); } else { } }); //Pop Up Form Process function process() { var url = "https://fordservicecoupon.com/contact-us/?zip=" + document.getElementById("url").value; location.href = url; return false; } $(document).ready(function() { $(".fancybox").fancybox(); });$(document).ready(function() { $(".acc-info").hide(); $(".acc-info.active").show();$(".acoordian-menu a").click(function(e) { var parent = $(this) .parent() .parent() .parent(); var acc_menu = $(this).parent();if (parent.find(".acc-info").hasClass("active")) { return false; }$(".acc-info.active") .removeClass("active") .slideToggle();if (!parent.find(".acc-info").hasClass("active")) { parent .find(".acc-info") .addClass("active") .slideToggle(); }if (parent.find(".acc-info").hasClass("active")) { /*$('.acoordian-menu span').html('-');*/ $(".acoordian-menu span").html("+"); parent.find(".acoordian-menu span").html("-"); }e.preventDefault(); }); });$(document).ready(function() {$('.gm-style-iw-d').click(function() { console.log('map set!'); $('.wpsl-store-block').hide(); var target_category = $(this).attr('data-store-id'); $('.wpsl-store-block[data-store-id="' + target_category + '"]').show(); }); });