var head = $("#allinaHeaderScript");
var hostURL = document.createElement('a');
hostURL.href = head.attr("src");
var host = "//" + hostURL.host;
var localAccountHost = host;
var AH_doDigexQ = head.attr("data-digexq") === "true";
var AH_showSub = head.attr("data-subnav") !== "false";
var AH_showRecent = head.attr("data-recent") !== "false";
var AH_showSearch = head.attr("data-search") !== "false";
var AH_debug = head.attr("data-debug") === "true";
var AH_showMessage = head.attr("data-message") === "true";
var AH_isSC = head.attr("data-issc") === "true";
var AH_careNow = head.attr("data-carenow") !== "false";
var AH_URLs;
var AH_Environ = $("#allinaHeaderScript").attr("data-environ");
var contentHost = "";
switch (AH_Environ) {
case "local":
contentHost = "http://localhost:3009";
break;
case "dev":
contentHost = "https://wc-assets.dx-dev.allinahealth.org";
break;
case "prod":
contentHost = "https://content.wellclicks.com";
break;
default:
contentHost = "https://content.wellclicks.com";
}
console.log("using contentHost=" + contentHost);
$.getJSON(contentHost + "/Scripts/" + AH_Environ + ".config.json", function (response) {
AH_URLs = response;
if (!$("link[href='" + AH_URLs.contenthost + "/content/css/responsive_style.css']").length && !$("link[href='" + AH_URLs.contenthost + "/content/css/headerfooter.css']").length) {
$(" ").appendTo("head");
}
if (AH_doDigexQ) {
if (!$("script[src='" + AH_URLs.contenthost + "/Scripts/allina/digexQ.js']").length) {
$("").appendTo("head");
}
}
console.log("using local header js; localaccthost=" + localAccountHost);
$.get(localAccountHost + "/dashboard/getheaderhtml", function (data) {
data = data
.replace(/{host}/g, AH_URLs.contenthost)
.replace(/{orgHost}/g, AH_isSC ? AH_URLs.schost : AH_URLs.orghost)
.replace(/{accthost}/g, AH_URLs.accthost)
.replace(/{fhmhost}/g, AH_URLs.fhmhost)
.replace(/{localaccthost}/g, localAccountHost);
(function (h) { h.className = h.className.replace('no-js', 'js'); })(document.documentElement);
/*! grunt-grunticon Stylesheet Loader - v2.1.6 | https://github.com/filamentgroup/grunticon | (c) 2015 Scott Jehl, Filament Group, Inc. | MIT license. */
!function () { function e(e, n, t) { "use strict"; var o = window.document.createElement("link"), a = n || window.document.getElementsByTagName("script")[0], i = window.document.styleSheets; return o.rel = "stylesheet", o.href = e, o.media = "only x", a.parentNode.insertBefore(o, a), o.onloadcssdefined = function (e) { for (var n, t = 0; t < i.length; t++) i[t].href && i[t].href === o.href && (n = !0); n ? e() : setTimeout(function () { o.onloadcssdefined(e) }) }, o.onloadcssdefined(function () { o.media = t || "all" }), o } function n(e, n) { e.onload = function () { e.onload = null, n && n.call(e) }, "isApplicationInstalled" in navigator && "onloadcssdefined" in e && e.onloadcssdefined(n) } !function (t) { var o = function (a, i) { "use strict"; if (a && 3 === a.length) { var r = t.navigator, d = t.document, s = t.Image, c = !(!d.createElementNS || !d.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect || !d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1") || t.opera && -1 === r.userAgent.indexOf("Chrome") || -1 !== r.userAgent.indexOf("Series40")), l = new s; l.onerror = function () { o.method = "png", o.href = a[2], e(a[2]) }, l.onload = function () { var t = 1 === l.width && 1 === l.height, r = a[t && c ? 0 : t ? 1 : 2]; t && c ? o.method = "svg" : t ? o.method = "datapng" : o.method = "png", o.href = r, n(e(r), i) }, l.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==", d.documentElement.className += " grunticon" } }; o.loadCSS = e, o.onloadCSS = n, t.grunticon = o }(this) }();
grunticon([AH_URLs.contenthost + "/Content/css/icons.data.svg.css", AH_URLs.contenthost + "/Content/css/icons.data.png.css", AH_URLs.contenthost + "/Content/css/icons.fallback.css"], grunticon.svgLoadedCallback);
$("#allinaHeaderScript").parent().html($.parseHTML(data));
if (window.location.href.indexOf("MyChart") > -1) {
$("#hdr_signin").hide();
}
if ($(location).attr("pathname") == '/search') {
var search = "?q=";
var queryParams = $(location).attr("search");
queryParams = queryParams.replace(/([+])/g, " ");
var additionalQuery = queryParams.indexOf('&');
if (additionalQuery <= 0) {
additionalQuery = queryParams.length;
}
var searchInput = queryParams.substring(search.length, additionalQuery);
$("#AH_search input[name='q']").val(searchInput);
$("#AH_mobile_search input[name='q']").val(searchInput);
$("#AH_search_container").show();
$("#AH_search_form").hide();
}
// Clears the global search textbox
$("#AH_search").on("click", "#clearSearchField", function (e) {
e.preventDefault();
$("#AH_search input[name='q']").val('');
$("#AH_search_container").show();
$("#AH_search_form").hide();
});
// Displays the search textbox
$("#AH_search").on("click", "#AH_search_item", function (e) {
e.preventDefault();
console.log("#AH_search_item");
$("#AH_search_container").hide();
$("#AH_search_form").show();
$(".nav-search-input").focus();
});
$("#AH_search1").on("click", "#AH_search_mobile", function (e) {
e.preventDefault();
console.log("#AH_search_mobile");
$('#AH_search_mobile').attr('style', 'display: none !important');
$("#AH_search_mobile_cancel").show();
$("#AH_mobile_search").show();
$(".nav-search-input").focus();
if ($body.hasClass("is-activeNav")) {
$(".js-nav-toggle").click();
}
});
$("#AH_search1").on("click", "#AH_search_mobile_cancel", function (e) {
e.preventDefault();
$("#AH_search_mobile").show();
$("#AH_search_mobile_cancel").hide();
$("#AH_mobile_search").hide();
});
$("#AH_search1").on("click", "#Menu", function (e) {
e.preventDefault();
$("#AH_search_mobile").show();
$("#AH_search_mobile_cancel").hide();
$("#AH_mobile_search").hide();
});
$.ajax({
url: localAccountHost + "/dashboard/getsessionstatus",
dataType: "jsonp",
success: function (data) {
if (typeof dataLayer !== "undefined") {
dataLayer.push({
'status': data.isSignedIn ? 'signedIn' : 'notSignedIn'
});
if (data.loginFailed) {
dataLayer.push({
'event': 'unsuccessfulSignIn',
'location': window.location.href
});
}
if (data.loginSuccess) {
dataLayer.push({
'event': 'successfulSignIn',
'location': window.location.href
});
}
}
if (data.isSignedIn) {
var fName = data.name;
var hasMyChart = data.hasMyChart;
var hasFHM = data.hasFHM;
if (fName.length > 7) {
fName = fName.substring(0, 6) + "...";
}
document.getElementById("accountText").innerHTML = fName;
$("#signedInItems").show();
$("#anonymousItems").hide();
if (window.location.href.indexOf("MyChart") < 0) {
$("#hdr_signout").show();
$("#AH_sign_in_divider").hide();
}
$("#hdr_signin").hide();
if (hasMyChart) {
$("#MyChartItems").show();
$("#NoMyChart").hide();
$("#hasFHM").show();
$("#noFHM").hide();
var myChartURL = AH_URLs.accthost + "/MyChart/inside.asp?mode=stdfile&option=ApptScheduling&jsenabled=1";
$("#makeAppt").attr("href", myChartURL);
$("#menu_appointments").removeClass("displayForMychart");
$("#menu_bill").removeClass("displayForMychart");
$("#menu_messages").removeClass("displayForMychart");
$("#menu_results").removeClass("displayForMychart");
} else {
$("#MyChartItems").hide();
$("#NoMyChart").show();
var apptURL = AH_URLs.accthost + "/scheduling/option";
$("#makeAppt").attr("href", apptURL);
if (hasFHM) {
$("#hasFHM").show();
$("#noFHM").hide();
} else {
$("#hasFHM").hide();
$("#noFHM").show();
}
}
} else {
document.getElementById("accountText").innerHTML = "My account";
}
return;
}
});
$(document).ready(function () {
setWindowSize();
window.addEventListener('resize', setWindowSize);
var pcCookie = readAHCookie("AH_pageCount");
if (pcCookie == "") {
writeAHCookie("AH_pageCount", 1);
} else if (pcCookie < 6) { //the count will actually be 6 when we reach three pages because of how the page loads twice.
writeAHCookie("AH_pageCount", parseInt(pcCookie) + 1);
}
if (!AH_doDigexQ) {
LogPath();
}
if (AH_showSub) {
$("#AH_subNav").show();
}
if (AH_showRecent) {
$("#AH_recent").show();
}
if (AH_showSearch) {
$("#AH_search").show();
$("#AH_search1").show();
}
if (AH_showMessage) {
var messageCook = readAHCookie("AH_showMessage");
var AHPageCount = parseInt(readAHCookie("AH_pageCount"));
if (messageCook != "false" && AHPageCount > 5) { //the count will actually be 6 when we reach three pages because of how the page loads twice.
$("#AH_message").show();
}
}
if (!AH_careNow) {
$("#AH_careNowModal").hide();
$("#AH_careNowWeb").show();
}
if (AH_debug && $("#cookSection").length < 1) {
var cook = getCookie("fhmAllinaHealth");
if (cook.length > 0) {
$("
" + cook + "
").appendTo("#AH_header");
}
}
$("#AH_header").on("click", ".btnToggler", function () {
var AHControls = $(this).attr("data-ahcontrols");
$('*[aria-controls="' + AHControls + '"]').click();
$('html, body').animate({
scrollTop: $("#buttonscontact").offset().top
}, 500);
});
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
$("#AH_header").on("click", "#AHNavSignout", function (e) {
e.preventDefault();
expireAllCookies('MyChartSessionToken', ['/']);
expireAllCookies('MyChartSessionTokenmychart', ['/']);
expireAllCookies('MyChartSessionToken4mychart', ['/']);
expireAllCookies('MyChartNetAuthenticationTicket4mychart', ['/']);
expireAllCookies('UpdateMyChartContext4mychart', ['/']);
expireAllCookies('fhmAllinaHealth', ['/']);
expireAllCookies('.ASPXAUTH', ['/']);
if (document.cookie.indexOf('ASPSESSIONID') > -1) {
var cstart = document.cookie.indexOf('ASPSESSIONID');
var cend = document.cookie.indexOf('=', cstart);
if (cend == -1) {
cend = document.cookie.length;
}
var mcc = document.cookie.substr(cstart, cend - cstart);
expireAllCookies(mcc, ['/']);
}
if (document.cookie.indexOf('PD_STATEFUL') > -1) {
var cstart = document.cookie.indexOf('PD_STATEFUL');
var cend = document.cookie.indexOf('=', cstart);
if (cend == -1) {
cend = document.cookie.length;
}
var mcc = document.cookie.substr(cstart, cend - cstart);
expireAllCookies(mcc, ['/']);
}
self.location.href = $("#AHNavSignout").attr('href');
});
$("#AH_header").on("click", "#hdr_signout", function (e) {
e.preventDefault();
expireAllCookies('MyChartSessionToken', ['/']);
expireAllCookies('MyChartSessionTokenmychart', ['/']);
expireAllCookies('MyChartSessionToken4mychart', ['/']);
expireAllCookies('MyChartNetAuthenticationTicket4mychart', ['/']);
expireAllCookies('UpdateMyChartContext4mychart', ['/']);
expireAllCookies('fhmAllinaHealth', ['/']);
expireAllCookies('.ASPXAUTH', ['/']);
if (document.cookie.indexOf('ASPSESSIONID') > -1) {
var cstart = document.cookie.indexOf('ASPSESSIONID');
var cend = document.cookie.indexOf('=', cstart);
if (cend == -1) {
cend = document.cookie.length;
}
var mcc = document.cookie.substr(cstart, cend - cstart);
expireAllCookies(mcc, ['/']);
}
if (document.cookie.indexOf('PD_STATEFUL') > -1) {
var cstart = document.cookie.indexOf('PD_STATEFUL');
var cend = document.cookie.indexOf('=', cstart);
if (cend == -1) {
cend = document.cookie.length;
}
var mcc = document.cookie.substr(cstart, cend - cstart);
expireAllCookies(mcc, ['/']);
}
self.location.href = $("#hdr_signout").attr('href');
});
if ($.isFunction($().dialog)) {
$("#MyChartProvisionHeader").dialog({
autoOpen: false,
modal: true,
width: 400,
title: "Add MyChart to Account?",
position: { my: "center", at: "center", of: window }
});
} else {
$("#MyChartProvisionHeader").hide();
}
$("#signedInItems").on("click", ".provisionMyChartHeader", function (e) {
e.preventDefault();
var href = $(this).attr('href');
if ($.isFunction($().modal)) {
$("#MyChartProvisionHeaderModal").modal("show");
} else if ($.isFunction($().dialog)) {
$("#MyChartProvisionHeader").dialog("open");
} else {
if (confirm("Do you want to add your Allina Health MyChart to your account?")) {
location.href = "/signup/getmychart";
}
}
});
if ($.isFunction($().dialog)) {
$("#doNotAddMyChartHeader").click(function (e) {
e.preventDefault();
$("#MyChartProvisionHeader").dialog("close");
});
}
$(".careSwitch").click(function (e) {
e.preventDefault();
var id = $(this).attr("id");
if (id == "careCity") {
$("#careFlex").addClass("careMobile");
$("#careLabel").html('Enter your city/state to find care');
$("#careCity").hide();
$("#careZip").show();
$("#care_zip").val('').hide();
$("#care_city").show();
$("#careState").show();
} else {
$("#careFlex").removeClass("careMobile");
$("#careLabel").html('Enter your ZIP code to find care');
$("#careCity").show();
$("#careZip").hide();
$("#care_zip").show();
$("#care_city").val('').hide();
$("#care_state").val('MN');
$("#careState").hide();
}
});
$("#findCare").click(function (e) {
e.preventDefault();
var goodToGo = true;
// Add form validation [care_zip, care_city] 'care_state' will always have a value
var zipRegex = /^\d{5}$/;
if (zipRegex.test($("#care_zip").val()) == "" && ($("#care_state").val() == "" || $("#care_city").val() == "")) {
goodToGo = false;
alert("Please enter a valid city/state or a ZIP code.");
return false;
}
if (goodToGo) {
window.onbeforeunload = null;
document.forms["formFindWalkInCare"].submit();
}
});
$(".alphaonly").on("keydown", function (e) {
// Allow controls such as backspace
var arr = [8, 16, 17, 20, 32, 35, 36, 37, 38, 39, 40, 45, 46];
// Allow letters
for (var i = 65; i <= 90; i++) {
arr.push(i);
}
// Prevent default if not in array
if (jQuery.inArray(e.which, arr) === -1) {
e.preventDefault();
}
});
$('.numericonly').keyup(function (e) {
var node = $(this);
node.val(node.val().replace(/[^0-9]/g, ''));
});
$(".mc-click").click(function (e) {
e.preventDefault();
var url = $(this).attr("data-href");
window.location.href = url;
});
$(document).on("click", 'a[href="#locations-modal"]', function (e) {
$('#locations-modal').attr('data-current-consumer-location', $('#hidConsumerLocationCookieData').val());
updateConsumerLocationModal();
});
$(document).keypress(function (e) {
if ($(document).find(".aos-modal-blocker").length > 0 && (e.keycode == 13 || e.which == 13)) {
e.preventDefault();
showSearchResults();
}
});
$("#userLocationCitySearch").click(function () {
showSearchResults();
});
/*addGetcarePopupMenuClickEvent()*/
addGetcarePopupMenuHoverEvent();
window.onclick = function (event) {
hideGetcarePopupMenu(event)
}
function showSearchResults() {
$("#consumerLocationSearch").show();
var search = $('#userLocationCity').val();
if (/^[0-9]+$/.test(search)) {
displayPartialZip(search);
} else {
displayPartialCity();
}
};
//Copied from responsive_main to 100% block all clicks to the menu links
//Reactoring PBI: 36866 - https://dev.azure.com/AllinaHealth/DigEx/_workitems/edit/36866
$(".ahn .nav-header-primary .nav-menu>li>a").on("click", function (e) {
//Supress clicks on primary header top links IF we detect mobile device thru existence of touchpoints on the browser
if (navigator.maxTouchPoints > 0) {
e.preventDefault();
if ((isActiveNav())) {
var $navItem = $(this).closest('li');
var $navMenu = $(this).closest('ul.nav-menu');
var isSelfActive = $navItem.hasClass('active');
$($navMenu).find('li').removeClass('active');
$($navMenu).find("li.init-active").addClass('active');
if (isSelfActive) {
// close the menu
$navItem.removeClass('active');
$navMenu.removeClass('active');
} else {
$navItem.addClass('active');
$navMenu.addClass('active');
}
if ($('.nav-header-primary .nav-menu > li').hasClass('active')) {
$('.nav-header-primary .nav-menu .hide-when-open').addClass('hide');
$('.nav-contact-us').addClass('active');
} else {
$('.nav-header-primary .nav-menu .hide-when-open').removeClass('hide');
}
}
}
});
function isActiveNav() { // (6/21)
return $('html, body').hasClass('is-activeNav');
}
$(document).on('click', '.suggested-city', function (e) {
var data = $(e.target).data();
$.ajax({
url: AH_URLs.apihost + "/utility/getcitystateitem/",
data: data,
dataType: "json",
type: 'POST',
success: function (data) {
var htmlEl = "";
for (var i = 0; i < data.length; i++) {
htmlEl += '
' + data[i]['City'] + ', ' + data[i]['StateCode'] + ' ' + data[i]['ZipCode'] + '
Pick Location
';
}
htmlEl += '
';
$('#citySuggestionsList').replaceWith(htmlEl);
return;
},
})
});
$(document).on('click', '.delete-user-location', function (e) {
removeConsumerLocationCookie();
});
$(document).on('click', "#locations-modal .close-modal", function (e) {
if ($('#locations-modal').attr('data-current-consumer-location') !== $('#hidConsumerLocationCookieData').val()) {
triggerConsumerLocationModalChange();
}
});
$(document).on('click', "#pickUserLocation", function (e) {
addConsumerLocationCookie(e);
});
var ua = window.navigator.userAgent;
var isIE = /MSIE|Trident/.test(ua);
if (isIE) {
if (window.location.href.toLowerCase().indexOf("ie-support-ending") > -1) {
/* Do nothing */
} else {
window.location.href = "https://www.allinahealth.org/ie-support-ending";
}
}
});
});
$.getScript(AH_URLs.contenthost + "/scripts/responsive_main.js", function () { });
});
function addGetcarePopupMenuClickEvent() {
$("#getCareNow").click(function (event) {
event.preventDefault();
if ($(".gcn-popup-menu").is(":visible")) {
$(".gcn-popup-parent").hide();
} else {
$(".gcn-popup-parent").show();
}
})
}
function hideGetcarePopupMenu(event) {
if (!event.target.matches("a#getCareNow")) {
$(".gcn-popup-parent").hide();
}
}
function addGetcarePopupMenuHoverEvent() {
$(".last-item-button").mouseenter(function () {
clearTimeout($(this).data('timeoutId'));
$(".gcn-popup-parent").fadeIn("slow");
}).mouseleave(function () {
var someElement = $("#getCareNow");
var timeoutId = setTimeout(function () {
$(".gcn-popup-parent").fadeOut("slow");
}, 50);
//set the timeoutId, allowing us to clear this trigger if the mouse comes back over
someElement.data('timeoutId', timeoutId);
});
}
var headerLoaded = true;
function setWindowSize() {
// Viewport height
var vh = window.innerHeight;
// Set value in the --vh custom property to the root of the document, property used in css file
document.documentElement.style.setProperty('--vh', '${vh}px');
}
function expireAllCookies(name, paths) {
var expires = new Date(0).toUTCString();
// expire null-path cookies as well
document.cookie = name + '=; expires=' + expires;
for (var i = 0, l = paths.length; i < l; i++) {
document.cookie = name + '=; path=' + paths[i] + '; expires=' + expires;
}
}
function writeAHCookie(name, value) {
document.cookie = name + "=" + value + "; path=/;domain=" + window.location.hostname.substring(window.location.hostname.indexOf('.'));
}
function readAHCookie(name) {
var i, c, ca, nameEQ = name + "=";
ca = document.cookie.split(';');
for (i = 0; i < ca.length; i++) {
c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) == 0) {
return c.substring(nameEQ.length, c.length);
}
}
return '';
}
function displayPartialCity() {
$('#citySuggestions').show();
$.ajax({
url: AH_URLs.apihost + "/utility/autocompletecity/",
data: {
search: $('#userLocationCity').val()
},
dataType: 'json',
type: 'POST',
success: function (data) {
var htmlEl = '';
if (data.length === 0) {
htmlEl += '
No suggestions, please check spelling.
'
}
for (var i = 0; i < data.length; i++) {
htmlEl += '
' + data[i]['City'] + ', ' + data[i]['StateCode'] + '
Pick City
';
}
htmlEl += '
';
$("#consumerLocationSearch").hide();
$('#citySuggestionsList').replaceWith(htmlEl);
return;
}
});
}
function displayPartialZip(search) {
$('#citySuggestions').show();
if (search.length !== 5) {
var htmlEl = 'Invalid ZIP code, please check entry.
';
$("#consumerLocationSearch").hide();
$('#citySuggestionsList').replaceWith(htmlEl);
return;
}
$.ajax({
url: AH_URLs.apihost + "/utility/autocompletezip/",
data: {
search: search,
},
dataType: 'json',
type: 'POST',
success: function (data) {
var htmlEl = "";
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
htmlEl += '
' + data[i]['City'] + ', ' + data[i]['StateCode'] + ' ' + data[i]['ZipCode'] + '
Pick Location
';
}
} else {
htmlEl += 'ZIP Code not found in search area, please check entry.';
}
htmlEl += '
';
$("#consumerLocationSearch").hide();
$('#citySuggestionsList').replaceWith(htmlEl);
return;
},
})
}
function getConsumerLocationCookie() {
// JS Solution
var data = jQuery.parseJSON(readConsumerLocationCookie());
updateConsumerLocationData(data);
updateConsumerLocationLinkText();
$('#hidConsumerLocationCookieData').trigger('setData');
}
function addConsumerLocationCookie(e) {
var elData = e.target.dataset;
var data = {
ZipCode: elData['zip'],
City: elData['city'],
StateCode: elData['state']
};
// JS Solution
writeConsumerLocationCookie(data);
updateConsumerLocationData(data);
updateConsumerLocationModal();
}
function writeConsumerLocationCookie(data) {
document.cookie = "AH_ConsumerLocation=" + JSON.stringify(data) + "; path=/;domain=" + AH_URLs.basehost;
}
function readConsumerLocationCookie() {
var cookieNameEq = "AH_ConsumerLocation=";
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
while (cookie.charAt(0) == ' ') {
cookie = cookie.substring(1, cookie.length);
}
if (cookie.indexOf(cookieNameEq) == 0) {
return cookie.substring(cookieNameEq.length, cookie.length);
}
}
var data = {
ZipCode: "",
City: "",
StateCode: ""
};
return JSON.stringify(data);
}
function expireConsumerLocationCookie() {
var expires = new Date(0).toUTCString();
document.cookie = "AH_ConsumerLocation=; path=/;domain=" + AH_URLs.basehost + "; expires=" + expires + ";";
}
function removeConsumerLocationCookie() {
var data = {
ZipCode: '',
City: '',
StateCode: ''
};
// JS Solution
expireConsumerLocationCookie();
updateConsumerLocationData(data);
updateConsumerLocationModal();
}
function updateConsumerLocationModal() {
var $consumerLocationData = $('#hidConsumerLocationCookieData');
if ($consumerLocationData.val() !== '') {
$('#citySuggestions').hide();
$('#citySuggestionsList').hide();
$('#userLocationCity').hide();
$('#userLocationCityLabel').hide();
$('#userLocationCitySearch').hide();
$("#consumerLocation").text($consumerLocationData.attr('data-city') + ', ' + $consumerLocationData.attr('data-state') + ' ' + $consumerLocationData.attr('data-zip'));
$('#savedLocation').show();
} else {
$('#consumerLocation').text('');
$('#savedLocation').hide();
$('#userLocationCity').val('');
$('#userLocationCity').show();
$('#userLocationCityLabel').show();
$('#userLocationCitySearch').show();
$('#citySuggestionsList').hide();
}
}
function triggerConsumerLocationModalChange() {
updateConsumerLocationLinkText();
$('#hidConsumerLocationCookieData').trigger('updateData');
}
function LogPath(digexID) {
var inputdata = { title: document.title, url: window.location.href };
if (digexID !== undefined) {
inputdata.digexID = encodeURIComponent(digexID);
}
$.ajax({
url: AH_URLs.accthost + "/contact/LogPath",
data: inputdata,
dataType: "jsonp",
success: function (data) {
return;
}
});
}