HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/wpcurated/wp-content/themes/curated/footer.php
<?php 
global $post;
$post_slug = $post->post_name;

?>
<footer>
	<section class="footer-sec">
		<div class="container custom-container">
			<div class="f-wrapper d-flex">
				<div class="logo-block">
					<a class="f-logo" href="<?php echo esc_url(site_url()); ?>">
						<img src="<?php echo get_template_directory_uri(); ?>/img/logo-ft.svg" alt="">
					</a>
				</div>

				<div class="nav-item-cover d-flex">
					<div class="nav-item-block cont-item">
						<p>
							<a href="tel:9174517018" class="con-link"><img class="me-2" src="<?php echo get_template_directory_uri(); ?>/img/telephone.svg" alt="">(917) 451-7018</a>
						</p>
						<p>
							<a href="" class="con-link"><img class="me-2" src="<?php echo get_template_directory_uri(); ?>/img/fax.svg" alt="">844-724-9382</a>
						</p>
						<p>
							<a href="mailto:info@curatedmh.com" class="con-link"><img src="<?php echo get_template_directory_uri(); ?>/img/inbox.svg" alt="">info@curatedmh.com</a>
						</p>
						<p>402 Metropolitan Ave. <br>Brooklyn NY 11211</p>
						<p>253 W 28th St 6th Floor, <br>New York, NY 10001</p>
					</div>
					<div class="nav-item-block">
						<div class="f-nav-item">
							<a href="<?php echo esc_url(site_url()); ?>" class="f-nav-link">Home</a>
						</div>
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/services')); ?>" class="f-nav-link">Our Services</a>
						</div>
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/depression-disorders')); ?>" class="f-nav-link">Conditions Treated</a>
						</div>
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/about-us')); ?>" class="f-nav-link">About Us</a>
						</div>
					</div>
					<div class="nav-item-block">
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/our-blog')); ?>" class="f-nav-link">Blog</a>
						</div>
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/contact-us')); ?>" class="f-nav-link">Contact Us</a>
						</div>
						<div class="f-nav-item">
							<a href="<?php echo esc_url(home_url('/locations')); ?>" class="f-nav-link">Locations</a>
						</div>
						<div class="f-nav-item">
							<a href="https://patientportal.advancedmd.com/147720/account/logon" class="f-nav-link">Patient Portal Access</a>
						</div>
					</div>
					<div class="nav-item-block social-icons-wrap">
						<div class="f-soc-block d-flex">
							<a href="https://www.facebook.com/profile.php?id=100091188679488" class="f-soc-link">
								<img src="<?php echo get_template_directory_uri(); ?>/img/f-soc-1.svg" alt="">
							</a>
							<a href="https://www.instagram.com/curatedmh/" class="f-soc-link">
								<img src="<?php echo get_template_directory_uri(); ?>/img/f-soc-2.svg" alt="">
							</a>
							<a href="https://www.linkedin.com/company/curatedmh/" class="f-soc-link">
								<img src="<?php echo get_template_directory_uri(); ?>/img/f-soc-3.svg" alt="">
							</a>
						</div>
					</div>
					<div class="btm-secure-cover d-flex">
						<div class="secure-block">
							<img src="<?php echo get_template_directory_uri(); ?>/img/f-icon-3.svg" alt="">
						</div>
						<div class="secure-block">
							<img src="<?php echo get_template_directory_uri(); ?>/img/f-icon-1.svg" alt="">
						</div>
						<div class="secure-block">
							<img src="<?php echo get_template_directory_uri(); ?>/img/f-icon-2.svg" alt="">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="rights-block">
			<span>&copy;</span>
			<span id="year">0</span>
			Curated Mental Health <span class="d-none d-md-inline"> | </span> 
			<span class="links">Built by <a href="https://kornerstonemedia.com/" target="_blank" class="policy-link strong"><strong class="fw-bold">Kornerstone Media</strong></a></span> <span class="d-none d-md-inline"></span>
			<!-- <span class="links">
<a href="/cookies-policy/" class="policy-link">Cookies Policy</a> | <a href="#" class="policy-link">Privacy Policy</a>
</span> -->
		</div>
	</section>
</footer>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<!-- Slick JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>

<!-- scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"
		integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg=="
		crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<?php if($post_slug == "home"){ ?>
<script>
	$(document).ready(function () {

		$('.slick-treat').slick({
			dots: false,
			arrows: true,
			infinite: true,
			speed: 300,
			slidesToShow: 1,
			centerMode: true,
			variableWidth: true,
			autoplay: true,

		});

		$(".prev-btn").click(function () {
			$(".slick-treat").slick("slickPrev");
		});

		$(".next-btn").click(function () {
			$(".slick-treat").slick("slickNext");
		});
		$(".prev-btn").addClass("slick-disabled");
		$(".slick-treat").on("afterChange", function () {
			if ($(".slick-prev").hasClass("slick-disabled")) {
				$(".prev-btn").addClass("slick-disabled");
			} else {
				$(".prev-btn").removeClass("slick-disabled");
			}
			if ($(".slick-next").hasClass("slick-disabled")) {
				$(".next-btn").addClass("slick-disabled");
			} else {
				$(".next-btn").removeClass("slick-disabled");
			}
		});


		$('.slider').slick({
			dots: true,
			arrows: true,
			infinite: true,
			speed: 300,
			slidesToShow: 2,
			slidesToScroll: 1,
			autoplay: false,
			autoplaySpeed: 3000,
			prevArrow: '<button class="slick-prev"><img src="<?php echo get_template_directory_uri(); ?>/img/prev-arrows.svg" alt="prev-arrow"></button>',
			nextArrow: '<button class="slick-next"><img src="<?php echo get_template_directory_uri(); ?>/img/prev-arrows.svg" alt="prev-arrow"></button>',
			responsive: [
				{
					breakpoint: 1024, // Tablet devices
					settings: {
						slidesToShow: 2,
						slidesToScroll: 1,
						dots: true,
						arrows: false // Hide arrows on smaller screens
					}
				},
				{
					breakpoint: 579, // Mobile devices
					settings: {
						slidesToShow: 1,
						slidesToScroll: 1,
						dots: true,
						arrows: false // Hide arrows on smaller screens
					}
				}
			]
		});

		$('.review-slider').slick({
			infinite: true,
			slidesToShow: 2,
			slidesToScroll: 1,
			arrows: true,
			autoplay: true,
			prevArrow: $('.review-arrow-lft'),
			nextArrow: $('.review-arrow-rgt'),
			responsive: [
				{
					breakpoint: 767, // Mobile devices
					settings: {
						slidesToShow: 1,
						slidesToScroll: 1,
					}
				}
			]
		});
	});  
</script>
<?php } if($post_slug == "about-us"){ ?>
<script>
	$(document).ready(function () {

		$('.team-slider-for').slick({
			slidesToShow: 1,
			slidesToScroll: 1,
			arrows: false,
			fade: true,
			asNavFor: '.team-slider-nav',
			dots: false,
			adaptiveHeight: true
		});
		$('.team-slider-nav').slick({
			slidesToShow: 7,
			// slidesToScroll: 7,
			Infinite:true,
			asNavFor: '.team-slider-for',
			dots: true,
			centerMode: true,
			focusOnSelect: true,
			arrows: true,
			centerPadding: '0px',
			responsive: [
				{
					breakpoint: 1300,
					settings: {
						slidesToShow: 6
					}
				},
				{
					breakpoint: 1200,
					settings: {
						slidesToShow: 4
					}
				},
				{
					breakpoint: 600,
					settings: {
						slidesToShow: 2,
						dots: false
					}
				},
				{
					breakpoint: 480,
					settings: {
						slidesToShow: 1,
						dots: false
					}
				}
				// You can unslick at a given breakpoint now by adding:
				// settings: "unslick"
				// instead of a settings object
			]
		});

	});
</script>
<?php } ?>
<script>
	$(document).ready(function () {
		$('.click-button').click(function () {
			const targetId = $(this).data('target'); // Get the target ID from the data attribute
			$(`#${targetId}`).slideToggle();        // Toggle the corresponding content
		});
		$('.content .arrow').click(function (e) {
			e.stopPropagation(); // Prevent triggering parent element click events
			const $content = $(this).closest('.content'); // Find the closest .content
			$content.slideToggle(); // Expand the content
		});
		$('.logo-slider').slick({
			speed: 10000,
			autoplay: true,
			autoplaySpeed: 0,
			centerMode: true,
			cssEase: 'linear',
			slidesToShow: 1,
			slidesToScroll: 1,
			variableWidth: true,
			infinite: true,
			initialSlide: 1,
			arrows: false,
			buttons: false
		});

		$('.slick-location').slick({

			slidesToShow: 3,
			slidesToScroll:1,
			infinite: true,
			arrows: true,
			dots: true,
			prevArrow: '<svg class="pre" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="17" cy="17" r="16.5" fill="#EAFBFF" stroke="#014CB2"/><path d="m19 10-7 7 7 7" stroke="#014CB2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
			nextArrow: '<svg class="next" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="17" cy="17" r="16.5" fill="#EAFBFF" stroke="#014CB2"/><path d="m19 10-7 7 7 7" stroke="#014CB2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
			responsive: [
				{
					breakpoint: 1199,
					settings: {
						slidesToShow:2
					}
				},
				{
					breakpoint: 767,
					settings: {
						slidesToShow:1
					}
				},
			]
		});
	});
</script>
<?php if($post_slug == "our-blog"){ ?>
<script>
	$(document).ready(function () {

		$('.media-slider').slick({
			infinite: true,
			slidesToShow: 3,
			slidesToScroll: 1,
			arrows: false,
			autoplay: true,
			// prevArrow: $('.review-arrow-lft'),
			// nextArrow: $('.review-arrow-rgt'),
			responsive: [
				{
					breakpoint: 1200,
					settings: {
						slidesToShow: 2
					}
				},
				{
					breakpoint: 800,
					settings: {
						slidesToShow: 1
					}
				},
				{
					breakpoint: 650,
					settings: {
						slidesToShow: 1
					}
				}
			]

		});

	});
</script>
<?php } ?>
<?php if($post_slug == "depression-disorders" || $post_slug == "other-conditions" || $post_slug == "ketamine" || $post_slug == "anxiety-disorders" || $post_slug == "insomnia" || $post_slug =="psychopharmacology" || $post_slug =="treatment-resistant-depression" || $post_slug =="tms" || $post_slug =="spravato"){ ?>
<script>
	$(document).ready(function(){
		$('.review-slider').slick({
			infinite: true,
			slidesToShow: 2,
			slidesToScroll: 1,
			arrows: true,
			autoplay: true,
			prevArrow: $('.review-arrow-lft'),
			nextArrow: $('.review-arrow-rgt'),
			responsive: [
				{
					breakpoint: 650,
					settings: {
						slidesToShow: 1
					}
				}
			]

		});
	});
</script>
<?php } ?>
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.9.2/parsley.min.js"></script>
<script>
	Fancybox.bind('[data-fancybox]', {
		Thumbs: false,Toolbar: false      });    
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBAIzhuIlbO3SY2Q2dBCp47rVcAxE5Kt7g&callback=initMap&libraries=places" async defer></script>

<script>
	$('a[href^="#"]').click(function(e) {
		e.preventDefault(); // Prevent the default anchor click behavior
		var target = $($(this).attr('href')); // Get the target element from the href attribute
		if (target.length) { // Check if the target element exists
			$('html, body').animate({
				scrollTop: target.offset().top // Animate scrolling to the target position
			}, 100); // Adjust the scroll speed (500 milliseconds)
		}
	});

	$(document).ready(function(){
		$(".show-more-button .btn").click(function(){
			$(".section1").slideToggle();
		});
	});
</script>

<script>
	// Select the <ul> element
	const ulElement = document.querySelector('ul');

	// Check if the parent section has the 'apply-outer-wrap' class
	if (ulElement.parentElement && ulElement.parentElement.classList.contains('apply-outer-wrap')) {
		// Add a class to the <ul> element
		ulElement.classList.add('career-points');
	}
	document.getElementById("year").innerHTML = new Date().getFullYear();

	let map; // Define map globally
	let markers = []; // Store markers to clear them later

	function searchLocations() {
		var address = document.getElementById("user-location").value;
		var radius = document.getElementById("search-radius").value;
		var resultsCount = document.getElementById("results-count").value || 10;

		if (!address || !radius) {
			document.getElementById("loc-msg").textContent = "Please enter a location and select a radius.";
			return;
		}

		document.getElementById("loc-msg").textContent = "";

		var geocoder = new google.maps.Geocoder();
		geocoder.geocode({ address: address }, function (results, status) {
			if (status === "OK") {
				var userLocation = results[0].geometry.location;
				console.log("User location (lat, lng):", userLocation.lat(), userLocation.lng()); // Debugging

				initializeMap(userLocation); // Initialize the map with user location
				filterLocations(userLocation, radius, resultsCount);
			} else {
				document.getElementById("loc-msg").textContent = "Location not found. Please enter a valid address.";
			}
		});
	}

	function filterLocations(userLocation, radius, resultsCount) {
		var predefinedLocations = [
			{ name: "253 West 28 St, New York, NY 10001", lat: 40.7498, lng: -73.9935 },
			{ name: "402 Metropolitan Ave, Brooklyn, NY 11211", lat: 40.7148, lng: -73.9570 },
			{ name: "203 E 109th St, New York, NY 10029", lat: 40.7936, lng: -73.9442 },
			{ name: "570 Nostrand Ave, Brooklyn, NY 11216", lat: 40.6775, lng: -73.9496 },
			{ name: "380 Grove St, Brooklyn, NY 11237", lat: 40.7032, lng: -73.9184 },
			{ name: "945B Coney Island Ave, Brooklyn, NY 11230", lat: 40.6304, lng: -73.9696 },
			{ name: "2935 Veterans Road W, Staten Island, NY 10309", lat: 40.5344, lng: -74.2304 }
		];

		var userLat = userLocation.lat(); // Convert function to number
		var userLng = userLocation.lng(); // Convert function to number

		var filteredLocations = predefinedLocations
		.map(location => {
			location.distance = getDistance(userLat, userLng, location.lat, location.lng);
			return location;
		})
		.filter(location => location.distance <= radius)
		.sort((a, b) => a.distance - b.distance)
		.slice(0, resultsCount);

		console.log("Filtered locations:", filteredLocations); // Debugging
		updateMap(filteredLocations);
	}

	function getDistance(lat1, lng1, lat2, lng2) {
		var R = 3958.8; // Radius of the Earth in miles
		var dLat = (lat2 - lat1) * Math.PI / 180;
		var dLng = (lng2 - lng1) * Math.PI / 180;
		var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
			Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *
			Math.sin(dLng / 2) * Math.sin(dLng / 2);
		var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
		return R * c; // Distance in miles
	}

	function initializeMap(centerLocation) {
		var mapContainer = document.getElementById("map1");

		if (!mapContainer) {
			console.error("Map container not found!");
			return;
		}

		// Ensure that #map exists
		if (!document.getElementById("map")) {
			mapContainer.innerHTML = "<div id='map' style='width: 100%; height: 500px;'></div>";
		}

		// Ensure the map is visible
		mapContainer.style.display = "block";

		// Initialize or re-center the map
		if (!map) {
			map = new google.maps.Map(document.getElementById("map"), {
				zoom: 12,
				center: centerLocation
			});
		} else {
			map.setCenter(centerLocation);
		}

		// Clear previous markers
		clearMarkers();

		// Add user location marker
		let userMarker = new google.maps.Marker({
			position: centerLocation,
			map: map,
			title: "Your Location",
			icon: "http://maps.google.com/mapfiles/ms/icons/blue-dot.png"
		});

		markers.push(userMarker);
	}

	function updateMap(locations) {
		if (!map) {
			console.error("Map is not initialized! Cannot add markers.");
			return; 
		}

		console.log("Updating map with locations:", locations);

		// Clear previous markers
		clearMarkers();

		// If no locations found, display message and return
		if (locations.length === 0) {
			document.getElementById("loc-msg").textContent = "No locations found within the selected radius.";
			return;
		}

		// Add markers for each location
		locations.forEach(location => {
			let marker = new google.maps.Marker({
				position: { lat: location.lat, lng: location.lng },
				map: map,
				title: location.name
			});
			markers.push(marker);
			console.log("Added marker at:", location.lat, location.lng);
		});

		// Recenter map around the first filtered location
		if (locations.length > 0) {
			console.log("Centering map to:", locations[0].lat, locations[0].lng);
			map.setCenter({ lat: locations[0].lat, lng: locations[0].lng });
		}
	}

	// Function to clear all markers from the map
	function clearMarkers() {
		console.log("Clearing existing markers...");
		markers.forEach(marker => marker.setMap(null));
		markers = [];
	}		

	async function initMap() {
		// ✅ Import the required Google Maps libraries
		const { Map } = await google.maps.importLibrary("maps");
		const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");

		// ✅ Ensure map is correctly initialized as a `MapsApiMap` instance
		map = new Map(document.getElementById("map"), {
			center: { lat: 40.7128, lng: -74.0060 }, // Default to New York
			zoom: 12,
			mapId: "DEMO_MAP_ID", // You can create a custom map ID in Google Cloud Console
		});

		// ✅ Store the library reference for later use
		window.AdvancedMarkerElement = AdvancedMarkerElement;
	}

	// ✅ Define initMap as a global function
	window.initMap = initMap;

	function loadMap() {
		if (typeof google !== "undefined" && google.maps) {
			initMap();
		} else {
			console.error("Google Maps API failed to load.");
		}
	}
	function showLocation1() {
		let location = { name: "253 West 28 St, New York, NY 10001", lat: 40.7498, lng: -73.9935 };
		highlightLocation(location);
	}

	function showLocation2() {
		let location = { name: "402 Metropolitan Ave, Brooklyn NY 11211", lat: 40.7148, lng: -73.9570 };
		highlightLocation(location);
	}

	function showLocation3() {
		let location = { name: "203 E 109th St, New York NY 10029", lat: 40.7936, lng: -73.9442 };
		highlightLocation(location);
	}

	function showLocation4() {
		let location = { name: "570 Nostrand Ave, Brooklyn NY 11216", lat: 40.6775, lng: -73.9496 };
		highlightLocation(location);
	}

	function showLocation5() {
		let location = { name: "380 Grove St, Brooklyn NY 11237", lat: 40.7032, lng: -73.9184 };
		highlightLocation(location);
	}

	function showLocation6() {
		let location = { name: "945B Coney Island Ave, Brooklyn NY 11230", lat: 40.6304, lng: -73.9696 };
		highlightLocation(location);
	}

	function showLocation7() {
		let location = { name: "2935 Veterans Road W, Staten Island NY 10309", lat: 40.5344, lng: -74.2304 };
		highlightLocation(location);
	}

	// Common function to highlight location on the existing map
	function highlightLocation(location) {
		if (!map) {
			console.error("Map is not initialized!");
			return;
		}

		console.log("Highlighting location:", location);

		// Clear existing markers before adding the new one
		clearMarkers();

		// Add marker for the selected location
		let marker = new google.maps.Marker({
			position: { lat: location.lat, lng: location.lng },
			map: map,
			title: location.name
		});

		markers.push(marker);

		// Center the map to this location
		map.setCenter({ lat: location.lat, lng: location.lng });

		console.log("Centered map to:", location.lat, location.lng);
	}

	function initAutocomplete() {
		let input = document.getElementById("user-location");
		let autocomplete = new google.maps.places.Autocomplete(input, {
			types: ["geocode"], // Restrict to addresses only
			componentRestrictions: { country: "us" } // Restrict to a specific country (optional)
		});

		// Listen for place selection
		autocomplete.addListener("place_changed", function () {
			let place = autocomplete.getPlace();
			console.log(place); // Check the selected place details in the console
		});
	}

	// Load autocomplete when the page is ready
	window.onload = function () {
		initAutocomplete();
	};

</script>

<div>
    <a style="display: none" href="https://www.zocdoc.com/practice/curated-mental-health-84121?lock=true&isNewPatient=false&referrerType=widget" class="zd-plugin" data-type="book-button" 
       data-practice-id="84121" title="Curated Mental Health">
        <img src="https://offsiteSchedule.zocdoc.com/images/remote/rb_BookAnAppt_Blue_214x74.png?type=bobjs&monolith_provider_id=84121&practice_id=pt_COtg9cCSm0Kn8WyApCmdRx" 
             alt="Curated Mental Health" title="Curated Mental Health" style="border: 0"/>
    </a>
</div>
<script>
    (function (d) {
        var script = d.createElement('script'); 
        script.type = 'text/javascript'; 
        script.async = true; 
        script.src = 'https://offsiteschedule.zocdoc.com/plugin/embed';
        var s = d.getElementsByTagName('script')[0]; 
        s.parentNode.insertBefore(script, s);
    })(document);
</script>
<?php wp_footer(); ?>
</body>

</html>