'); slides.push(s); }); return slides; } function update_slideshow_interactions() { $('.selector.slideshow').each(function() { $(this).click(function() { var id = $(this).data('principle-id'); console.log(id + ' clicked'); set_slideshow_image(id); hero_snap(); }); }); } function live_chat_setup() { var href = 'https://solutions.msbconnect.com/CaseNPoynt.dev/ChatContainer.aspx?windowheight=460&windowwidth=360'; $('.live_chat').each(function() { console.log('adding live chat handler'); $(this).click(function() { window.open(href, 'MSBLiveChat', 'resizable=yes,status=yes,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=360,left=10,height=460,top=0'); return false; }); }); } function state_filters() { console.log('applying state filters'); $('.filter_label').each(function() { var label = $(this).text(); var filtered = filter_label(label); //console.log(label + '> ' + filtered); $(this).text(filtered); }); } function filter_label(l) { var label = l; _filters.forEach(function(f) { //https://stackoverflow.com/questions/7313395/ var regEx = new RegExp(f, "ig"); var replacment = ""; label = label.replace(regEx, replacment); }); return label; }