window.a2a_config=window.a2a_config||{};a2a_config.callbacks=[];a2a_config.overlays=[];a2a_config.templates={};a2a_localize = {
Share: "Share",
Save: "Save",
Subscribe: "Subscribe",
Email: "Email",
Bookmark: "Bookmark",
ShowAll: "Show All",
ShowLess: "Show less",
FindServices: "Find service(s)",
FindAnyServiceToAddTo: "Instantly find any service to add to",
PoweredBy: "Powered by",
ShareViaEmail: "Share via email",
SubscribeViaEmail: "Subscribe via email",
BookmarkInYourBrowser: "Bookmark in your browser",
BookmarkInstructions: "Press Ctrl+D or \u2318+D to bookmark this page",
AddToYourFavorites: "Add to your favourites",
SendFromWebOrProgram: "Send from any email address or email program",
EmailProgram: "Email program",
More: "More…",
ThanksForSharing: "Thanks for sharing!",
ThanksForFollowing: "Thanks for following!"
};
a2a_config.icon_color="#0a0a0a,#ffffff";
var wc_add_to_cart_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","i18n_view_cart":"View cart","cart_url":"https:\/\/guildhallwealth.com\/cart\/","is_cart":"","cart_redirect_after_add":"no"};
/**
* All jQuery Scripts
*
*/
function allMobileScript() {
const $containerWidth = jQuery(window).width();
if ($containerWidth <= 991) {
// Navigation
jQuery('.menu-item-has-children > a ').click(function(e) {
jQuery(this).parent('.menu-item-has-children').toggleClass('active');
if (!jQuery(this).parent('.menu-item-has-children').hasClass('focus')) {
var a_link = jQuery(this).attr('href');
e.preventDefault();
} else {
var a_link = jQuery(this).attr('href');
if (a_link == '#') {
e.preventDefault();
} else {
location.href = a_link;
}
}
});
//Home slider
const swiperhome = new Swiper('.swiperhome', {
slidesPerView: 1,
spaceBetween: 10,
// pagination: {
// el: '.swiper-pagination',
// clickable: true,
// },
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
});
}
}
jQuery(function($) {
$(document).ready(function() {
allMobileScript();
//Menu Toggle
jQuery('.menu-toggle').on('click', function() {
jQuery(this).toggleClass('active');
});
jQuery('.accordions__inner-content .hero-item').eq(0).addClass('active');
jQuery('.hero-item').mouseover(function() {
const index = jQuery('.hero-item').index(this);
if (index != '0') {
jQuery(this).addClass('active');
jQuery('.hero-item').eq(0).removeClass('active');
} else {
}
});
jQuery('.hero-item').mouseout(function() {
const index = jQuery('.hero-item').index(this);
if (index != '0') {
jQuery(this).removeClass('active');
jQuery('.hero-item').eq(0).addClass('active');
}
});
});
// Toggle FAQs
jQuery('.faq-togglebox').hide();
//slide up and down when click over heading 2
jQuery('h3.faq-trigger').on('click', function() {
// slide toggle effect set to slow you can set it to fast too.
jQuery(this).toggleClass('active').next('.faq-togglebox').slideToggle('slow');
return true;
});
//Toggle Workshop
// Toggle FAQs
jQuery('.workshop-togglebox').hide();
//slide up and down when click over heading 2
jQuery('h3.workshop-trigger').on('click', function() {
// slide toggle effect set to slow you can set it to fast too.
jQuery(this).toggleClass('active').next('.workshop-togglebox').slideToggle('slow');
return true;
});
});
jQuery(window).on(' resize', function() {
allMobileScript();
});
function myFunction() {
var element = document.getElementById("searchformcontainer");
var elementbutton = document.getElementById("togglesearch");
element.classList.toggle("show");
elementbutton.classList.toggle("show");
}
jQuery(document).ready(function($) {
//$('.wcfad-pricing-table-wrapper tr:last').after('<tr>21+</tr><tr>CALL</tr>');
$(".wcfad-pricing-table-wrapper").find('tbody')
.append($('<tr>')
.append($('<td>')
.append($('<p>')
.text('21+')
)
)
.append($('<td>')
.append($('<p>')
///.attr('src', 'img.png')
.text('CALL')
)
)
);
});
jQuery(document).ready(function($) {
var loc = window.location.href; // returns the full URL
if (/USD/.test(loc)) {
$('body').addClass('USD');
}
});
jQuery(document).ready(function($) {
var loc = window.location.href; // returns the full URL
if (/CAD/.test(loc)) {
$('body').addClass('CAD');
}
});
var wc_order_attribution = {"params":{"lifetime":1.0e-5,"session":30,"ajaxurl":"https:\/\/guildhallwealth.com\/wp-admin\/admin-ajax.php","prefix":"wc_order_attribution_","allowTracking":true},"fields":{"source_type":"current.typ","referrer":"current_add.rf","utm_campaign":"current.cmp","utm_source":"current.src","utm_medium":"current.mdm","utm_content":"current.cnt","utm_id":"current.id","utm_term":"current.trm","session_entry":"current_add.ep","session_start_time":"current_add.fd","session_pages":"session.pgs","session_count":"udata.vst","user_agent":"udata.uag"}};
document.addEventListener("DOMContentLoaded", function() {
const button = document.getElementById("scrollTop");
scrollFunction();
window.addEventListener('scroll', function() {
scrollFunction()
});
function scrollFunction() {
// When the user scrolls down 20px from the top of the document, show the button
if (window.scrollY > 20) {
button.style.display = "block";
} else {
button.style.display = "none";
}
}
})