/*--Joseph Speakman custom.js--*/ document.addEventListener("DOMContentLoaded", function () { var kv = account_info; customSidebar(); contactModalPro(); //Custom Functions function customSidebar() { if ($("#blog-bodycontent")) { $('#blog-container .sidebar').prepend(`
`); $('#blog-container .sidebar').addClass('show'); } } function contactModalPro() { $(` `).appendTo('body'); var chatBtn = $("#contactModalPro-btn"); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 100) { chatBtn.addClass("small-btn"); } else { chatBtn.removeClass("small-btn"); } }); $(document).on('show.bs.modal', '#contactModal', function() { $("#contact-video").attr("src", contact_video); // Add the video source. }); $(document).on('hide.bs.modal', '#contactModal', function() { $("#contact-video").attr("src", ""); // Remove the video source. }); } });