',click:base.bind(this,this.togglePlay)}},togglePlay:function(a){var b=this.parent;a.preventDefault();b.togglePlay()}}),q=f.extend({render:function(){return{tag:"li",className:"option","aria-label":"Slide "+(this.number+1),onState:["selected",{selected:!0}],innerHTML:this.content||null,click:base.bind(this,this.selectOption)}},setupStates:function(){return{selected:this.selected||!1}},useCallBack:function(){"function"===typeof this.callBack&&this.callBack(this.option)},select:function(){this.state.set("selected",!0)},unselect:function(){this.state.set("selected",!1)},selectOption:function(a){a.preventDefault();this.select();this.unselect();this.useCallBack()}});f=f.extend({duration:7E3,beforeSetup:function(){this.defaultPathUrl=this.defaultPathUrl||"";var a=a||0;this.onNumber="undefined"!==typeof a?a:0;this.setAsBg=this.setAsBg||!1;this.options=[];this.timer=null},afterSetup:function(){this.selectPrimaryOption();this.addSlideshow();this.startTimer();this.getHeight()},render:function(){this.setupOptions();return{className:"slide-container",tabindex:"0",onState:["playing",{playing:!0}],children:[this.addButton("arrow-left",base.bind(this,this.selectPreviousOption)),this.addButton("arrow-right",base.bind(this,this.selectNextOption)),this.cache("slideContainerEle",{className:"slides",children:this.options}),{tag:"ul",className:"number-crumb-container",slider:this.cache("slideTab",new n),children:this.setupCrumbs()}]}},addButton:function(a,b){return{tag:"a","aria-label":"arrow-left"===a?"Previous slide":"Next slide",className:"arrow "+a,click:b}},setupStates:function(){return{playing:!1,inView:!1}},setupEvents:function(){return[["keydown",document,base.bind(this,this.keyPress)]]},addSlideshow:function(){var a=this.container;if(!a)return!1;var b=a.parentNode;if(!b)return!1;b.appendChild(this.panel);b.removeChild(a)},getHeight:function(){for(var a=100,b=this.options,c=0,d=b.length;ca&&(a=e)}this.slideContainerEle.style.minHeight=a+"px"},keyPress:function(a){var b=g.elementInViewport(this.panel),c=document.getElementsByTagName("form").length;if(b&&!c&&!document.body.classList.contains("modal-open"))switch(a.keyCode){case 32:a.preventDefault();this.togglePlay();break;case 37:this.selectPreviousOption();break;case 39:this.selectNextOption()}},getSlides:function(){return this.container.querySelectorAll(".single-slide")},setupOptions:function(){var a=[],b=this.getSlides(),c=b.length;if(0=this.size.width},update:function(){this.getElements();this.resize();this.checkScroll();return this},updatePosition:function(a){var b=a.element;a.position=base.position(b,0);a.size=base.getSize(b)},updateOptionPositions:function(){for(var a=this.options,b=a.length,c=0;c=c?this.animate(e,l):g>=c&&g<=d&&this.animate(e,l)}}return this},phoneSize:600,animate:function(a,b){var c=a.element,d=a.animation;window.setTimeout(function(){base.addClass(c,d).addClass(c,"animated")},b||0);this.removeOption(a);return this},ticking:!1,scroll:function(a){if(!this.ticking){var b=this;n(function(){b.checkScroll(a);b.ticking=!1});this.ticking=!0}},setupEvents:function(){this.callBack=base.bind(this,this.checkScroll);var a=base.bind(this,this.scroll),b=base.bind(this,this.resize),c=window;this.addEvents=function(){base.on("scroll",c,a,!1);base.on("resize",c,b)};this.removeEvents=function(){base.off("scroll",c,a,!1);base.off("resize",c,b)};this.addEvents();return this}});m.lazyAnimator=p})(bpApp);(function(d){var e=base.Class.extend({constructor:function(a,b,c){this.header="string"===typeof a?document.getElementById(a):a;this.$header=jQuery(this.header);this.miniClassName=b;this.headerMinified=!1;this.distance="undefined"!==typeof c?c:300;this.$document=jQuery(document);this.$window=jQuery(window);this.setup()},setup:function(){if(!this.header)return!1;this.checkScroll();this.addScroll()},addScroll:function(){var a=this,b=function(){a.checkScroll()},c=this.$window;c.on("scroll",b);c.on("resize",b)},checkScroll:function(){var a=this.$window,b=a.scrollTop();this.$document.height();a.height();b>=this.distance?!1===this.headerMinified&&(this.$header.addClass(this.miniClassName),this.headerMinified=!0):!0===this.headerMinified&&(this.headerMinified=!1,this.$header.removeClass(this.miniClassName))},scrollToTop:function(){window.scrollTo(window.scrollX,0)}});d.scrollHeader=e})(bpApp);"use strict";var ReviewModel = base.Model.extend({ defaults: { rating: 5, publish: 0, should_review: 1, send_email: 1 }});var LeaveReviewForm = ModalFormPanel.extend({ beforeSetup: function() { this.data = new ReviewModel(); }, modalClassName: 'review-modal-updated', title: 'Leave a Review', addHiddenFields: function() { return { tag: 'input', type: 'text', name: 'URL', autocomplete: 'none', className: 'honey' }; }, addBodyContent: function() { return { tag: 'form', method: 'post', children: [ { tag: 'label', text: 'Display Name', children: this.addDataInput() }, { tag: 'label', text: 'Star Rating', children: this.addRatingContainer() }, { tag: 'label', text: 'Review', children: this.addDataReview() }, this.addHiddenFields(), { tag: 'button', className: 'main-btn transition', text: 'Submit Review', click: base.bind(this, this.accept) } ] }; }, accept: function() { this.request(); }, validate: function() { var data = this.data.get(); if (!data.url) { var review = data.review, reviewer = data.reviewer, msg = ''; if (!review) { msg += '- Please enter a review
'; } if (!reviewer) { msg += '- Please enter a display name'; } if (msg !== '') { this.addAlert('failure', msg); } else { return true; } } return false; }, request: function() { var $ = jQuery; if (this.validate()) { var data = this.data.get(); var params = { action: 'newStoreReview', review: base.prepareJsonUrl(data) }, ajaxurl = '/wp-admin/admin-ajax.php'; $.post(ajaxurl, params, base.bind(this, this.requestResponse)); } }, requestResponse: function(response) { this.addAlert('success', response); this.form.reset(); }, addAlert: function(type, msg) { var alertPanel = new AlertPanel({ type: type, msg: msg }); alertPanel.setup(this.alertContainer); }, addRatingContainer: function() { var layout = { className: 'stars-container', children: [] }; var ratings = 5, self = this; for (var i = ratings; i > 0; i--) { var number = i, id = 'ratingStar' + number, starInput = { tag: 'input', type: 'radio', id: id, name: 'modal-rating', value: number, checked: (number === 5), change: function() { self.data.set('rating', this.value) } }, starLabel = { tag: 'label', 'aria-label': number + ' stars', for: id, innerHTML: '' }; layout.children.push(starInput); layout.children.push(starLabel); } return layout; }, addDataInput: function() { return { tag: 'input', type: 'text', autocomplete: 'off', className: 'name-reviewer val', bind: 'reviewer', required: true, placeholder: 'John D.' }; }, addDataReview: function() { return { tag: 'textarea', name: 'review', autocomplete: 'off', className: 'review-message val', bind: 'review', required: true, placeholder: 'What did you think?' }; }, getTitle: function() { return 'Leave a Review'; }});var AlertPanel = base.Component.extend({ render: function() { return { className: this.getPanelClass(), innerHTML: this.msg }; }, getPanelClass: function() { return this.type === 'success' ? 'saveSuccess' : 'saveFailure'; }, msgTimeOut: function (fade) { var self = this; window.setTimeout(function() { bpApp.animate.hide(self.panel, 'fadeOut', 500, function() { self.destroy(); } ); }, fade); }});(function (bpApp, global) { "use strict"; var container = jQuery('#nav-scroll-container')[0], appNav = new bpApp.Navigation(); appNav.setup(container); var addModule = function (module) { return bpApp.addModule(module) }; var stickHeader = function () { var ele = jQuery('#sticky-header')[0]; if (!ele) { return !1 } var height = 400, heightElement = jQuery('#sticky-scroll-height'); if (heightElement[0]) { height = heightElement.height() } new bpApp.scrollHeader(ele, 'sticky', height) }; var desktopNav = function () { var ele = jQuery('.headerarea nav.main-nav-container')[0]; if (!ele) { return !1 } ele.setAttribute('aria-label', 'desktop navigation') }; var updateViewport = function () { var viewport = jQuery('meta[name="viewport"]'); if (!viewport) { return !1 } viewport = viewport[0]; viewport.setAttribute('content', "width=device-width, initial-scale=1, maximum-scale=5") }; addModule({ navHidden: !0, setup: function () { stickHeader(); desktopNav(); updateViewport(); this.addEvents() }, addEvents: function () { var self = this; var button = jQuery('#main-nav-toggle'); button.on('click', function () { self.toggleNav(); document.body.classList.toggle('menu-open') }) }, toggleNav: function () { var header = jQuery('.top-banner-row'), button = jQuery('#main-nav-toggle'), nav = jQuery('#main-nav-container'), footBar = jQuery('.bottom-bar'), address = jQuery('.bottom-bar.inner'); if (this.navHidden === !0) { this.navHidden = !1; header.addClass('opened nav-d'); nav.addClass('open'); button.addClass('nav-close'); footBar.addClass('nav-d'); if (jQuery(global).width() < 767) { address.css({ 'bottom': '60px', 'position': 'fixed' }) } else { address.css('position', 'fixed') } appNav.selectPrimaryGroup() } else { this.navHidden = !0; header.removeClass('opened nav-d'); nav.removeClass('open'); button.removeClass('nav-close'); footBar.removeClass('nav-d'); address.css({ 'position': 'relative', 'bottom': '0px' }) } } }); var bpSlideShow = addModule({ create: function (type, options) { type = type || 'controller'; switch (type) { case 'controller': this.controller(options); break; case 'office': this.office(options); break; case 'reviews': this.reviews(options); break } }, controller: function (slideOptions) { var container = jQuery('#slides')[0]; if (!container) { return !1 } var options = container.querySelectorAll('.single-slide'); var startNumber = this.getStart(options); var slideAnimationIn = this.tryProp(slideOptions, 'animationIn') || 'fadeIn'; var slideAnimationOut = this.tryProp(slideOptions, 'animationOut') || 'fadeOut'; var slideTimer = this.tryProp(slideOptions, 'duration') || 7000; var spotlight = new bpApp.SlideController({ onNumber: startNumber, defaultPathUrl: '', duration: slideTimer, animationIn: slideAnimationIn, animationOut: slideAnimationOut }); spotlight.setup(container) }, tryProp: function (options, property) { if (!options) { return } return options[property] }, getStart: function (options) { return Math.round(Math.random() * (options.length - 1)) }, createSlideShow: function (container, path, bg, options, duration) { container = jQuery('#' + container)[0]; duration = duration || 7000; var startNumber = this.getStart(options); var slideShow = new bpApp.SlideShow({ onNumber: startNumber, defaultPathUrl: path, slides: options, setAsBg: bg, duration: 7000 }); slideShow.setup(container); return slideShow }, addSlide: function (image, alt, title, content, className, url, crumbContent) { return { title: title, content: content, className: className, image: image, alt: alt, url: url, crumbContent: crumbContent } }, office: function (options, id) { id = id || 'tour'; this.createSlideShow(id, '/images/slideshow/', !1, options) }, reviews: function (options) { this.createSlideShow('reviews', '', !1, options) } }); var convertReviews = function (options) { if (!options) { return !1 } for (var i = 0, length = options.length; i < length; i++) { var option = options[i]; option.title = option.reviewer; option.className = 'reviews-section'; option.reviewerClassName = 'patient-name' } return options }; var _slideShow = bpSlideShow; global.DefaultSlider = function (options) { _slideShow.create('controller', options) }; global.OfficeSlider = function (options, id) { _slideShow.office(options, id) }; global.ReviewSlider = function (options) { options = convertReviews(options); _slideShow.create('reviews', options) }; addModule({ setup: function () { this.navModals(); this.externalLinks(); this.setupModals(); this.setupVideos() }, navModals: function () { var navModalItem = jQuery('li.data-modal a'); if (navModalItem.length === 0) { return !1 } navModalItem.each(function () { var self = jQuery(this); var navModalLink = self.attr('href').replace('#', ''); self.attr('data-modal', navModalLink); self.removeAttr('href'); self.attr('tabindex', 0) }) }, setupModals: function () { var attrName = 'data-modal', self = this; jQuery('[' + attrName + ']').each(function (index, element) { element = jQuery(element); element.attr('tabindex', 0); element.attr('role', 'button'); element.attr('aria-haspopup', !0); var modalName = element.attr(attrName); if (!modalName) { return !1 } element.attr('data-cta-name', modalName.toLowerCase()); element.on('click', function () { var modalClass = global[modalName]; if (!modalClass) { return !1 } bpApp.GA4Tracking('opened_modal'); var modal = new modalClass(); modal.setup(document.body); modal.display() }) }) }, setupVideos: function (attrName) { attrName = attrName || 'data-video-src'; var self = this; jQuery('[' + attrName + ']').each(function (index, element) { element = jQuery(element); var src = element.attr('data-video-src'); if (!src) { return !1 } element.on('click', function () { self.view(src) }) }) }, view: function (src) { var panel = new VideoPanel({ src: src }); panel.setup(document.body); panel.display() }, externalLinks: function () { var attrName = 'target', self = this; jQuery('[' + attrName + ']').each(function (index, element) { element = jQuery(element); element.append('') }) } }); bpApp.createBackgroundVideo = function (container, src) { return new bpApp.BackgroundVideo(container, src) }; addModule({ setup: function () { var IframeLoader = base.Class.extend({ heightAdded: !1, constructor: function (element) { this.element = element; if (element) { this.setup() } }, setup: function () { this.addEvents(); var self = this; setTimeout(function () { if (!self.heightAdded) { self.setHeight() } }, 2500) }, setHeight: function () { var iFrame = this.element; var doc = iFrame.contentDocument ? iFrame.contentDocument : iFrame.contentWindow.document; var height = 100; if (charlie.iframeHeight) { height = doc.body.scrollHeight + parseInt(charlie.iframeHeight) } else { height = doc.body.scrollHeight + 100 } if (height < 100) { height = 100 } iFrame.height = height }, addEvents: function () { var self = this; jQuery(this.element).on('load', function () { self.setHeight(); self.heightAdded = !0 }) } }); var iframes = document.querySelectorAll(".services-iframe"), length = iframes.length; for (var i = 0; i < length; i++) { new IframeLoader(iframes[i]) } } }); bpApp.exceptions = ['tab-description', 'tab-additional_information']; bpApp.addException = function (exception) { this.exceptions.push(exception) }; bpApp.imgExt = null; bpApp.getImageExt = function () { return (nextGenImages) ? 'webp' : 'jpg' }; bpApp.GA4Tracking = function (event) { event = event.replace(/ /g, "_").toLowerCase(); if (typeof gtag === 'function') { gtag('event', event) } }; addModule({ setup: function () { this.telTracking(); this.setupFancyBox(); this.setupAutoScroll(); this.loadDeferredImages(); this.lazyLoadViewport() }, telTracking: function () { jQuery("a[href^='tel:']").click(function () { bpApp.GA4Tracking('Click to Call') }) }, setupFancyBox: function () { if (!jQuery.fancybox) { return } jQuery(".pics").fancybox({ openEffect: 'elastic', closeEffect: 'elastic', helpers: { overlay: { locked: !1 } } }) }, setupAutoScroll: function () { var exceptions = bpApp.exceptions; var pattern = /^\//; jQuery('a[href*="#"]:not([href="#"])').click(function () { if (location.pathname.replace(pattern, '') === this.pathname.replace(pattern, '') && location.hostname === this.hostname) { var hash = this.hash.slice(1), index = jQuery.inArray(hash, exceptions); if (index === -1) { var target = jQuery(this.hash); target = target.length ? target : jQuery('[id=' + hash + ']'); if (target.length) { jQuery('html,body').animate({ scrollTop: target.offset().top }, 800); return !1 } } } }) }, loadDeferredImages: function () { var loadWebp = (nextGenImages === !0), ext = bpApp.getImageExt(); jQuery('body').addClass('loaded'); jQuery('img[data-src]').each(function (i, ele) { this.loading = "lazy"; var $ele = jQuery(this), src; if (loadWebp) { var dataSrc = String($ele.data('src')), fileExt = /\.jpg|\.png/ig; src = dataSrc.indexOf('.svg') !== -1 ? dataSrc : (dataSrc.replace(fileExt, '') + '.webp') } else { src = $ele.data('src') } ele.src = src }) }, lazyLoadViewport: function () { var att = 'data-map-src', maps = [].slice.call(document.querySelectorAll('iframe[' + att + ']')), active = !1; function lazyLoad() { maps.forEach(function (map) { map.loading = "lazy"; map.title = "Google Map"; bpApp.elementInViewport(map, function () { map.src = map.getAttribute(att); maps = maps.filter(function (iframe) { return iframe !== map }); if (maps.length === 0) { document.removeEventListener("scroll", lazyLoad); global.removeEventListener("resize", lazyLoad); global.removeEventListener("orientationchange", lazyLoad) } jQuery('.map-overlay').fadeOut() }) }) } document.addEventListener("scroll", lazyLoad, { passive: !0 }); global.addEventListener("resize", lazyLoad, { passive: !0 }); global.addEventListener("orientationchange", lazyLoad, { passive: !0 }) } })})(bpApp, window);