Blog

KB Dumpster Services | Roll-Off Dumpsters Apache Junction AZ


Make sure you are not offline.’, password: ‘Incorrect name/password combination’, tryAgain: ‘Try again’ }, NavigationAreaParams: { ShowBackToHomeOnInnerPages: true, NavbarSize: 4, NavbarLiveHomePage: ‘https://www.kbdumpsters.com/’, BlockContainerSelector: ‘.dmBody’, NavbarSelector: ‘#dmNav:has(a)’, SubNavbarSelector: ‘#subnav_main’ }, hasCustomCode: true, planID: ‘753’, customTemplateId: ‘null’, siteTemplateId: ‘null’, productId: ‘DM_DIRECT’, disableTracking: false, pageType: ‘FROM_SCRATCH’, isRuntimeServer: true, siteCacheKey: ‘1647977527802_1775e517fdf14099a4c3302d6e8d5f9d’, siteInfo: null, }; window.Parameters.LayoutID = {}; window.Parameters.LayoutID[window._currentDevice] = 6; window.Parameters.LayoutVariationID = {}; window.Parameters.LayoutVariationID[window._currentDevice] = 5; ]]]]]]>]]]]>]]> > 0 } ]]]]]]>]]]]>]]> KB Dumpster Services | Roll-Off Dumpsters Apache Junction AZ 1){ $(element).find(‘.multipleYextError’).addClass(‘hasError’); return; }else if(data.config.type === ‘none’){ $(element).find(‘.editorOnlyInfo’).addClass(‘inEditor’); } } } /* refresh yext script */ window.refreshYext = function(){ loadYext(true); } //function for Omniture tracking window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } /* draw yext map */ var drawMap = function(yextData){ var zoom = data.config.mapZoom; var yData = yextData.entities[0].attributes; var addressQuery = yData[‘address1’] + ” ” + yData[‘address2’] + ” ” + yData[‘city’] + ” ” + yData[‘state’] + ” ” + yData[‘zip’]; dmAPI.drawMap({addressQuery: addressQuery, zoom: zoom, container: $(element).find(‘.yextMap’)}); } var formatPhoneBeforeRender = function(num,cb) { if (!cb) cb = function(){return} if(data.config.formatPhone){ var s2 = (“”+num).replace(/D/g, ”); var m = s2.match(/^(d{3})(d{3})(d{4})$/); var formatted = (!m) ? null : “(” + m[1] + “) ” + m[2] + “-” + m[3]; cb(formatted); return formatted; } else { cb(num); return num; } } var displayTextdList = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { if (yextAtt[i] === 'Android Pay') { list += '

  • Google Pay’; } else { list += ‘
  • ‘ + yextAtt[i] + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySpecialties = function(yextData){ var list = “”; if(yextData.entities[0].attributes[“specialties”]) { var yextAtt = yextData.entities[0].attributes[“specialties”] } else if (yextData.entities[0].attributes[“specialities”]) { var yextAtt = yextData.entities[0].attributes[“specialities”] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayHours = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for(var i=0;i < yextAtt.length;i++) { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if(yextAtt) { var yextAtt = yextAtt.split(", "); for(var i=0;i < yextAtt.length;i++) { if((/s/.test(yextAtt[i])) === false){ yextAtt[i] = yextAtt[i] + ' - ' + yextAtt[i+1] yextAtt.splice(i+1, 1) } if (yextAtt[i].includes('day') === false ){ var leftSide = ' '; var rightSide = yextAtt[i] }else { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) } list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css('display','none'); } } var displayOpenHours = function(type, yextData){ if(yextData.entities[0].attributes['timezone']){ var zone = yextData.entities[0].attributes['timezone'] } else { var zone = false } if(zone){ var time = new Date().toLocaleString("en-US", {timeZone: zone}); var today = new Date(time ); var thirtyMins = 30 * 60 * 1000 var days = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']; var daysShort = ['Sun','Mon','Tues','Wed','Thurs','Fri','Sat']; var day = days[today.getDay()]; var hour = today.getHours(); var min = today.getMinutes(); var dd = ("0" + today.getDate()).slice(-2); var mm = ("0" + (today.getMonth() + 1)).slice(-2) var yyyy = today.getFullYear(); var todayDate = yyyy + '-' + mm + '-' + dd var mm = mm - 1 const tomorrow = new Date(today) tomorrow.setDate(tomorrow.getDate() + 1) var mmTmw = ("0" + (tomorrow.getMonth() + 1)).slice(-2) var ddTmw = ("0" + tomorrow.getDate()).slice(-2) var yyyyTmw = tomorrow.getFullYear(); var nextDay = days[tomorrow.getDay()] var tommorrow = yyyyTmw + '-' + mmTmw + '-' + ddTmw var mmTmw = mmTmw - 1 } if(yextData.entities[0].attributes[type + '-' + day]) { var yextAtt = yextData.entities[0].attributes[type + '-' + day] if (yextAtt === "Closed"){ yextAtt = false } } else { var yextAtt = false } //check if day is closed if(yextData.entities[0].attributes[type + '.' + day + '.isClosed'] === true) { var closed = true } //collects business holiday hours if(yextData.entities[0].attributes[type + '.holidayHours']){ var holidayHours = yextData.entities[0].attributes[type + '.holidayHours'] } else{ var holidayHours = false } //gets next days start time if(yextData.entities[0].attributes[type + '.' + nextDay + '.isClosed'] === true){ var tomorrowOpen = false } else { var tomorrowOpen = true var tmrwStart = yextData.entities[0].attributes[type + '-' + nextDay].split(" - ")[0] } //checks if holiday hours change if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].openIntervals){ yextAtt = holidayHours[i].hoursFormatted } } } //split hours if(yextAtt && yextAtt.includes(",")){ yextAtt = yextAtt.split(", ") for(var i=0;i < yextAtt.length;i++){ var end = yextAtt[i].split(' - ')[1] var start = yextAtt[i].split(' - ')[0] if (i+1 != yextAtt.length){ var nextStart = yextAtt[i + 1].split(' - ')[0] } if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(nextStart.includes("pm") && nextStart.split(/s+|:/)[0] != "12"){ var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart.split(/s+|:/)[0]) + 12, parseInt(nextStart.split(/s+|:/)[1])) } else { var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart), parseInt(nextStart.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate startDate && today endDate && (i+1 != yextAtt.length) && today endDate && i+1 === yextAtt.length){ var closed = true } } } if(yextAtt || closed) { if(typeof yextAtt === "string"){ var start = yextAtt.split(" - ")[0] var end = yextAtt.split(" - ")[1] if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else if (end.includes("am") && end.split(/s+|:/)[0] === "12") { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) - 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate endDate){ var closed = true } else if(today < startDate){ var closed = true //check if closing soon } else if (endDate - today < thirtyMins && endDate - today < 0 === false ){ var status = "Closing Soon " var cssClass = "soonStatus" var busHours = ' • ' + end //opened 24 hours } else if(start === '12:00 am' && end === '11:59 pm'){ var status = "Open " var cssClass = "allDayStatus" var busHours = ' 24 hours ' //opened } else { var status = "Open " var cssClass = "openedStatus" var busHours = '• Closes ' + end } } if(closed){ // closed & opening today if((today < startDate)){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' Opens ' + start //closed & open tomorrow } else if(closed && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart //closed and not open tomorrow } else if(closed && tomorrowOpen != true){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } // checks if holiday if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === false){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } else if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } if(cssClass){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].classList.add(cssClass); } } if(status){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].innerText = status; } } if(cssClass === 'allDayStatus'){ var hoursWidgets = $(element).find('.openHours') for( var i=0; i 1){ var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { var openHoursLength = hoursWidgets[i].childNodes.length var oldHours = hoursWidgets[i] oldHours.removeChild(oldHours.childNodes[openHoursLength - 1]) } } var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].append(busHours) } } var displayHolidayHoursList = function(type,yextData) { var list = ""; if(yextData.entities[0].attributes["hours.holidayHours"]) { var yextAtt = yextData.entities[0].attributes["hours.holidayHours"] } else if(yextData.entities[0].attributes["holidayHours"]) { var yextAtt = yextData.entities[0].attributes["holidayHours"] } else { var yextAtt = false } if(yextAtt) { for (var i=0; i -1) { // write to dom list += '
  • ‘ + yextAtt[i].dateFormatted + ‘ – ‘ + yextAtt[i].hoursFormatted + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { // if in editor display place holder $(element).html(emptyListPlaceHolder); } else { // if empty, hide element on runtime $(element).css(‘display’,’none’); } } var displayServiceArea = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if (firstOnly) { list = ‘
  • ‘ + yextAtt[0] + ”; $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextData.entities[0].attributes[type + “.places”] for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayPhoneList = function(type,yextData) { var list = “”; var locData = yextData.entities[0].attributes; if(locData.phone) { list += ‘
  • Main: ‘ + formatPhoneBeforeRender(locData.phone) + ”; } if(locData.localPhone) { list += ‘
  • Local: ‘ + formatPhoneBeforeRender(locData.localPhone) + ”; } if(locData.alternatePhone) { list += ‘
  • Alternate: ‘ + formatPhoneBeforeRender(locData.alternatePhone) + ”; } if(locData.tollFreePhone) { list += ‘
  • Toll Free: ‘ + formatPhoneBeforeRender(locData.tollFreePhone) + ”; } if(locData.mobilePhone) { list += ‘
  • Mobile: ‘ + formatPhoneBeforeRender(locData.mobilePhone) + ”; } if(locData.faxPhone) { list += ‘
  • Fax: ‘ + formatPhoneBeforeRender(locData.faxPhone) + ”; } if(locData.ttyPhone) { list += ‘
  • TTY: ‘ + formatPhoneBeforeRender(locData.ttyPhone) + ”; } if(list.length > 0) { $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } emitYextPhoneRenderEvent(formatPhoneBeforeRender(locData.phone)); } var getNumDaysBetween = function(d1, d2) { var diff = d1.getTime() – d2.getTime(); return diff / (1000 * 60 * 60 * 24); }; var orderPaymentsList = function(listData) { if(listData.indexOf(‘Discover’) >= 0) { listData.splice(listData.indexOf(“Discover”), 1); listData.unshift(‘Discover’); } if(listData.indexOf(‘American Express’) >= 0) { listData.splice(listData.indexOf(“American Express”), 1); listData.unshift(‘American Express’); } if(listData.indexOf(‘MasterCard’) >= 0) { listData.splice(listData.indexOf(“MasterCard”), 1); listData.unshift(‘MasterCard’); } if(listData.indexOf(‘Visa’) >= 0) { listData.splice(listData.indexOf(“Visa”), 1); listData.unshift(‘Visa’); } return listData } var displayImageList = function(type,yextData) { var list = “”; var listData = orderPaymentsList(_yextData.entities[0].attributes[type]); for (var i=0; i< listData.length; i++) { list += '' + listData[i] + '‘ } if(list.length > 0) { $(element).find(‘#paymentOptionsImages’).html(list) } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySocialIcons = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes.facebookPageUrl) { list += ‘ ‘ } if(yextData.entities[0].attributes.twitterHandle) { list += ‘ ‘ } if(yextData.entities[0].attributes.instagramHandle) { list += ‘ ‘ } if(list.length > 0) { $(element).find(‘#socialIcons’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var getImageUrl = function(name,style) { var cdnPath = ‘https://cdn.websites.hibu.com/-resellers-preview/_cc_icons/’; if(!style) { style = ‘_d.svg’ } if (name === “ZELLE”){ name = “Zelle” } var imageUrl=”; switch (name) { case ‘Visa’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘MasterCard’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘American Express’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Android Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Apple Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Bitcoin’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Cash’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Check’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Diners Club’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Financing’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Invoice’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘PayPal’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Samsung Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Traveler’s Check”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Zelle”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break } return imageUrl } function emitYextPhoneRenderEvent(phone) { var yextPhoneRenderEvent = new CustomEvent(‘YextPhoneChangeEvent’, { detail: phone, bubbles: true, cancelable: true }); document.dispatchEvent(yextPhoneRenderEvent); } var initYextElements = function(yextData,widgetType){ if (widgetType === ‘address’ && data.config.drawMap) { drawMap(yextData); } else if (widgetType === ‘paymentOptions’ && data.config.showPaymentsAs === ‘paymentIcons’) { displayImageList(widgetType,yextData); } else if (widgetType === ‘phone’ && data.config.phoneShowAs === ‘list’) { displayPhoneList(widgetType,yextData); // check for any list type } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘button’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(“.dmButtonLink”).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘text’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(‘.yextPhoneText’).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if (widgetType === ‘services’ || widgetType === ‘googleAttributesFormatted’ || widgetType === ‘languages’ || widgetType === ‘paymentOptions’ || widgetType === ‘keywords’ || widgetType === ‘products’ || widgetType === ‘associations’ || widgetType === ‘brands’) { setTimeout(function() { displayTextdList(widgetType,yextData) },1); } else if(widgetType === ‘specialties’) { setTimeout(function() { displaySpecialties(yextData) },1) }else if (widgetType ===’serviceArea’) { setTimeout(function() { displayServiceArea(widgetType,yextData,data.config.showServiceAreaFirst) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘list’ && data.config.isList == false) { setTimeout(function() { displayHours(widgetType,yextData) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘openHours’) { setTimeout(function() { displayOpenHours(widgetType,yextData) },1) } else if (widgetType === ‘social’) { displaySocialIcons(widgetType,yextData); } else if (widgetType === ‘holidayHours’) { setTimeout(function() { displayHolidayHoursList(widgetType,yextData) },1); } else if (widgetType === ‘hours’) { //hide hours list if toggle enabled if(data.config.hideHoursList === true) { $(element).find(‘.yextHours’).css(‘display’,’none’); } } else if (widgetType === ‘description’ || widgetType === ‘yearEstablished’ || widgetType === ’email’ || widgetType === ‘name’) { // check hideIfEmpty(widgetType,yextData) } //remove error if script not entered correctly. $(element).find(‘.wrongScriptError’).removeClass(‘hasError’); } function hideIfEmpty(type,yextData) { if(!yextData.entities[0].attributes[type]) { if(data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } } // TODO CHANGE TO EVENT CALL BACK var startIntervalToWaitAndLoadWidgets = function(widgetType) { //start interval for this specific widget var intervalCheckYextLoaded = setInterval(function(){ if (window._yextData) { clearInterval(intervalCheckYextLoaded); initYextElements(window._yextData,widgetType); } },50) } /* initialization */ if(data.inEditor){ window.refreshYext && window.refreshYext(); $(document).ready(function(){ if(!window.yextInitialized){ $(element).find(‘.missingYextWidget’).addClass(‘show’); } else { $(element).find(‘.missingYextWidget’).removeClass(‘show’); } }); } else { dmAPI.runOnReady(‘yext’ , function(){ loadYext(); }); // Before navigating with Ajax, we set the yext initialized to be false so it will be initialized again after the ajax navigation dmAPI.runBeforeAjaxNavigation(‘yext’, function(){ window.yextInitialized = false; }); } }; ]]]]]]>]]]]>]]>
  • 1){ $(element).find(‘.multipleYextError’).addClass(‘hasError’); return; }else if(data.config.type === ‘none’){ $(element).find(‘.editorOnlyInfo’).addClass(‘inEditor’); } } } /* refresh yext script */ window.refreshYext = function(){ loadYext(true); } //function for Omniture tracking window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } /* draw yext map */ var drawMap = function(yextData){ var zoom = data.config.mapZoom; var yData = yextData.entities[0].attributes; var addressQuery = yData[‘address1’] + ” ” + yData[‘address2’] + ” ” + yData[‘city’] + ” ” + yData[‘state’] + ” ” + yData[‘zip’]; dmAPI.drawMap({addressQuery: addressQuery, zoom: zoom, container: $(element).find(‘.yextMap’)}); } var formatPhoneBeforeRender = function(num,cb) { if (!cb) cb = function(){return} if(data.config.formatPhone){ var s2 = (“”+num).replace(/D/g, ”); var m = s2.match(/^(d{3})(d{3})(d{4})$/); var formatted = (!m) ? null : “(” + m[1] + “) ” + m[2] + “-” + m[3]; cb(formatted); return formatted; } else { cb(num); return num; } } var displayTextdList = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { if (yextAtt[i] === 'Android Pay') { list += '

  • Google Pay’; } else { list += ‘
  • ‘ + yextAtt[i] + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySpecialties = function(yextData){ var list = “”; if(yextData.entities[0].attributes[“specialties”]) { var yextAtt = yextData.entities[0].attributes[“specialties”] } else if (yextData.entities[0].attributes[“specialities”]) { var yextAtt = yextData.entities[0].attributes[“specialities”] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayHours = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for(var i=0;i < yextAtt.length;i++) { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if(yextAtt) { var yextAtt = yextAtt.split(", "); for(var i=0;i < yextAtt.length;i++) { if((/s/.test(yextAtt[i])) === false){ yextAtt[i] = yextAtt[i] + ' - ' + yextAtt[i+1] yextAtt.splice(i+1, 1) } if (yextAtt[i].includes('day') === false ){ var leftSide = ' '; var rightSide = yextAtt[i] }else { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) } list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css('display','none'); } } var displayOpenHours = function(type, yextData){ if(yextData.entities[0].attributes['timezone']){ var zone = yextData.entities[0].attributes['timezone'] } else { var zone = false } if(zone){ var time = new Date().toLocaleString("en-US", {timeZone: zone}); var today = new Date(time ); var thirtyMins = 30 * 60 * 1000 var days = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']; var daysShort = ['Sun','Mon','Tues','Wed','Thurs','Fri','Sat']; var day = days[today.getDay()]; var hour = today.getHours(); var min = today.getMinutes(); var dd = ("0" + today.getDate()).slice(-2); var mm = ("0" + (today.getMonth() + 1)).slice(-2) var yyyy = today.getFullYear(); var todayDate = yyyy + '-' + mm + '-' + dd var mm = mm - 1 const tomorrow = new Date(today) tomorrow.setDate(tomorrow.getDate() + 1) var mmTmw = ("0" + (tomorrow.getMonth() + 1)).slice(-2) var ddTmw = ("0" + tomorrow.getDate()).slice(-2) var yyyyTmw = tomorrow.getFullYear(); var nextDay = days[tomorrow.getDay()] var tommorrow = yyyyTmw + '-' + mmTmw + '-' + ddTmw var mmTmw = mmTmw - 1 } if(yextData.entities[0].attributes[type + '-' + day]) { var yextAtt = yextData.entities[0].attributes[type + '-' + day] if (yextAtt === "Closed"){ yextAtt = false } } else { var yextAtt = false } //check if day is closed if(yextData.entities[0].attributes[type + '.' + day + '.isClosed'] === true) { var closed = true } //collects business holiday hours if(yextData.entities[0].attributes[type + '.holidayHours']){ var holidayHours = yextData.entities[0].attributes[type + '.holidayHours'] } else{ var holidayHours = false } //gets next days start time if(yextData.entities[0].attributes[type + '.' + nextDay + '.isClosed'] === true){ var tomorrowOpen = false } else { var tomorrowOpen = true var tmrwStart = yextData.entities[0].attributes[type + '-' + nextDay].split(" - ")[0] } //checks if holiday hours change if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].openIntervals){ yextAtt = holidayHours[i].hoursFormatted } } } //split hours if(yextAtt && yextAtt.includes(",")){ yextAtt = yextAtt.split(", ") for(var i=0;i < yextAtt.length;i++){ var end = yextAtt[i].split(' - ')[1] var start = yextAtt[i].split(' - ')[0] if (i+1 != yextAtt.length){ var nextStart = yextAtt[i + 1].split(' - ')[0] } if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(nextStart.includes("pm") && nextStart.split(/s+|:/)[0] != "12"){ var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart.split(/s+|:/)[0]) + 12, parseInt(nextStart.split(/s+|:/)[1])) } else { var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart), parseInt(nextStart.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate startDate && today endDate && (i+1 != yextAtt.length) && today endDate && i+1 === yextAtt.length){ var closed = true } } } if(yextAtt || closed) { if(typeof yextAtt === "string"){ var start = yextAtt.split(" - ")[0] var end = yextAtt.split(" - ")[1] if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else if (end.includes("am") && end.split(/s+|:/)[0] === "12") { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) - 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate endDate){ var closed = true } else if(today < startDate){ var closed = true //check if closing soon } else if (endDate - today < thirtyMins && endDate - today < 0 === false ){ var status = "Closing Soon " var cssClass = "soonStatus" var busHours = ' • ' + end //opened 24 hours } else if(start === '12:00 am' && end === '11:59 pm'){ var status = "Open " var cssClass = "allDayStatus" var busHours = ' 24 hours ' //opened } else { var status = "Open " var cssClass = "openedStatus" var busHours = '• Closes ' + end } } if(closed){ // closed & opening today if((today < startDate)){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' Opens ' + start //closed & open tomorrow } else if(closed && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart //closed and not open tomorrow } else if(closed && tomorrowOpen != true){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } // checks if holiday if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === false){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } else if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } if(cssClass){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].classList.add(cssClass); } } if(status){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].innerText = status; } } if(cssClass === 'allDayStatus'){ var hoursWidgets = $(element).find('.openHours') for( var i=0; i 1){ var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { var openHoursLength = hoursWidgets[i].childNodes.length var oldHours = hoursWidgets[i] oldHours.removeChild(oldHours.childNodes[openHoursLength - 1]) } } var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].append(busHours) } } var displayHolidayHoursList = function(type,yextData) { var list = ""; if(yextData.entities[0].attributes["hours.holidayHours"]) { var yextAtt = yextData.entities[0].attributes["hours.holidayHours"] } else if(yextData.entities[0].attributes["holidayHours"]) { var yextAtt = yextData.entities[0].attributes["holidayHours"] } else { var yextAtt = false } if(yextAtt) { for (var i=0; i -1) { // write to dom list += '
  • ‘ + yextAtt[i].dateFormatted + ‘ – ‘ + yextAtt[i].hoursFormatted + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { // if in editor display place holder $(element).html(emptyListPlaceHolder); } else { // if empty, hide element on runtime $(element).css(‘display’,’none’); } } var displayServiceArea = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if (firstOnly) { list = ‘
  • ‘ + yextAtt[0] + ”; $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextData.entities[0].attributes[type + “.places”] for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayPhoneList = function(type,yextData) { var list = “”; var locData = yextData.entities[0].attributes; if(locData.phone) { list += ‘
  • Main: ‘ + formatPhoneBeforeRender(locData.phone) + ”; } if(locData.localPhone) { list += ‘
  • Local: ‘ + formatPhoneBeforeRender(locData.localPhone) + ”; } if(locData.alternatePhone) { list += ‘
  • Alternate: ‘ + formatPhoneBeforeRender(locData.alternatePhone) + ”; } if(locData.tollFreePhone) { list += ‘
  • Toll Free: ‘ + formatPhoneBeforeRender(locData.tollFreePhone) + ”; } if(locData.mobilePhone) { list += ‘
  • Mobile: ‘ + formatPhoneBeforeRender(locData.mobilePhone) + ”; } if(locData.faxPhone) { list += ‘
  • Fax: ‘ + formatPhoneBeforeRender(locData.faxPhone) + ”; } if(locData.ttyPhone) { list += ‘
  • TTY: ‘ + formatPhoneBeforeRender(locData.ttyPhone) + ”; } if(list.length > 0) { $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } emitYextPhoneRenderEvent(formatPhoneBeforeRender(locData.phone)); } var getNumDaysBetween = function(d1, d2) { var diff = d1.getTime() – d2.getTime(); return diff / (1000 * 60 * 60 * 24); }; var orderPaymentsList = function(listData) { if(listData.indexOf(‘Discover’) >= 0) { listData.splice(listData.indexOf(“Discover”), 1); listData.unshift(‘Discover’); } if(listData.indexOf(‘American Express’) >= 0) { listData.splice(listData.indexOf(“American Express”), 1); listData.unshift(‘American Express’); } if(listData.indexOf(‘MasterCard’) >= 0) { listData.splice(listData.indexOf(“MasterCard”), 1); listData.unshift(‘MasterCard’); } if(listData.indexOf(‘Visa’) >= 0) { listData.splice(listData.indexOf(“Visa”), 1); listData.unshift(‘Visa’); } return listData } var displayImageList = function(type,yextData) { var list = “”; var listData = orderPaymentsList(_yextData.entities[0].attributes[type]); for (var i=0; i< listData.length; i++) { list += '' + listData[i] + '‘ } if(list.length > 0) { $(element).find(‘#paymentOptionsImages’).html(list) } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySocialIcons = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes.facebookPageUrl) { list += ‘ ‘ } if(yextData.entities[0].attributes.twitterHandle) { list += ‘ ‘ } if(yextData.entities[0].attributes.instagramHandle) { list += ‘ ‘ } if(list.length > 0) { $(element).find(‘#socialIcons’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var getImageUrl = function(name,style) { var cdnPath = ‘https://cdn.websites.hibu.com/-resellers-preview/_cc_icons/’; if(!style) { style = ‘_d.svg’ } if (name === “ZELLE”){ name = “Zelle” } var imageUrl=”; switch (name) { case ‘Visa’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘MasterCard’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘American Express’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Android Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Apple Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Bitcoin’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Cash’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Check’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Diners Club’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Financing’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Invoice’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘PayPal’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Samsung Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Traveler’s Check”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Zelle”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break } return imageUrl } function emitYextPhoneRenderEvent(phone) { var yextPhoneRenderEvent = new CustomEvent(‘YextPhoneChangeEvent’, { detail: phone, bubbles: true, cancelable: true }); document.dispatchEvent(yextPhoneRenderEvent); } var initYextElements = function(yextData,widgetType){ if (widgetType === ‘address’ && data.config.drawMap) { drawMap(yextData); } else if (widgetType === ‘paymentOptions’ && data.config.showPaymentsAs === ‘paymentIcons’) { displayImageList(widgetType,yextData); } else if (widgetType === ‘phone’ && data.config.phoneShowAs === ‘list’) { displayPhoneList(widgetType,yextData); // check for any list type } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘button’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(“.dmButtonLink”).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘text’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(‘.yextPhoneText’).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if (widgetType === ‘services’ || widgetType === ‘googleAttributesFormatted’ || widgetType === ‘languages’ || widgetType === ‘paymentOptions’ || widgetType === ‘keywords’ || widgetType === ‘products’ || widgetType === ‘associations’ || widgetType === ‘brands’) { setTimeout(function() { displayTextdList(widgetType,yextData) },1); } else if(widgetType === ‘specialties’) { setTimeout(function() { displaySpecialties(yextData) },1) }else if (widgetType ===’serviceArea’) { setTimeout(function() { displayServiceArea(widgetType,yextData,data.config.showServiceAreaFirst) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘list’ && data.config.isList == false) { setTimeout(function() { displayHours(widgetType,yextData) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘openHours’) { setTimeout(function() { displayOpenHours(widgetType,yextData) },1) } else if (widgetType === ‘social’) { displaySocialIcons(widgetType,yextData); } else if (widgetType === ‘holidayHours’) { setTimeout(function() { displayHolidayHoursList(widgetType,yextData) },1); } else if (widgetType === ‘hours’) { //hide hours list if toggle enabled if(data.config.hideHoursList === true) { $(element).find(‘.yextHours’).css(‘display’,’none’); } } else if (widgetType === ‘description’ || widgetType === ‘yearEstablished’ || widgetType === ’email’ || widgetType === ‘name’) { // check hideIfEmpty(widgetType,yextData) } //remove error if script not entered correctly. $(element).find(‘.wrongScriptError’).removeClass(‘hasError’); } function hideIfEmpty(type,yextData) { if(!yextData.entities[0].attributes[type]) { if(data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } } // TODO CHANGE TO EVENT CALL BACK var startIntervalToWaitAndLoadWidgets = function(widgetType) { //start interval for this specific widget var intervalCheckYextLoaded = setInterval(function(){ if (window._yextData) { clearInterval(intervalCheckYextLoaded); initYextElements(window._yextData,widgetType); } },50) } /* initialization */ if(data.inEditor){ window.refreshYext && window.refreshYext(); $(document).ready(function(){ if(!window.yextInitialized){ $(element).find(‘.missingYextWidget’).addClass(‘show’); } else { $(element).find(‘.missingYextWidget’).removeClass(‘show’); } }); } else { dmAPI.runOnReady(‘yext’ , function(){ loadYext(); }); // Before navigating with Ajax, we set the yext initialized to be false so it will be initialized again after the ajax navigation dmAPI.runBeforeAjaxNavigation(‘yext’, function(){ window.yextInitialized = false; }); } }; ]]]]]]>]]]]>]]>
  • 0) { $.each(customIcons, function(i, cicon) { var classList = $(cicon).attr(‘class’).split(/s+/); $.each(classList, function(index, item) { if(item != ‘custom-user-icon’) { $( “.” + item + ” > svg” ).addClass(item); // add the calling class to the child svg element directly $( “.” + item + ” > svg” ).unwrap(); // remove the parent div } }); }); } } // adds click or hover listeners function addListener() { // add listener and animation for floating icons hover animation if(!isMobile() && data.config.DesktopLayout === ‘Float’) animateFloat(‘.float-container’, 300); // click handlers for desktop bar and mobile options else { $(“#conversion-menu-container”).off(‘click’, ‘.fab,.overlay’); $(“#conversion-menu-container”).on(‘click’, ‘.fab,.overlay’, function(){ HasOpenedMenu = true; $(‘.animation’).remove(); // remove any animations we have if(isMobile()) { animateIcons(‘overlay’); data.config.MobileLayout === ‘Full’? animateBg(‘.mobile-bg’) : ”; } else { // bar desktop animateIcons(‘helpText’); animateBg(‘.desktop-bg’); } }); } } // listens for share button click and triggers response function addShareListener() { $(“#conversion-menu-container”).off(‘click’, ‘.share’); $(“.share”).on(‘click’, function() { // console.log(‘share clicked modal should open’); MicroModal.show(‘social-modal-menu’); }); } function addPixelListener() { $(‘.bsr-menulink’).click(function() { var eventName = $(this).data(‘eventname’); if(!eventName) { fbq(‘track’, ‘Contact’); } else { fbq(‘trackCustom’, eventName); } }); } function addChatListener() { $(“.bsr-chat”).on(‘click’, function() { $(“#chat-script”).remove(); // Get rid of any chat-script on the page $.each(data.config.IconList, function(index,value){ if(value.hasOwnProperty(‘ChatScript’)) { var cscript = value.ChatScript; // Check if the script is a src or raw script // Changed mind and wanted to input tags so this is saved for posterity /* var re = new RegExp(‘^(?:[a-z]+:)?//’, ‘i’); // non case-sensitive, protocol-agnostic if (re.test(cscript)) { $(‘body’).append(”); return false; // break out of the $.each() on first occurence } else { $(‘body’).append(” + cscript + ”); return false; // break out of the $.each() on first occurence } */ $(‘body’).append(cscript); } }); }); } // // ANIMATIONS // function animateFocus() { $(‘.animation’).remove(); //in case already in DOM if(!HasOpenedMenu) { if(isMobile()) { const pulse = ”; setTimeout(function() { $(‘#masterfab’).append(pulse); }, +data.config.FocusDelay); } // desktop else { data.config.DesktopLayout === ‘Float’? animateFloatFocus() : animateBarFocus(); } } } function animateFloatFocus() { if($(‘.focus’)[0]) { const id = $(‘.focus’)[0].id; setTimeout(function() { $(‘#’+id).css(‘max-width’, ”); $(‘#’+id).addClass(‘slide-pulse’); }, +data.config.FocusDelay); } } // opens fixed bar on desktop after set interval function animateBarFocus() { if(!$(“.desktop-bg”).is(“:visible”)) { setTimeout(function() { animateIcons(‘helpText’); animateBg(‘.desktop-bg’); }, +data.config.FocusDelay); } } // adds hover listeners and animates floating icons on desktop function animateFloat(selector, dur) { $(“#float-container”).off(“mouseenter”, selector); $(“#float-container”).on(“mouseenter”, selector, function(event) { // console.log(‘float mouse enter’); HasOpenedMenu = true; var id = $(this)[0].id; // cancel animation on hover data.config.FocusAni? $(‘#’+id).removeClass(‘slide-pulse’) : 0; $(‘#text-‘+id).fadeIn(); $(‘#float-text-‘+id).fadeIn(dur).css(“display”,”inline-flex”); $(‘#’+id).stop().animate({ “max-width”: “200px”, }, dur); }); $(“#float-container”).off(“mouseleave”, selector); $(“#float-container”).on(“mouseleave”, selector, function(event) { // console.log(‘float mouse leave’); var id = $(this)[0].id; $(‘#text-‘+id).fadeOut(dur); $(‘#’+id).stop().animate({ “max-width”: “42.666px”, }, dur); }); } // animates icons slide up and transparent overlay(depending on showType) function animateIcons(showType) { if($(“.overlay”).is(“:visible”) || $(“.desktop-bg”).is(“:visible”)) { if(showType === ‘overlay’) $(‘.overlay’).fadeOut(125); else if(showType === ‘helpText’) $(‘#help-text’).fadeOut(125); // add plus icon back $(‘#main-container’).empty().append(getSvg(data.config.MobileMain)); $(‘.fab.child’).stop().animate({ bottom : $(‘#masterfab’).css(‘bottom’), opacity : 0 }, 125, function() { $(this).hide(); }); } else { if(showType === ‘overlay’) $(‘.overlay’).fadeIn(125); else if(showType === ‘helpText’) $(‘#help-text’).fadeIn(125); // add close icon on mobile only if(isMobile()) $(‘#main-container’).empty().append(getSvg(‘close’)); $(“.fab.child”).each(function(){ $(this).stop().show().animate({ bottom : (parseInt($(“#masterfab”).css(“bottom”)) + parseInt($(“#masterfab”).outerHeight() + 20) + 56 * $(this).data(“subitem”) – $(“.fab.child”).outerHeight()) + “px”, opacity : 1 }, 125); }); } } // adds overlay that slides up function animateBg(selector) { if($(selector).is(“:visible”)) { $(‘#main-container’).removeClass(‘open’); $(“#masterfab.fab.master-mobile”).removeClass(‘mobile-open’) var mainIcon = data.config.DeskMain // revert to default main icon style if(isMobile()) { mainIcon = data.config.MobileMain; $(‘#masterfab’).css({‘background’: ”, ‘box-shadow’: ”}); // restore default } $(‘#main-container’).empty().append(getSvg(mainIcon)); $(‘.menu-link, .child’).hide(); // slide down to cloes $(selector).stop().animate({ height : 0, opacity : 0 }, 125, function(){ $(this).hide(); }); } else { $(‘#main-container’).addClass(‘open’); $(“#masterfab.fab.master-mobile”).addClass(‘mobile-open’) var topArea = 100; if(isMobile()) { $(‘#masterfab’).css({‘background’: ‘none’, ‘box-shadow’: ‘none’}); // make icon flat $(‘#main-container’).empty().append(getSvg(‘close’)); // add x icon } else if(data.config.DesktopLayout === ‘Bar’) { // hack to get height of bar help text before it’s visible $(selector).css({‘position’:’absolute’,’visibility’:’hidden’, ‘display’:’block’}); topArea = $(“#help-text”).height()? $(“#help-text”).height() + 60 : 40; $(selector).removeAttr(‘style’); } // slide up to open $(selector).stop().show().animate({ height : (((data.config.IconList.length+1) * 56) + topArea) + “px”, opacity : 1 },125, function() { $(‘.menu-link’).fadeIn(125); $(selector).css(“display”,”flex”) }); } } function getItems(type, float) { $(‘.child’).remove(); // remove any items already in DOM var html = ”, label = ”, icon = ”, text = ”; var items = float? data.config.IconList : data.config.IconList.reverse(); items.forEach(function(item, index) { if(item.showonmobile==true && data.device === ‘mobile’){ index = index+1; if(type === ‘rightText’){ label = ” + item.Label + ”; } if(type === ‘leftText’) { label = ” + item.Label + ”; } if(type === ‘bsrRightText’) { label = ” + item.Label + ”; } icon = ”+getItemIcon(item)+”; html += ‘ ‘+getItemAction(item, icon+label)+’ ‘; if(item.Action === ‘Share’) { $.getScript(‘https://cdn.jsdelivr.net/npm/micromodal/dist/micromodal.min.js’, function() { MicroModal.init(); $(‘.share-container’).html(getSocialItems(item)); // add social icons to modal addShareListener(); // if social sharing enabled add click handler }); } } else if(item.showondesktop==true && (data.device === ‘desktop’ || data.device === ‘tablet’) ){ if(type === ‘rightText’){ label = ” + item.Label + ”; } if(type === ‘leftText’) { label = ” + item.Label + ”; } if(!float) { icon = ”+getItemIcon(item)+”; html += ‘ ‘+getItemAction(item, icon+label)+’ ‘; } // floating icons on desktop only else { // add focus class for focus animation label = item.Label; var focusClass = item.Animate? ‘focus’ : ”; icon = ”+getItemIcon(item)+”; text = ”+label+”; html += ‘ ‘+getItemAction(item, icon)+’ ‘+getItemAction(item, text)+’ ‘; } // if action is share add share items to modal if(item.Action === ‘Share’) { $.getScript(‘https://cdn.jsdelivr.net/npm/micromodal/dist/micromodal.min.js’, function() { MicroModal.init(); $(‘.share-container’).html(getSocialItems(item)); // add social icons to modal addShareListener(); // if social sharing enabled add click handler }); } } }); return html; } function getSocialItems(item) { let html = ”; const content = getShareContent(item); if(item.Email) html += getShareHtml(‘Email’, content.link, content.title, ‘Tab’, ‘social’); if(item.Facebook) html += getShareHtml(‘Facebook’, content.link, content.title, ‘Tab’, ‘social’); if(item.Tumblr) html += getShareHtml(‘Tumblr’, content.link, content.title, ‘Tab’, ‘social’); if(item.LinkedIn) html += getShareHtml(‘LinkedIn’, content.link, content.title, ‘Tab’, ‘social’); if(item.Twitter) html += getShareHtml(‘Twitter’, content.link, content.title, ‘Tab’, ‘social’); if(item.Reddit) html += getShareHtml(‘Reddit’, content.link, content.title, ‘Tab’, ‘social’); //if(item.GooglePlus) html += getShareHtml(‘GooglePlus’, content.link, content.title, ‘Tab’, ‘social’); if(item.Pinterest) html += getShareHtml(‘Pinterest’, content.link, content.title, ‘Tab’, ‘social’); return html; } // // Social Share Functions // function getShareContent(item) { // set link to the current page url let link = item.ShareLink? item.Link.href : window.top.location.href; link = encodeURI(link); // get default page title from the actual page title const pageTitle = item.ShareTitle? item.ShareTitle : document.title; const encodedTitle = encodeURI(pageTitle); return {link: link, title: encodedTitle}; } function getShareHtml(site, link, encodedTitle, action, linkClass) { let href = ”; switch(site) { case ‘Email’: href = “mailto:?Subject=”+encodedTitle+”&body=Check out this site: “+window.location.href; statsEventName = ‘CM_SHARE_EMAIL’; return ( ‘ ‘+getSvg(‘shareenvelope’)+’ ‘); case ‘Facebook’: href = ‘https://www.facebook.com/sharer/sharer.php?u=’+link; statsEventName = ‘CM_SHARE_FB’; return ( ‘ ‘+getSvg(‘facebook’)+’ ‘); case ‘Tumblr’: href = ‘http://tumblr.com/share/link?url=’+link+’&name=’+encodedTitle; return ( ‘ ‘+getSvg(‘tumblr’)+’ ‘); case ‘LinkedIn’: href = ‘http://www.linkedin.com/shareArticle?mini=true&url=’+link+’&title=’+encodedTitle; statsEventName = ‘CM_SHARE_LINKEDIN’; return ( ‘ ‘+getSvg(‘linkedIn’)+’ ‘); case ‘Twitter’: href = ‘https://twitter.com/intent/tweet?text=’+link; statsEventName = ‘CM_SHARE_TWITTER’; return ( ‘ ‘+getSvg(‘twitter’)+’ ‘); case ‘Reddit’: href = ‘http://www.reddit.com/submit?url=’+link+’&title=’+encodedTitle+’&text=’+encodedTitle; return ( ‘ ‘+getSvg(‘reddit’)+’ ‘); /* case ‘GooglePlus’: href = ‘https://plus.google.com/share?url=’+link; statsEventName = ‘CM_SHARE_GOOGLE_PLUS’; return ( ‘ ‘+getSvg(‘gPlus’)+’ ‘); */ case ‘Pinterest’: href = ‘http://pinterest.com/pin/create/button/?url=’+link+’&description=’+encodedTitle; return ( ‘ ‘+getSvg(‘pinterest’)+’ ‘); default: return ”; } } // // Helpers // // check display type function isMobile() { return data.device === ‘mobile’; } function getItemAction(item, elem) { var statsEventName=”; switch(item.Action) { case ‘Link’: if(!item.Link) item.Link = { target: ‘target=”_blank’, href: ‘http://www.google.com’ } // default link var target = item.Link.target? item.Link.target : ”; var statsEventName = ‘CM_LINK_CLICK’; return ‘‘+elem+”; case ‘Call’: statsEventName = ‘CM_CLICK_TO_CALL’; return ‘‘+elem+”; case ‘Sms’: statsEventName = ‘CM_CLICK_TO_SMS’; return ‘‘+elem+”; case ‘Email’: statsEventName = ‘CM_CLICK_TO_EMAIL’; return ‘‘+elem+”; case ‘Map’: statsEventName = ‘CM_DIRECTION’; return ‘‘+elem+”; case ‘Mess’: statsEventName = ‘CM_FB_MESSAGE’; return ‘‘+elem+”; case ‘Share’: return ‘‘+elem+”; case ‘Chat’: return ‘‘+elem+”; default: return ”; } } // returns new default icon only if icon is default (identified by path data in default svg MUST CHANGE FOR DIFFERENT DEFAUTL) function xgetItemIcon(item) { // icon is default if(item.CustomIcon) { return ”+item.Icon+”; } else { switch(item.Action) { case ‘Link’: return getSvg(‘link’); case ‘Call’: return getSvg(‘phone’); case ‘Sms’: return getSvg(‘sms’); case ‘Email’: return getSvg(‘envelope’); case ‘Mess’: return getSvg(‘messenger’); case ‘Map’: return getSvg(‘map’); case ‘Share’: return getSvg(‘share’); } } } /* ——————— */ function getItemIcon(item) { var lcase = item.Action.toLowerCase(); if(item.CustomIcon) { switch(item.CustomIcon_Select) { case ‘custom_icon1’: // return ” + data.config.custom_icon1 + ”; return ” + data.config.custom_icon1 + ”; case ‘custom_icon2’: return ” + data.config.custom_icon2 + ”; case ‘custom_icon3’: return ” + data.config.custom_icon3 + ”; case ‘custom_icon4’: return ” + data.config.custom_icon4 + ”; case ‘custom_icon5’: return ” + data.config.custom_icon5 + ”; case ‘custom_icon6’: return ” + data.config.custom_icon6 + ”; } } else { switch(item.Action) { case ‘Link’: return getSvg(‘link’); case ‘Call’: return getSvg(‘phone’); case ‘Sms’: return getSvg(‘sms’); case ‘Email’: return getSvg(‘envelope’); case ‘Mess’: return getSvg(‘messenger’); case ‘Map’: return getSvg(‘map’); case ‘Share’: return getSvg(‘share’); case ‘Chat’: return getSvg(‘chat’); } } } /* ——————— */ window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } function dudaicon(icon){ return ”+icon+” } function xgetSvg(name) { const type = name? name : data.config.DeskMain; switch(type) { case ‘vEllipsis’: return ‘More’; case ‘map’: return ” case ‘hEllipsis’: return ‘More’; case ‘plus’: return ‘More’; case ‘bars’: return ‘More’; case ‘envelope’: return ‘Email’; case ‘shareenvelope’: return ‘Email’; case ‘phone’: return ‘Phone’; case ‘close’: return ‘Close’; case ‘facebook’: return ‘Facebook’; case ‘messenger’: return ‘Facebook Messenger’ case ‘tumblr’: return ‘Tumblr’; case ‘linkedIn’: return ‘LinkedIn’; case ‘twitter’: return ‘Twitter’; case ‘reddit’: return ‘Reddit’; case ‘pinterest’: return ‘Pinterest’; case ‘share’: return ‘Share’; case ‘sms’: return ‘SMS Text’; case ‘link’: return ”; default: return ”; } } function getSvg(name) { const type = name? name : data.config.DeskMain; switch(type) { case ‘vEllipsis’: return ‘More’; case ‘map’: return ” case ‘hEllipsis’: return ‘More’; case ‘plus’: return ‘More’; case ‘bars’: return ‘More’; case ‘envelope’: return ‘Email’; case ‘shareenvelope’: return ‘Email’; case ‘phone’: return ‘Phone’; case ‘close’: return ‘Close’; case ‘facebook’: return ‘Facebook’; case ‘messenger’: return ‘Facebook Messenger’ case ‘tumblr’: return ‘Tumblr’; case ‘linkedIn’: return ‘LinkedIn’; case ‘twitter’: return ‘Twitter’; case ‘reddit’: return ‘Reddit’; case ‘pinterest’: return ‘Pinterest’; case ‘share’: return ‘Share’; case ‘sms’: return ‘SMS Text’; case ‘link’: return ”; case ‘chat’: // return ‘Email’; return ”; default: return ”; } } }; ]]]]]]>]]]]>]]> 1){ $(element).find(‘.multipleYextError’).addClass(‘hasError’); return; }else if(data.config.type === ‘none’){ $(element).find(‘.editorOnlyInfo’).addClass(‘inEditor’); } } } /* refresh yext script */ window.refreshYext = function(){ loadYext(true); } //function for Omniture tracking window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } /* draw yext map */ var drawMap = function(yextData){ var zoom = data.config.mapZoom; var yData = yextData.entities[0].attributes; var addressQuery = yData[‘address1’] + ” ” + yData[‘address2’] + ” ” + yData[‘city’] + ” ” + yData[‘state’] + ” ” + yData[‘zip’]; dmAPI.drawMap({addressQuery: addressQuery, zoom: zoom, container: $(element).find(‘.yextMap’)}); } var formatPhoneBeforeRender = function(num,cb) { if (!cb) cb = function(){return} if(data.config.formatPhone){ var s2 = (“”+num).replace(/D/g, ”); var m = s2.match(/^(d{3})(d{3})(d{4})$/); var formatted = (!m) ? null : “(” + m[1] + “) ” + m[2] + “-” + m[3]; cb(formatted); return formatted; } else { cb(num); return num; } } var displayTextdList = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { if (yextAtt[i] === 'Android Pay') { list += '

  • Google Pay’; } else { list += ‘
  • ‘ + yextAtt[i] + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySpecialties = function(yextData){ var list = “”; if(yextData.entities[0].attributes[“specialties”]) { var yextAtt = yextData.entities[0].attributes[“specialties”] } else if (yextData.entities[0].attributes[“specialities”]) { var yextAtt = yextData.entities[0].attributes[“specialities”] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayHours = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for(var i=0;i < yextAtt.length;i++) { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if(yextAtt) { var yextAtt = yextAtt.split(", "); for(var i=0;i < yextAtt.length;i++) { if((/s/.test(yextAtt[i])) === false){ yextAtt[i] = yextAtt[i] + ' - ' + yextAtt[i+1] yextAtt.splice(i+1, 1) } if (yextAtt[i].includes('day') === false ){ var leftSide = ' '; var rightSide = yextAtt[i] }else { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) } list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css('display','none'); } } var displayOpenHours = function(type, yextData){ if(yextData.entities[0].attributes['timezone']){ var zone = yextData.entities[0].attributes['timezone'] } else { var zone = false } if(zone){ var time = new Date().toLocaleString("en-US", {timeZone: zone}); var today = new Date(time); var days = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']; var daysShort = ['Sun','Mon','Tues','Wed','Thurs','Fri','Sat']; var day = days[today.getDay()]; var hour = today.getHours(); var min = today.getMinutes(); var dd = ("0" + today.getDate()).slice(-2); var mm = ("0" + (today.getMonth() + 1)).slice(-2) var yyyy = today.getFullYear(); var todayDate = yyyy + '-' + mm + '-' + dd const tomorrow = new Date(today) tomorrow.setDate(tomorrow.getDate() + 1) var mmTmw = ("0" + (tomorrow.getMonth() + 1)).slice(-2) var ddTmw = ("0" + tomorrow.getDate()).slice(-2) var yyyyTmw = tomorrow.getFullYear(); var nextDay = days[tomorrow.getDay()] var tommorrow = yyyyTmw + '-' + mmTmw + '-' + ddTmw } if(yextData.entities[0].attributes[type + '.' + day + '.openIntervals']) { var yextAtt = yextData.entities[0].attributes[type + '.' + day + '.openIntervals'] } else { var yextAtt = false } //check if day is closed if(yextData.entities[0].attributes[type + '.' + day + '.isClosed'] === true) { var closed = true } //collects business holiday hours if(yextData.entities[0].attributes[type + '.holidayHours']){ var holidayHours = yextData.entities[0].attributes[type + '.holidayHours'] } else{ var holidayHours = false } //gets next days start time if(yextData.entities[0].attributes[type + '.' + nextDay + '.isClosed'] === true){ var tomorrowOpen = false } else { var tomorrowOpen = true var tmrwStart = yextData.entities[0].attributes[type + '.' + nextDay + '.openIntervals[0].start'].split(":") if (parseInt(tmrwStart[0]) > 12){ tmrwStart[0] = String(parseInt(tmrwStart[0]) – 12) tmrwStart = tmrwStart[0] + “:” + tmrwStart[1] + ” pm” } else if (parseInt(tmrwStart[0]) === 12) { tmrwStart = yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’] + ” pm” } else if (parseInt(tmrwStart[0]) === 00){ tmrwStart = “12:” + tmrwStart[1] + ” am” } else{ if(yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’][0] === ‘0’){ tmrwStart = yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’].substring(1) + ” am” } else{ tmrwStart = yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’] + ” am” } } } //checks if holiday hours change if(holidayHours) { for(var i=0;i 1){ for(var i=0;i = parseInt(start[0]) && min >= parseInt(start[1])) && ((hour < parseInt(end[0]) || (hour === parseInt(end[0]) && min = parseInt(end[0]) && min > parseInt(end[1])) && ( i+1 != yextAtt.length) && ((hour < parseInt(nextStart[0]) || (hour === parseInt(nextStart[0]) && min 12){ tmrwStart[0] = String(parseInt(tmrwStart[0]) - 12) tmrwStart = tmrwStart[0] + ":" + tmrwStart[1] + " pm" } else if (parseInt(tmrwStart[0]) === 12) { tmrwStart = tmrwStart[0] + ":" + tmrwStart[1] + " pm" } else if (parseInt(tmrwStart[0]) === 00){ tmrwStart = "12:" + tmrwStart[1] + " am" } else{ if(tmrwStart[0][0] === '0'){ tmrwStart = tmrwStart[0].substring(1) + ":" + tmrwStart[1] + " am" } else { tmrwStart = tmrwStart[0] + ":" + tmrwStart[1] + " am" } } } else if ((hour >= parseInt(end[0]) && min > parseInt(end[1])) && ( i+1 === yextAtt.length)) { var closed = true } } } if(yextAtt || closed) { if(yextAtt){ var end = yextAtt[0][“end”].split(“:”) var start = yextAtt[0][“start”].split(“:”) // } //closing soon logic add to conditional below if(hour === parseInt(end[0])){ if(min >= parseInt(end[1])){ var closed = true } } } //closed & open tomorrow if(closed && tomorrowOpen === true){ var status = “Closed ” var cssClass = “closedStatus” var busHours = ‘ • Opens ‘ + tmrwStart } //close and not open tomorrow else if((closed && tomorrowOpen != true) || (hour > parseInt(end[0]) && tomorrowOpen != true)){ var offset = days.indexOf(day) + 1 for( var i=0; i 12){ tmrwStart[0] = String(parseInt(tmrwStart[0]) – 12) tmrwStart = tmrwStart[0] + “:” + tmrwStart[1] + ” pm ” + daysShort[dayIndex] break } else if (parseInt(tmrwStart[0]) === 12){ tmrwStart = tmrwStart.join(“:”) + ” pm ” + daysShort[dayIndex] break } else if (parseInt(tmrwStart[0]) === 00){ tmrwStart = “12:” + tmrwStart[1] + ” am ” + daysShort[dayIndex] break } else{ tmrwStart = tmrwStart.join(“:”) if (tmrwStart[0] === “0”){ tmrwStart = tmrwStart.substring(1) + ” am ” + daysShort[dayIndex] } else{ tmrwStart = tmrwStart + ” am ” + daysShort[dayIndex] } break } } } var status = “Closed ” var cssClass = “closedStatus” var busHours = ‘ • Opens ‘ + tmrwStart // closed & opening today } else if(hour > parseInt(end[0]) && tomorrowOpen === true){ var status = “Closed ” var cssClass = “closedStatus” var tmrwStart = yextAtt[0][“start”] if (parseInt(tmrwStart[0] + tmrwStart[1]) > 12){ start = parseInt(tmrwStart[0] + tmrwStart[1]) start = String(start) – 12 tmrwStart = start + “:” + tmrwStart[3] + tmrwStart[4] + ” pm ” // } else if (parseInt(tmrwStart[0] + tmrwStart[1]) === 12){ // tmrwStart = tmrwStart[0] + “:” + tmrwStart[1] + ” pm ” } else if (parseInt(tmrwStart[0] + tmrwStart[1]) === 00){ tmrwStart = “12:” + tmrwStart[3] + tmrwStart[4] + ” am ” } else{ if (tmrwStart[0] === “0”){ tmrwStart = tmrwStart.substring(1) + ” am ” } else{ tmrwStart = tmrwStart + ” am ” } } var busHours = ‘ • Opens ‘ + tmrwStart }else if(hour < parseInt(start[0]) || (hour === parseInt(start[0]) && min 12){ start[0] = String(parseInt(start[0]) - 12) start = start[0] + ":" + start[1] + " pm" } else if (parseInt(start[0]) === 12) { start = yextData.entities[0].attributes[type + '.' + day + '.openIntervals[0].start'] + " pm" } else if (parseInt(start[0]) === 00){ start = "12:" + start[1] + " am" } else{ if(yextData.entities[0].attributes[type + '.' + day + '.openIntervals[0].start'][0] === "0"){ start = yextData.entities[0].attributes[type + '.' + day + '.openIntervals[0].start'].substring(1) + " am" } else { start = yextData.entities[0].attributes[type + '.' + day + '.openIntervals[0].start'] + " am" } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' Opens ' + start } else if(yextAtt[0]["start"] == '00:00' && yextAtt[0]["end"] === '23:59'){ var status = "Open " var cssClass = "allDayStatus" var busHours = ' 24 hours ' // opened } else { if (parseInt(end[0]) > 12){ end[0] = String(parseInt(end[0]) – 12) end = end[0] + “:” + end[1] + ” pm” } else if (parseInt(end[0]) === 12) { end = yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’] + ” pm” } else if (parseInt(end[0]) === 00){ end = “12:” + end[1] + ” am” } else{ if(yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’][0] === “0”){ end = yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’].substring(1) + ” am” } else{ end = yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’] + ” am” } } var status = “Open ” var cssClass = “openedStatus” var busHours = ‘• Closes ‘ + end } if(yextAtt){ // console.log(yextAtt) var end = yextAtt[0][“end”].split(“:”) var start = yextAtt[0][“start”].split(“:”) } //closing soon logic add to conditional below if(yextAtt){ if(hour === parseInt(end[0])){ if(min parseInt(end[1])){ if (parseInt(end[0]) > 12){ end[0] = String(parseInt(end[0]) – 12) end = end[0] + “:” + end[1] + ” pm” } else if (parseInt(end[0]) === 12) { end = yextAtt[0][“end”] + ” pm” } else if (parseInt(start[0]) === 00){ end = “12:” + start[1] + ” am” } else{ if(yextAtt[0][“end”][0] === “0”){ end = yextAtt[0][“end”].substring(1) + ” am” } else { end = yextAtt[0][“end”] + ” am” } } var status = “Closing Soon ” var cssClass = “soonStatus” var busHours = ‘ • ‘ + end } } else if ((parseInt(end[0]) – hour === 1) || (parseInt(end[0]) === 00 && hour === 11)){ var checkMin = min + 30 if(checkMin >= 60){ checkMin = checkMin – 60 if(checkMin >= parseInt(end[1])){ if (parseInt(end[0]) > 12){ end[0] = String(parseInt(end[0]) – 12) end = end[0] + “:” + end[1] + ” pm” } else if (parseInt(end[0]) === 12) { end = yextAtt[0][“end”] + ” pm” } else if (parseInt(start[0]) === 00){ end = “12:” + start[1] + ” am” } else{ if (yextAtt[0][“end”][0] === “0”){ end = yextAtt[0][“end”].substring(1) + ” am” } else { end = yextAtt[0][“end”] + ” am” } } var status = “Closing Soon ” var cssClass = “soonStatus” var busHours = ‘ • ‘ + end } } } } } //checks if holiday if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === false){ var offset = days.indexOf(day) + 1 for( var i=0; i 12){ tmrwStart[0] = String(parseInt(tmrwStart[0]) - 12) tmrwStart = tmrwStart[0] + ":" + tmrwStart[1] + " pm " + daysShort[dayIndex] break } else if (parseInt(tmrwStart[0]) === 12){ tmrwStart = tmrwStart.join(":") + " pm " + daysShort[dayIndex] break } else if (parseInt(tmrwStart[0]) === 00){ tmrwStart = "12:" + tmrwStart[1] + " am " + daysShort[dayIndex] break } else{ tmrwStart = tmrwStart.join(":") if (tmrwStart = tmrwStart[0] === "0"){ tmrwStart = tmrwStart.substring(1) + " am " + daysShort[dayIndex] }else { tmrwStart = tmrwStart + " am " + daysShort[dayIndex] } break } } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } else if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } if(cssClass){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].classList.add(cssClass); } } if(status){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].innerText = status; } } if(cssClass === 'allDayStatus'){ var hoursWidgets = $(element).find('.openHours') for( var i=0; i 1){ var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { var openHoursLength = hoursWidgets[i].childNodes.length var oldHours = hoursWidgets[i] oldHours.removeChild(oldHours.childNodes[openHoursLength - 1]) } } var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].append(busHours) } } var displayHolidayHoursList = function(type,yextData) { var list = ""; if(yextData.entities[0].attributes["hours.holidayHours"]) { var yextAtt = yextData.entities[0].attributes["hours.holidayHours"] } else if(yextData.entities[0].attributes["holidayHours"]) { var yextAtt = yextData.entities[0].attributes["holidayHours"] } else { var yextAtt = false } if(yextAtt) { for (var i=0; i -1) { // write to dom list += '
  • ‘ + yextAtt[i].dateFormatted + ‘ – ‘ + yextAtt[i].hoursFormatted + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { // if in editor display place holder $(element).html(emptyListPlaceHolder); } else { // if empty, hide element on runtime $(element).css(‘display’,’none’); } } var displayServiceArea = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if (firstOnly) { list = ‘
  • ‘ + yextAtt[0] + ”; $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextData.entities[0].attributes[type + “.places”] for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayPhoneList = function(type,yextData) { var list = “”; var locData = yextData.entities[0].attributes; if(locData.phone) { list += ‘
  • Main: ‘ + formatPhoneBeforeRender(locData.phone) + ”; } if(locData.localPhone) { list += ‘
  • Local: ‘ + formatPhoneBeforeRender(locData.localPhone) + ”; } if(locData.alternatePhone) { list += ‘
  • Alternate: ‘ + formatPhoneBeforeRender(locData.alternatePhone) + ”; } if(locData.tollFreePhone) { list += ‘
  • Toll Free: ‘ + formatPhoneBeforeRender(locData.tollFreePhone) + ”; } if(locData.mobilePhone) { list += ‘
  • Mobile: ‘ + formatPhoneBeforeRender(locData.mobilePhone) + ”; } if(locData.faxPhone) { list += ‘
  • Fax: ‘ + formatPhoneBeforeRender(locData.faxPhone) + ”; } if(locData.ttyPhone) { list += ‘
  • TTY: ‘ + formatPhoneBeforeRender(locData.ttyPhone) + ”; } if(list.length > 0) { $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } emitYextPhoneRenderEvent(formatPhoneBeforeRender(locData.phone)); } var getNumDaysBetween = function(d1, d2) { var diff = d1.getTime() – d2.getTime(); return diff / (1000 * 60 * 60 * 24); }; var orderPaymentsList = function(listData) { if(listData.indexOf(‘Discover’) >= 0) { listData.splice(listData.indexOf(“Discover”), 1); listData.unshift(‘Discover’); } if(listData.indexOf(‘American Express’) >= 0) { listData.splice(listData.indexOf(“American Express”), 1); listData.unshift(‘American Express’); } if(listData.indexOf(‘MasterCard’) >= 0) { listData.splice(listData.indexOf(“MasterCard”), 1); listData.unshift(‘MasterCard’); } if(listData.indexOf(‘Visa’) >= 0) { listData.splice(listData.indexOf(“Visa”), 1); listData.unshift(‘Visa’); } return listData } var displayImageList = function(type,yextData) { var list = “”; var listData = orderPaymentsList(_yextData.entities[0].attributes[type]); for (var i=0; i< listData.length; i++) { list += '' + listData[i] + '‘ } if(list.length > 0) { $(element).find(‘#paymentOptionsImages’).html(list) } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySocialIcons = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes.facebookPageUrl) { list += ‘ ‘ } if(yextData.entities[0].attributes.twitterHandle) { list += ‘ ‘ } if(yextData.entities[0].attributes.instagramHandle) { list += ‘ ‘ } if(list.length > 0) { $(element).find(‘#socialIcons’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var getImageUrl = function(name,style) { var cdnPath = ‘https://cdn.websites.hibu.com/-resellers-preview/_cc_icons/’; if(!style) { style = ‘_d.svg’ } var imageUrl=”; switch (name) { case ‘Visa’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘MasterCard’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘American Express’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Android Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Apple Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Bitcoin’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Cash’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Check’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Diners Club’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Financing’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Invoice’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘PayPal’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Samsung Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Traveler’s Check”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; } return imageUrl } function emitYextPhoneRenderEvent(phone) { var yextPhoneRenderEvent = new CustomEvent(‘YextPhoneChangeEvent’, { detail: phone, bubbles: true, cancelable: true }); document.dispatchEvent(yextPhoneRenderEvent); } var initYextElements = function(yextData,widgetType){ if (widgetType === ‘address’ && data.config.drawMap) { drawMap(yextData); } else if (widgetType === ‘paymentOptions’ && data.config.showPaymentsAs === ‘paymentIcons’) { displayImageList(widgetType,yextData); } else if (widgetType === ‘phone’ && data.config.phoneShowAs === ‘list’) { displayPhoneList(widgetType,yextData); // check for any list type } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘button’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(“.dmButtonLink”).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘text’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(‘.yextPhoneText’).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if (widgetType === ‘services’ || widgetType === ‘googleAttributesFormatted’ || widgetType === ‘languages’ || widgetType === ‘paymentOptions’ || widgetType === ‘keywords’ || widgetType === ‘products’ || widgetType === ‘associations’ || widgetType === ‘brands’) { setTimeout(function() { displayTextdList(widgetType,yextData) },1); } else if(widgetType === ‘specialties’) { setTimeout(function() { displaySpecialties(yextData) },1) }else if (widgetType ===’serviceArea’) { setTimeout(function() { displayServiceArea(widgetType,yextData,data.config.showServiceAreaFirst) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘list’ && data.config.isList == false) { setTimeout(function() { displayHours(widgetType,yextData) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘openHours’) { setTimeout(function() { displayOpenHours(widgetType,yextData) },1) } else if (widgetType === ‘social’) { displaySocialIcons(widgetType,yextData); } else if (widgetType === ‘holidayHours’) { setTimeout(function() { displayHolidayHoursList(widgetType,yextData) },1); } else if (widgetType === ‘hours’) { //hide hours list if toggle enabled if(data.config.hideHoursList === true) { $(element).find(‘.yextHours’).css(‘display’,’none’); } } else if (widgetType === ‘description’ || widgetType === ‘yearEstablished’ || widgetType === ’email’ || widgetType === ‘name’) { // check hideIfEmpty(widgetType,yextData) } //remove error if script not entered correctly. $(element).find(‘.wrongScriptError’).removeClass(‘hasError’); } function hideIfEmpty(type,yextData) { if(!yextData.entities[0].attributes[type]) { if(data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } } // TODO CHANGE TO EVENT CALL BACK var startIntervalToWaitAndLoadWidgets = function(widgetType) { //start interval for this specific widget var intervalCheckYextLoaded = setInterval(function(){ if (window._yextData) { clearInterval(intervalCheckYextLoaded); initYextElements(window._yextData,widgetType); } },50) } /* initialization */ if(data.inEditor){ window.refreshYext && window.refreshYext(); $(document).ready(function(){ if(!window.yextInitialized){ $(element).find(‘.missingYextWidget’).addClass(‘show’); } else { $(element).find(‘.missingYextWidget’).removeClass(‘show’); } }); } else { dmAPI.runOnReady(‘yext’ , function(){ loadYext(); }); // Before navigating with Ajax, we set the yext initialized to be false so it will be initialized again after the ajax navigation dmAPI.runBeforeAjaxNavigation(‘yext’, function(){ window.yextInitialized = false; }); } }; ]]]]]]>]]]]>]]>
  • 1){ $(element).find(‘.multipleYextError’).addClass(‘hasError’); return; }else if(data.config.type === ‘none’){ $(element).find(‘.editorOnlyInfo’).addClass(‘inEditor’); } } } /* refresh yext script */ window.refreshYext = function(){ loadYext(true); } //function for Omniture tracking window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } /* draw yext map */ var drawMap = function(yextData){ var zoom = data.config.mapZoom; var yData = yextData.entities[0].attributes; var addressQuery = yData[‘address1’] + ” ” + yData[‘address2’] + ” ” + yData[‘city’] + ” ” + yData[‘state’] + ” ” + yData[‘zip’]; dmAPI.drawMap({addressQuery: addressQuery, zoom: zoom, container: $(element).find(‘.yextMap’)}); } var formatPhoneBeforeRender = function(num,cb) { if (!cb) cb = function(){return} if(data.config.formatPhone){ var s2 = (“”+num).replace(/D/g, ”); var m = s2.match(/^(d{3})(d{3})(d{4})$/); var formatted = (!m) ? null : “(” + m[1] + “) ” + m[2] + “-” + m[3]; cb(formatted); return formatted; } else { cb(num); return num; } } var displayTextdList = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { if (yextAtt[i] === 'Android Pay') { list += '

  • Google Pay’; } else { list += ‘
  • ‘ + yextAtt[i] + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySpecialties = function(yextData){ var list = “”; if(yextData.entities[0].attributes[“specialties”]) { var yextAtt = yextData.entities[0].attributes[“specialties”] } else if (yextData.entities[0].attributes[“specialities”]) { var yextAtt = yextData.entities[0].attributes[“specialities”] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (yextAtt) { var yextAtt = yextAtt.split(“, “); for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#specialtiesList’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayHours = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if(yextAtt && Array.isArray(yextAtt)) { for(var i=0;i < yextAtt.length;i++) { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if(yextAtt) { var yextAtt = yextAtt.split(", "); for(var i=0;i < yextAtt.length;i++) { if((/s/.test(yextAtt[i])) === false){ yextAtt[i] = yextAtt[i] + ' - ' + yextAtt[i+1] yextAtt.splice(i+1, 1) } if (yextAtt[i].includes('day') === false ){ var leftSide = ' '; var rightSide = yextAtt[i] }else { var indexEndDay = yextAtt[i].lastIndexOf('day ') + 3; var leftSide = yextAtt[i].substr(0,indexEndDay).replace("Monday","Mon").replace("Tuesday","Tue").replace("Wednesday","Wed").replace("Thursday","Thu").replace("Friday","Fri").replace("Saturday","Sat").replace("Sunday","Sun"); var rightSide = yextAtt[i].substr(indexEndDay + 1) } list += '' + leftSide + '' + rightSide + ''; } $(element).find('#hoursSmall').html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css('display','none'); } } var displayOpenHours = function(type, yextData){ if(yextData.entities[0].attributes['timezone']){ var zone = yextData.entities[0].attributes['timezone'] } else { var zone = false } if(zone){ var time = new Date().toLocaleString("en-US", {timeZone: zone}); var today = new Date(time ); var thirtyMins = 30 * 60 * 1000 var days = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']; var daysShort = ['Sun','Mon','Tues','Wed','Thurs','Fri','Sat']; var day = days[today.getDay()]; var hour = today.getHours(); var min = today.getMinutes(); var dd = ("0" + today.getDate()).slice(-2); var mm = ("0" + (today.getMonth() + 1)).slice(-2) var yyyy = today.getFullYear(); var todayDate = yyyy + '-' + mm + '-' + dd var mm = mm - 1 const tomorrow = new Date(today) tomorrow.setDate(tomorrow.getDate() + 1) var mmTmw = ("0" + (tomorrow.getMonth() + 1)).slice(-2) var ddTmw = ("0" + tomorrow.getDate()).slice(-2) var yyyyTmw = tomorrow.getFullYear(); var nextDay = days[tomorrow.getDay()] var tommorrow = yyyyTmw + '-' + mmTmw + '-' + ddTmw var mmTmw = mmTmw - 1 } if(yextData.entities[0].attributes[type + '-' + day]) { var yextAtt = yextData.entities[0].attributes[type + '-' + day] if (yextAtt === "Closed"){ yextAtt = false } } else { var yextAtt = false } //check if day is closed if(yextData.entities[0].attributes[type + '.' + day + '.isClosed'] === true) { var closed = true } //collects business holiday hours if(yextData.entities[0].attributes[type + '.holidayHours']){ var holidayHours = yextData.entities[0].attributes[type + '.holidayHours'] } else{ var holidayHours = false } //gets next days start time if(yextData.entities[0].attributes[type + '.' + nextDay + '.isClosed'] === true){ var tomorrowOpen = false } else { var tomorrowOpen = true var tmrwStart = yextData.entities[0].attributes[type + '-' + nextDay].split(" - ")[0] } //checks if holiday hours change if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].openIntervals){ yextAtt = holidayHours[i].hoursFormatted } } } //split hours if(yextAtt && yextAtt.includes(",")){ yextAtt = yextAtt.split(", ") for(var i=0;i < yextAtt.length;i++){ var end = yextAtt[i].split(' - ')[1] var start = yextAtt[i].split(' - ')[0] if (i+1 != yextAtt.length){ var nextStart = yextAtt[i + 1].split(' - ')[0] } if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(nextStart.includes("pm") && nextStart.split(/s+|:/)[0] != "12"){ var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart.split(/s+|:/)[0]) + 12, parseInt(nextStart.split(/s+|:/)[1])) } else { var nextStartDate = new Date(yyyy, mm, dd, parseInt(nextStart), parseInt(nextStart.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate startDate && today endDate && (i+1 != yextAtt.length) && today endDate && i+1 === yextAtt.length){ var closed = true } } } if(yextAtt || closed) { if(typeof yextAtt === "string"){ var start = yextAtt.split(" - ")[0] var end = yextAtt.split(" - ")[1] if(start.includes("pm") && start.split(/s+|:/)[0] != "12"){ var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]) + 12, parseInt(start.split(/s+|:/)[1])) } else { var startDate = new Date(yyyy, mm, dd, parseInt(start.split(/s+|:/)[0]), parseInt(start.split(/s+|:/)[1])) } if(end.includes("pm") && end.split(/s+|:/)[0] != "12"){ var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) + 12, parseInt(end.split(/s+|:/)[1])) } else if (end.includes("am") && end.split(/s+|:/)[0] === "12") { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]) - 12, parseInt(end.split(/s+|:/)[1])) } else { var endDate = new Date(yyyy, mm, dd, parseInt(end.split(/s+|:/)[0]), parseInt(end.split(/s+|:/)[1])) } if (end.includes("am") && (endDate endDate){ var closed = true } else if(today < startDate){ var closed = true //check if closing soon } else if (endDate - today < thirtyMins && endDate - today < 0 === false ){ var status = "Closing Soon " var cssClass = "soonStatus" var busHours = ' • ' + end //opened 24 hours } else if(start === '12:00 am' && end === '11:59 pm'){ var status = "Open " var cssClass = "allDayStatus" var busHours = ' 24 hours ' //opened } else { var status = "Open " var cssClass = "openedStatus" var busHours = '• Closes ' + end } } if(closed){ // closed & opening today if((today < startDate)){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' Opens ' + start //closed & open tomorrow } else if(closed && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart //closed and not open tomorrow } else if(closed && tomorrowOpen != true){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } // checks if holiday if(holidayHours) { for(var i=0;i < holidayHours.length;i++){ if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === false){ var offset = days.indexOf(day) + 1 for( var i=0; i < days.length; i++) { var dayIndex = (i + offset) % days.length; if(yextData.entities[0].attributes[type + '.' + days[dayIndex] + '.openIntervals']){ tmrwStart = daysShort[dayIndex] + " " + yextData.entities[0].attributes[type + '-' + days[dayIndex]].split(" - ")[0] break } } var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } else if(holidayHours[i].date === todayDate && holidayHours[i].isClosed === true && tomorrowOpen === true){ var status = "Closed " var cssClass = "closedStatus" var busHours = ' • Opens ' + tmrwStart } } } if(cssClass){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].classList.add(cssClass); } } if(status){ var hoursWidgets = document.getElementsByClassName('status') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].innerText = status; } } if(cssClass === 'allDayStatus'){ var hoursWidgets = $(element).find('.openHours') for( var i=0; i 1){ var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { var openHoursLength = hoursWidgets[i].childNodes.length var oldHours = hoursWidgets[i] oldHours.removeChild(oldHours.childNodes[openHoursLength - 1]) } } var hoursWidgets = document.getElementsByClassName('openHours') for( var i=0; i < hoursWidgets.length; i++) { hoursWidgets[i].append(busHours) } } var displayHolidayHoursList = function(type,yextData) { var list = ""; if(yextData.entities[0].attributes["hours.holidayHours"]) { var yextAtt = yextData.entities[0].attributes["hours.holidayHours"] } else if(yextData.entities[0].attributes["holidayHours"]) { var yextAtt = yextData.entities[0].attributes["holidayHours"] } else { var yextAtt = false } if(yextAtt) { for (var i=0; i -1) { // write to dom list += '
  • ‘ + yextAtt[i].dateFormatted + ‘ – ‘ + yextAtt[i].hoursFormatted + ”; } } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { // if in editor display place holder $(element).html(emptyListPlaceHolder); } else { // if empty, hide element on runtime $(element).css(‘display’,’none’); } } var displayServiceArea = function(type,yextData,firstOnly) { var list = “”; if(yextData.entities[0].attributes[type]) { var yextAtt = yextData.entities[0].attributes[type] } else { var yextAtt = false } if (firstOnly) { list = ‘
  • ‘ + yextAtt[0] + ”; $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt && Array.isArray(yextAtt)) { for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (yextAtt) { var yextAtt = yextData.entities[0].attributes[type + “.places”] for (var i=0; i< yextAtt.length; i++) { list += '
  • ‘ + yextAtt[i] + ”; } $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displayPhoneList = function(type,yextData) { var list = “”; var locData = yextData.entities[0].attributes; if(locData.phone) { list += ‘
  • Main: ‘ + formatPhoneBeforeRender(locData.phone) + ”; } if(locData.localPhone) { list += ‘
  • Local: ‘ + formatPhoneBeforeRender(locData.localPhone) + ”; } if(locData.alternatePhone) { list += ‘
  • Alternate: ‘ + formatPhoneBeforeRender(locData.alternatePhone) + ”; } if(locData.tollFreePhone) { list += ‘
  • Toll Free: ‘ + formatPhoneBeforeRender(locData.tollFreePhone) + ”; } if(locData.mobilePhone) { list += ‘
  • Mobile: ‘ + formatPhoneBeforeRender(locData.mobilePhone) + ”; } if(locData.faxPhone) { list += ‘
  • Fax: ‘ + formatPhoneBeforeRender(locData.faxPhone) + ”; } if(locData.ttyPhone) { list += ‘
  • TTY: ‘ + formatPhoneBeforeRender(locData.ttyPhone) + ”; } if(list.length > 0) { $(element).find(‘#’ + type + ‘List’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } emitYextPhoneRenderEvent(formatPhoneBeforeRender(locData.phone)); } var getNumDaysBetween = function(d1, d2) { var diff = d1.getTime() – d2.getTime(); return diff / (1000 * 60 * 60 * 24); }; var orderPaymentsList = function(listData) { if(listData.indexOf(‘Discover’) >= 0) { listData.splice(listData.indexOf(“Discover”), 1); listData.unshift(‘Discover’); } if(listData.indexOf(‘American Express’) >= 0) { listData.splice(listData.indexOf(“American Express”), 1); listData.unshift(‘American Express’); } if(listData.indexOf(‘MasterCard’) >= 0) { listData.splice(listData.indexOf(“MasterCard”), 1); listData.unshift(‘MasterCard’); } if(listData.indexOf(‘Visa’) >= 0) { listData.splice(listData.indexOf(“Visa”), 1); listData.unshift(‘Visa’); } return listData } var displayImageList = function(type,yextData) { var list = “”; var listData = orderPaymentsList(_yextData.entities[0].attributes[type]); for (var i=0; i< listData.length; i++) { list += '' + listData[i] + '‘ } if(list.length > 0) { $(element).find(‘#paymentOptionsImages’).html(list) } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var displaySocialIcons = function(type,yextData) { var list = “”; if(yextData.entities[0].attributes.facebookPageUrl) { list += ‘ ‘ } if(yextData.entities[0].attributes.twitterHandle) { list += ‘ ‘ } if(yextData.entities[0].attributes.instagramHandle) { list += ‘ ‘ } if(list.length > 0) { $(element).find(‘#socialIcons’).html(list); } else if (data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } var getImageUrl = function(name,style) { var cdnPath = ‘https://cdn.websites.hibu.com/-resellers-preview/_cc_icons/’; if(!style) { style = ‘_d.svg’ } var imageUrl=”; switch (name) { case ‘Visa’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘MasterCard’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘American Express’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Android Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Apple Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Bitcoin’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Cash’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Check’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Diners Club’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Discover’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Financing’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Invoice’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘PayPal’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case ‘Samsung Pay’: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; case “Traveler’s Check”: imageUrl = cdnPath + name.replace(/[W_]+/g,”).toLowerCase() + style; break; } return imageUrl } function emitYextPhoneRenderEvent(phone) { var yextPhoneRenderEvent = new CustomEvent(‘YextPhoneChangeEvent’, { detail: phone, bubbles: true, cancelable: true }); document.dispatchEvent(yextPhoneRenderEvent); } var initYextElements = function(yextData,widgetType){ if (widgetType === ‘address’ && data.config.drawMap) { drawMap(yextData); } else if (widgetType === ‘paymentOptions’ && data.config.showPaymentsAs === ‘paymentIcons’) { displayImageList(widgetType,yextData); } else if (widgetType === ‘phone’ && data.config.phoneShowAs === ‘list’) { displayPhoneList(widgetType,yextData); // check for any list type } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘button’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(“.dmButtonLink”).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if(widgetType === ‘phone’ && data.config.phoneShowAs === ‘text’) { var phFormatted = formatPhoneBeforeRender(yextData.entities[0].attributes[data.config.phoneType],function(phone) { $(element).find(‘.yextPhoneText’).html(” + phone + ”); emitYextPhoneRenderEvent(phone); }); } else if (widgetType === ‘services’ || widgetType === ‘googleAttributesFormatted’ || widgetType === ‘languages’ || widgetType === ‘paymentOptions’ || widgetType === ‘keywords’ || widgetType === ‘products’ || widgetType === ‘associations’ || widgetType === ‘brands’) { setTimeout(function() { displayTextdList(widgetType,yextData) },1); } else if(widgetType === ‘specialties’) { setTimeout(function() { displaySpecialties(yextData) },1) }else if (widgetType ===’serviceArea’) { setTimeout(function() { displayServiceArea(widgetType,yextData,data.config.showServiceAreaFirst) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘list’ && data.config.isList == false) { setTimeout(function() { displayHours(widgetType,yextData) },1) } else if (widgetType ===’hours’ && data.config.hoursShowAs === ‘openHours’) { setTimeout(function() { displayOpenHours(widgetType,yextData) },1) } else if (widgetType === ‘social’) { displaySocialIcons(widgetType,yextData); } else if (widgetType === ‘holidayHours’) { setTimeout(function() { displayHolidayHoursList(widgetType,yextData) },1); } else if (widgetType === ‘hours’) { //hide hours list if toggle enabled if(data.config.hideHoursList === true) { $(element).find(‘.yextHours’).css(‘display’,’none’); } } else if (widgetType === ‘description’ || widgetType === ‘yearEstablished’ || widgetType === ’email’ || widgetType === ‘name’) { // check hideIfEmpty(widgetType,yextData) } //remove error if script not entered correctly. $(element).find(‘.wrongScriptError’).removeClass(‘hasError’); } function hideIfEmpty(type,yextData) { if(!yextData.entities[0].attributes[type]) { if(data.inEditor) { $(element).html(emptyListPlaceHolder); } else { $(element).css(‘display’,’none’); } } } // TODO CHANGE TO EVENT CALL BACK var startIntervalToWaitAndLoadWidgets = function(widgetType) { //start interval for this specific widget var intervalCheckYextLoaded = setInterval(function(){ if (window._yextData) { clearInterval(intervalCheckYextLoaded); initYextElements(window._yextData,widgetType); } },50) } /* initialization */ if(data.inEditor){ window.refreshYext && window.refreshYext(); $(document).ready(function(){ if(!window.yextInitialized){ $(element).find(‘.missingYextWidget’).addClass(‘show’); } else { $(element).find(‘.missingYextWidget’).removeClass(‘show’); } }); } else { dmAPI.runOnReady(‘yext’ , function(){ loadYext(); }); // Before navigating with Ajax, we set the yext initialized to be false so it will be initialized again after the ajax navigation dmAPI.runBeforeAjaxNavigation(‘yext’, function(){ window.yextInitialized = false; }); } }; ]]]]]]>]]]]>]]>
  • {{placeholder_retargeting_pixel}}



    Source

    Bath And Shower Pros | Compare Bathroom Remodeling Quotes

    Comparing Bathroom Quotes

    Do you need a total bathroom remodel? Or are you just looking to make a few improvements? Whatever your situation, our network of local professionals can help you make the right choices and quickly and efficiently install whatever you need. If you’re looking to compare free quotes among local bathroom installers, simply complete the form above to start finding your bathroom solution today.

    Remodel Realities

    Are you planning a complete bathroom makeover? Be prepared. If any of the work you plan to do requires you to turn off the water to your bathroom for extended period of time, make sure you have a second bathroom available to use during the remodel.

    Bathroom Remodeling 101

    A major bathroom remodel requires extensive planning. You need to make sure your daily routine isn’t completely upended, and you also need to be prepared to spend some money since a bathroom remodel can be pricey. According to Remodeling Magazine, there are a few levels to bathroom remodeling: mid-range remodeling is going to involve things like ceramic tiled floors and tub surround, a double sink and vanity, recessed medicine cabinet, wallpaper, and a new toilet. An upscale remodel, on the other hand, changes the bathroom itself; from expanding the walls, to adding a window, to changing fixtures, upscale remodeling is a major project. If you want a new, huge tile shower, custom countertops, a bidet, or other luxury items, an upscale bath remodel could be quite an expensive endeavor

    Cost/Benefit

    Remodeling Magazine conducted a survey from 2010 to 2011 that showed the average national cost of a mid-range bathroom remodel at just over $16,000, with the associated resale investment at just 64%. These costs are geographically specific. Western states are the most expensive (over $19,000), but their return on investment is a higher 79.6%. Those in the upper Midwest states are close to the average when it comes to cost, but their return rate is considerably lower at around 55%. If you live in the south central states, you’re likely to get the best bath remodel value with a cost at just over $14,000 and a 70% return rate.

    DIY or Professional Install?

    If you’re a do-it-yourself type, you can probably handle some or all of your remodeling needs. But if you’re not interested in dealing with the hassle, you can always hire a contractor. If you choose to hire a professional, be sure to compare their part prices with what’s available online or in discount stores. And when it comes to demolishing your current bathroom, you might want to take a hammer to that yourself in order to save on labor costs.

    Don’t Go It Alone

    Even if you choose to do the remodel yourself, get advice from people you know who’ve done a bathroom remodel. Did they work with a contractor? If they know a good contractor, you can think about getting a quote from them too. Don’t know anyone who’s done a bathroom remodel lately? BathandShowerPros.com is able to give you quality information and honest recommendations on products, prices, and contractors in your area. All you have to do is fill out the above form and you’re on your way to updating your bathroom.

    Source

    Dumpster Rentals | Ozark Dumpster Service, Springdale AR


    Dumpster Rentals | Ozark Dumpster Service, Springdale AR { setInterval(() => { let bl = [“Ly9hW2NvbnRhaW5zKHRleHQoKSwgJ0V2ZW50IEhhd2snKV0=”, “Ly9hW2NvbnRhaW5zKHRleHQoKSwgJ0VIJyld”, “Ly9hW2NvbnRhaW5zKEBocmVmLCAnbXlhZGFjYWRlbXkuY29tJyld”, “Ly9hW2NvbnRhaW5zKEBocmVmLCAnZXZlbnRoYXdrMzYwLmNvbScpXQ==”]; bl.forEach((b) => { let nodes = document.evaluate(atob(b), document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) for(i=0; i

    Local, Affordable, Dependable Dumpster Rentals of Northwest Arkansas

    Book Online Now dumpster rentals

    At Ozark Dumpster Service, we have the roll-off dumpster rentals you can rely on to efficiently clear the waste and debris from your next project. We offer a simple, straightforward rental process that allows you to get the bin you need without all the hassles and headaches of traditional dumpster rentals. Our team is committed to serving our community with the most reliable service around. This includes multiple bin sizes to choose from, easy online booking, on-time deliveries, and prompt pickup. We also offer multiple ways to get in touch with us so that you can get your questions answered as soon as possible. We welcome our customers to give us a call, or get in touch with us online anytime. We offer 10-yard dumpsters, 15-yard dumpsters, 20-yard dumpsters and 30-yard dumpsters.

    Book Online

    Roll Off Dumpster

    Holds 4x Pickup
    Truck Loads

    Holds 6x Pickup
    Truck Loads

    Holds 8x Pickup
    Truck Loads

    Holds 10x Pickup
    Truck Loads

    Holds 12x Pickup
    Truck Loads

    { let averageTrucksCubicYards = 2.5; let $drsItems = $(‘.drs-item’); $drsItems.each(function(index) { let size = $( this ).find(‘.size’).text(); size = size.replace(/s+/g, ”).toLowerCase(); let dumpsterYards = size.match(/(d+)(?=yd|yard)/g); let roundedTruckLoads = “”; if(dumpsterYards) { let truckLoads = (dumpsterYards / averageTrucksCubicYards); roundedTruckLoads = Math.round(truckLoads*2)/2; } $(this).find(‘.truck-loads’).html(roundedTruckLoads); }); }); ]]>

    What Customers Are Saying

    Recently used Ozark dumpsters, and I was so impressed! Their prices were very reasonable, they were prompt and courteous and very professional. When they came to pick up the dumpster, my husband was throwing the last couple of things in and the team rushed over and helping him get the last stuff in there. We were incredibly impressed with the team and will use them again.

    -Anelda Venter

    Cannot say enough good things about this company!
    Great customer service, responsive, accommodating with last minute requests, easy to communicate with via text messages and the prices were very fair.

    -Emily Godere

    The price and size of the dumpsters offered by Ozark Dumpster Service fills a gap vs other companies that have way too big dumpsters for construction materials. Very responsive and pleasant to deal with. Easy process, adequate lead times for availability, on-time delivery and pick-up. Have used the service a couple of times and will call first with future needs. Highly recommend them.

    -David Godoy

    Book Your Dumpster Rentals Today!

    If you’re ready to book your dumpster today, use our online booking system to get set up. Our professional team will be in touch to confirm your reservation and schedule a delivery window.

    Have questions? Need help? That’s what we’re here for! Whether you need assistance selecting the correct bin size or you have questions regarding which materials we can accept in our containers, get in touch and our friendly and knowledgeable team will answer all your questions.

    On top of Springdale, Bentonville, Rogers, and Fayetteville, please visit our Service Areas to view all the cities we serve.

    © Ozark Dumpster Service All rights reserved

     

     



    Source

    Affordable Dumpster Rentals | Hernando County

    Are We Licensed & Insured?

    Yes, we are fully licensed & insured

    Do You Accept Hazardous Materials?

    Hazardous materials not accepted such as tires /paint or excessive amounts of concrete or dirt, metal objects, or appliances. If you have a question, please don’t hesitate to ask.

    What Forms of Payment Do You Accept?

    • Cash, Check Or Credit Cards Accepted

    • 4% Convenience Fee For Credit Cards

    • Payment Is Due On Delivery COD

    • Make Checks Payable To -1-Haul Away

    Do You Offer Multiple Dumpster Rentals?

    Multiple Dumpster Delivery Available For Larger Jobs

    What Fees Are Included With My Rental?

    All Dump Fees & Trip Charges Are Included. No Extra Surcharges Including Fuel!

    What is Your Rental Time Period & Current Fees?

    Source

    Lawson Family Plumbing

    Lawson Family Plumbing

    Lawson Family Plumbing, Inc. prides itself on being a family owned and operated business. It is our goal to fully satisfy our customers. From the moment we answer the phone to job completion, we succeed by being prompt, courteous, and responsive to our customer’s needs.

    Call us today at

    (602) 842-6636

    Source

    General Contracting | Find Local Professionals Who Can Help With Your General Contracting Project.

    Houzz is a great resource for finding designers that fit our style. We won’t have found Danenberg Design if not for Houzz and we are thankful for that.

    Jagdeesh and Deepti

    Houzz is the biggest factor in finding Kerrie Kelly. It makes it so easy first to find Sacramento Decorator, to quickly review who make the effort to showcase their talent, and finally to see who fit my style.

    Lisa B.

    Source

    Electricians | Electrical | Networx


    Electricians | Electrical | Networx Compare & Find Electricians. Get Accurate Quotes For Your Electrical Project. Are you in the dark as to how to find a reliable licensed electrician? You’ll be happy to know that you have come to the right place at Networx.com! We are here to help by connecting you with professional certified electrical contractors in your area. They can provide you with just about any service you can think of. Our mission is to provide you with top quality service. As such, we pre-screen each and every electrical contractor on our site so that you can be sure you are dealing with a qualified electrician who is skilled, professional and licensed, ensuring that your job will be completed properly.

    All you have to do is tell us your electrical needs and we will connect you with the top electricians in your area. You can choose to have the electrical contractors give you a quote over the phone, or you can submit a request online and get multiple estimates. Either way you will get an immediate call back or a quick email response. Our electricians are available 24 hours a day and they will be there for you in case of an electrical emergency or even just for a maintenance job that requires immediate attention. No waiting and no worrying, just a job done fast and professionally.

    0){var footerLimit=$(‘.siteFooter’).offset().top-stickyQuoteHeight-20;if((footerLimit($(“.right-side”).offset().top+$(“.right-side”).height())){var diff=footerLimit-windowTop;quoteWindow.css({top:diff});}else{quoteWindow.css({‘top’:topNr,’margin-left’:’55px’});}}if($(this).scrollTop()>($(“.right-side”).offset().top+$(“.right-side”).height())+10){quoteWindow.fadeIn().addClass(“sticky”);}else{$(‘.stick-element’).hide().removeClass(“sticky”);}});});]]>



    Source

    Furnace Installers | Furnace Installation


    Furnace Installers | Furnace Installation | Networx Articles and Tips

    Gas Boiler Reviews

    Munchkin boiler Gas boilers are an energy and cost-efficient heating option. In scanning new gas boiler…

    Find & Compare Local Furnace Installers. Get Multiple Furnace Installation Quotes.

    Furnace installation is not a typical do-it-yourself job. It is complicated and in most cases requires a professional furnace installer. The first step in furnace installation is deciding what type of furnace you want to install. There are many types of furnaces, such as natural gas, electric, propane and oil. The type of furnace you will choose is usually determined by what fuel source is readily available in your area and the price of the fuel. A furnace contractor can help you make all these decisions.

    The furnace unit be must be properly installed, but, just as importantly, the duct work must be in place and properly installed. If you are replacing an old furnace, the furnace installer will take the time to inspect the existing duct work. You could buy the most high-efficiency furnace available, but it will not not properly heat your home if there are problems with the duct work. A licensed furnace installer has the appropriate equipment and expertise to install your furnace in a professional and timely manner.

    How can you know you’re getting a fair price for furnace installation? Compare quotes and choose the best price for your project. Enter your ZIP code above to receive free multiple quotes from furnace contractors in your area. Qualified licensed furnace installers will compete for your business, and you can read reviews of their work by homeowners like yourself.

    Furnace Installation – Top States

    Furnace Installation – Top Cities

    0){var footerLimit=$(‘.siteFooter’).offset().top-stickyQuoteHeight-20;if((footerLimit($(“.right-side”).offset().top+$(“.right-side”).height())){var diff=footerLimit-windowTop;quoteWindow.css({top:diff});}else{quoteWindow.css({‘top’:topNr,’margin-left’:’55px’});}}if($(this).scrollTop()>($(“.right-side”).offset().top+$(“.right-side”).height())+10){quoteWindow.fadeIn().addClass(“sticky”);}else{$(‘.stick-element’).hide().removeClass(“sticky”);}});});]]>



    Source

    Plumber Phoenix, AZ – Parker & Sons

    Parker & Sons - 24/7 Emergency Plumbing Service

    Parker & Sons - 24/7 Emergency Plumbing ServiceParker & Sons provides fast, professional plumbing installation and service to the Phoenix and Tucson areas 24 hours a day, 7 days a week.

    Our plumbers are licensed, bonded, and insured and meet our rigid trust certification standards. Our services are guaranteed in writing against defects in materials and workmanship. So if you need to repair, maintain, or improve your plumbing or septic system, you can rely on Parker & Sons. Our plumbing service includes a 100% money back guarantee and our customer care policies are unmatched in the industry.

    Since 1974, we have been dedicated and committed to honest service at honest prices. Whether you are in need of a leaky faucet repair or a sink repair, we have a plumber for that. We also work extensively with water heaters and are able to give you the 101 on the hot water heater models that would fit your household needs.

    Plumbing Installation and Repair

    If left unfixed, a running toilet or a leaky faucet can end up costing you hundreds of dollars. Check out your water bill and how your water is running. If you find your kitchen dripping non-stop and your water bill going higher, you may have a leak! Let Parker & Sons put a stop to those leaks. Our team of expert plumbers will make sure to get the work done faster, get it right the first time, and do it efficiently.

    Local Plumbers Ready to Help

    Are you getting concerned that your sewer lines may be backing up? Our plumbers are able to help you find the solution to your drainage system. Our video inspection uses equipment that will keep your sewers and drains running clear.

    Quality Plumbing Service

    Some of what we service is listed below:

    • Sinks & Faucets Repaired and Replaced
    • Drain Cleaning
    • Water Line Repaired and Replaced
    • Main Sewer Lines Repaired and Replaced
    • Lift Stations
    • Pressure Regulator Valve (PRV) Inspections
    • Bathtubs & Showers Installations and Repairs
    • Toilets
    • Garbage Disposals
    • Instant Hots
    • Water Heaters
    • Energy Saving Tankless Water Heaters
    • Video Inspection Services
    • Preventative Maintenance Programs
    • Comprehensive Septic Services

    Why Choose Parker & Sons for Your Plumbing Needs?

    • You approve the price before we start
    • Drop cloths used on every job
    • Plumbers wear shoe covers while in your home
    • We clean up after ourselves before we leave
    • Quality workmanship at a fair price
    • Licensed, Trust Certified Technicians
    • Member of the Better Business Bureau
    • 100% satisfaction guarantee

    Plumbing jobs are handled with speed by our well-trained plumbers. We provide a wide range of plumbing services – whether you are in need of sewer line repairs, drain cleaning, or leak detection. We are ready to provide you with exceptional plumbing service.

    Customer Review

    I was very impressed with the care our Parker & Sons plumber took and how meticulous he was while doing the job. I would not hesitate to have him work on my home in the future.

    Matthew H.

    Proudly serving the Phoenix and Tucson metropolitan areas.

    Source




    Source