Top

Blog

Roof Repair | Leaking Roof | Roofing | Storm Damage


<![CDATA[<![CDATA[<![CDATA[ window._currentDevice = 'desktop'; window.Parameters = window.Parameters || { AjaxContainer: 'div.dmBody', WrappingContainer: 'div.dmOuter', HomeUrl: 'https://www.ctroofandsiding.com/', AccountUUID: 'c1f9a940fb4d4c0392fd141cac88908c', SystemID: 'US_HIBU_PRODUCTION', SiteAlias: 'dcd1b7b43d5c40b39bb4e298cd5f85d1', SiteId: '139896', SiteType: atob('RFVEQU9ORQ=='), ExternalUid: '564284500', IsSiteMultilingual: false, InitialPostAlias: '', InitialDynamicItem: '', InitialPageAlias: 'roof-repair-glastonbury', InitialEncodedPageAlias: 'cm9vZi1yZXBhaXItZ2xhc3RvbmJ1cnk=', CurrentPageUrl: '', IsCurrentHomePage: false, AllowAjax: true, AfterAjaxCommand: null, HomeLinkText: 'Back To Home', UseGalleryModule: false, CurrentThemeName: 'Layout Theme', ThemeVersion: '1765', DefaultPageAlias: '', RemoveDID: true, WidgetStyleID : null, IsHeaderFixed: false, IsHeaderSkinny: false, IsBfs: true, LayoutParams : { _navigationAnimationStyle: 'slide', _manifestId : 10600, _device : 'desktop' }, StorePageAlias: 'null', StorePath: '', StoreId: 'null', StoreVersion: 0, StoreBaseUrl: '', StoreCleanUrl: true, StoreDisableScrolling: true, NotificationSubDomain: 'ctroofandsiding', HasCustomDomain: true, showCookieNotification: false, cookiesNotificationMarkup: 'null', translatedPageUrl: '', isFastMigrationSite: false, sidebarPosition: 'NA', currentLanguage: 'en', NavItems: 'W3sidGl0bGUiOiJIb21lIiwiYWxpYXMiOiJob21lIiwicGF0aCI6Ii8iLCJpbk5hdmlnYXRpb24iOnRydWUsInN1Yk5hdiI6W119LHsidGl0bGUiOiJSb29maW5nIiwiYWxpYXMiOiJERUFEX0xJTktfcERXTyIsInBhdGgiOiIjIiwiaW5OYXZpZ2F0aW9uIjp0cnVlLCJzdWJOYXYiOlt7InRpdGxlIjoiUm9vZiBJbnN0YWxsYXRpb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ZXBhaXIgR3JhbmJ5IiwiYWxpYXMiOiJyb29mLXJlcGFpci1ncmFuYnkiLCJwYXRoIjoiL3Jvb2YtcmVwYWlyLWdyYW5ieSIsImluTmF2aWdhdGlvbiI6ZmFsc2UsInN1Yk5hdiI6W119LHsidGl0bGUiOiJyb29mIHJlcGFpciBNYW5jaGVzdGVyIiwiYWxpYXMiOiJyb29mLXJlcGFpci1tYW5jaGVzdGVyIiwicGF0aCI6Ii9yb29mLXJlcGFpci1tYW5jaGVzdGVyIiwiaW5OYXZpZ2F0aW9uIjpmYWxzZSwic3ViTmF2IjpbXX0seyJ0aXRsZSI6IlJvb2YgUmVwYWlyIE1hcmxib3JvdWdoIiwiYWxpYXMiOiJyb29mLXJlcGFpci1tYXJsYm9yb3VnaCIsInBhdGgiOiIvcm9vZi1yZXBhaXItbWFybGJvcm91Z2giLCJpbk5hdmlnYXRpb24iOmZhbHNlLCJzdWJOYXYiOltdfSx7InRpdGxlIjoiUm9vZiBSZXBhaXIgUGxhbnRzdmlsbGUiLCJhbGlhcyI6InJvb2YtcmVwYWlyLXBsYW50c3ZpbGxlIiwicGF0aCI6Ii9yb29mLXJlcGFpci1wbGFudHN2aWxsZSIsImluTmF2aWdhdGlvbiI6ZmFsc2UsInN1Yk5hdiI6W119XQ==', errors: { general: 'There was an error connecting to the page.
Make sure you are not offline.’, password: ‘Incorrect name/password combination’, tryAgain: ‘Try again’ }, NavigationAreaParams: { ShowBackToHomeOnInnerPages: true, NavbarSize: 4, NavbarLiveHomePage: ‘https://www.ctroofandsiding.com/’, BlockContainerSelector: ‘.dmBody’, NavbarSelector: ‘#dmNav:has(a)’, SubNavbarSelector: ‘#subnav_main’ }, hasCustomCode: true, planID: 753, disableTracking: false }; window.Parameters.LayoutID = {}; window.Parameters.LayoutID[window._currentDevice] = 6; window.Parameters.LayoutVariationID = {}; window.Parameters.LayoutVariationID[window._currentDevice] = 5; ]]]]]]>]]]]>]]> <![CDATA[> 0 } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[<![CDATA[]]> <![CDATA[<![CDATA[<![CDATA[ /* THIS FILE IS AUTO-GENERATED. SEE build/build-modernizr */ /*! modernizr 3.5.0 (Custom Build) | MIT * * https://modernizr.com/download/?-passiveeventlisteners-supports-setclasses-cssclassprefix:dm- !*/ !function(e,n,s){function o(e,n){return typeof e===n}function t(){var e,n,s,t,a,r,l;for(var c in i)if(i.hasOwnProperty(c)){if(e=[],n=i[c],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(s=0;s<n.options.aliases.length;s++)e.push(n.options.aliases[s].toLowerCase());for(t=o(n.fn,"function")?n.fn():n.fn,a=0;a]]> <![CDATA[]]> <![CDATA[<![CDATA[ 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 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{ tmrwStart = yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’].substring(1) + ” 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[1])) && ( i+1 != yextAtt.length) && ((hour = parseInt(end[0]) && min > parseInt(end[1])) && ( i+1 === yextAtt.length)) { var closed = true } } } if(yextAtt || closed) { 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(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(“:”) tmrwStart = tmrwStart.substring(1) + ” 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 busHours = ‘ • Opens ‘ + tmrwStart }else if(hour 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{ end = yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’].substring(1) + ” 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{ end = yextAtt[0][“end”].substring(1) + ” 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{ end = yextAtt[0][“end”].substring(1) + ” 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(":") tmrwStart = tmrwStart.substring(1) + " 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; }); } }; ]]]]]]>]]]]>]]>
  • <![CDATA[<![CDATA[ 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 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{ tmrwStart = yextData.entities[0].attributes[type + ‘.’ + nextDay + ‘.openIntervals[0].start’].substring(1) + ” 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[1])) && ( i+1 != yextAtt.length) && ((hour = parseInt(end[0]) && min > parseInt(end[1])) && ( i+1 === yextAtt.length)) { var closed = true } } } if(yextAtt || closed) { 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(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(“:”) tmrwStart = tmrwStart.substring(1) + ” 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 busHours = ‘ • Opens ‘ + tmrwStart }else if(hour 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{ end = yextData.entities[0].attributes[type + ‘.’ + day + ‘.openIntervals[0].end’].substring(1) + ” 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{ end = yextAtt[0][“end”].substring(1) + ” 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{ end = yextAtt[0][“end”].substring(1) + ” 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(":") tmrwStart = tmrwStart.substring(1) + " 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; }); } }; ]]]]]]>]]]]>]]>
  • <![CDATA[<![CDATA[<![CDATA[ window.customWidgetsFunctions["4297c64e3aa349d4ac38764dde32ebef~66"] = function (element, data, api) { let HasOpenedMenu = false; $(document).ready(function() { displayType(); }); function displayType() { if(isMobile()) { displayMobile(); } else { displayDesktop(); } } function displayMobile() { var masterFabEle = $(element).find('#masterfab'); $('#main-container').empty().append(getSvg(data.config.MobileMain)); $(masterFabEle).attr('class', 'fab master-mobile');// add mobile class for custom style $(masterFabEle).css('display', 'flex'); //since element is hidden by default, show instead // add items with or without overlay and label text if(data.config.MobileLayout === 'Full') $('.mobile-bg').after(getItems('leftText')); else $('.mobile-bg').after(getItems()); mobileTheme(); // add light or dark theme addListener(); // add focus animation if(data.config.FocusAni) animateFocus(); } function displayDesktop() { var masterFabEle = $(element).find('#masterfab'); $(masterFabEle).css('display', 'flex'); //since element is hidden by default, show instead if(data.config.DesktopLayout === 'Bar') { $('#main-container').empty().append(getSvg(data.config.DeskMain)); $(masterFabEle).append(getItems('rightText')); } else { $('#float-container').empty().append(getItems('rightText', true)); } desktopType(); addListener(); // add focus animation if(data.config.FocusAni) animateFocus(); } // handles style changes for desktop types function desktopType() { $('#masterfab').attr('class', 'fab master-desktop'); // add desktop class for styling $('.icon-container').addClass('desktop'); if(data.config.DesktopLayout === 'Bar') { $('.menu-link').addClass('desk-bar'); // add class for fixed bar text $('.child').attr('class', 'fab child child-desktop-bar'); const masterLabel = ''+data.config.MainLabel+''; $('#master-label').remove(); $('#masterfab').append(masterLabel); $('#masterfab').addClass('master-bar'); } else if(data.config.DesktopLayout === 'Float') { $('#masterfab').hide(); } } // styles light and dark mobile themes function mobileTheme() { $('.child').attr('class', 'fab child child-mobile'); if(data.config.MobileTheme === 'Light') { $('.overlay, .child, .social-icon, .icon-container, .mobile-bg, social-bg, .menu-link').addClass('mobile light'); } else if(data.config.MobileTheme === 'Dark') { $('.overlay, .child, .social-icon, .icon-container, .mobile-bg, social-bg, .menu-link').addClass('mobile dark'); } } // 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'); }); } // // 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 + ''; } 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+”; default: return ”; } } // returns new default icon only if icon is default (identified by path data in default svg MUST CHANGE FOR DIFFERENT DEFAUTL) function getItemIcon(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’); } } } window._trackConvWidgetClickEvent = function(eventName) { if(typeof(HAF)===”object”){ HAF.OmTracking.onCMClick(eventName) } return; } function dudaicon(icon){ return ”+icon+” } 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 ”; default: return ”; } } }; ]]]]]]>]]]]>]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Roof Repair | Leaking Roof | Roofing | Storm Damage | Glastonbury, CT <![CDATA[]]]]>]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]>

    {{placeholder_retargeting_pixel}}

    <![CDATA[]]> <![CDATA[<![CDATA[]]]]>]]>

    <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[]]]]>]]>

    <![CDATA[]]> <![CDATA[<![CDATA[]]>

    Source

    No Comments
    Add Comment
    Name*
    Email*
    Website