(function () { function showHideTrCallButton() { var desktopContainerMin = document.getElementById('tr-chat-desktop-min'); var desktopContainerMax = document.getElementById('tr-chat-desktop-full'); var mobileContainer = document.getElementById('tr-chat-mobile'); var width = window.innerWidth; if (width < 600) { mobileContainer.style.visibility = 'visible'; desktopContainerMin.style.visibility = 'hidden'; desktopContainerMax.style.visibility = 'hidden'; } else { mobileContainer.style.visibility = 'hidden'; desktopContainerMin.style.visibility = 'visible'; desktopContainerMax.style.visibility = 'visible'; } } window.onresize = function (event) { showHideTrCallButton(); } document.addEventListener('DOMContentLoaded', function () { showHideTrCallButton(); }); var desktopMin = document.createElement('div'); desktopMin.id = "tr-chat-desktop-min"; desktopMin.style.position = "fixed"; desktopMin.style.bottom = "25px"; desktopMin.style.width = "80px"; desktopMin.style.height = "80px"; desktopMin.style.right = "25px"; desktopMin.style.zIndex = "999999"; desktopMin.style.transition = "bottom 0.25s"; var desktopMinIframe = document.createElement('iframe'); desktopMinIframe.style.border = "none"; desktopMinIframe.style.width = "80px"; desktopMinIframe.style.height = "80px"; desktopMinIframe.src = "https://app.textrequest.com/content/smschat/textrequest-smschat-desktop-collapsed.html?bgc=ffcc33&bggc=dfa421"; desktopMin.appendChild(desktopMinIframe); document.body.appendChild(desktopMin); var desktopFull = document.createElement('div'); desktopFull.id = "tr-chat-desktop-full"; desktopFull.style.position = "fixed"; desktopFull.style.bottom = "-300px"; desktopFull.style.width = "300px"; desktopFull.style.height = "300px"; desktopFull.style.right = "25px"; desktopFull.style.zIndex = "999999"; desktopFull.style.transition = "bottom 0.25s"; var desktopFulIframe = document.createElement('iframe'); desktopFulIframe.style.border = "none"; desktopFulIframe.style.width = "300px"; desktopFulIframe.style.height = "300px"; desktopFulIframe.src = "https://app.textrequest.com/content/smschat/textrequest-smschat-desktop-full.html?locationId=12500&bgc=ffcc33&bt=Text us&ac=0f2f4a"; desktopFull.appendChild(desktopFulIframe); document.body.appendChild(desktopFull); var mobile = document.createElement('div'); mobile.id = "tr-chat-mobile"; mobile.style.position = "fixed"; mobile.style.bottom = "0"; mobile.style.width = "100%"; mobile.style.height = "90px"; mobile.style.right = "0"; mobile.style.left = "0"; mobile.style.zIndex = "999999"; mobile.style.paddingTop = "25px"; mobile.style.textAlign = "center"; var mobileButton = document.createElement('a'); mobileButton.href = "sms:18455895900"; var linkText = document.createTextNode("Text us"); mobileButton.appendChild(linkText); mobileButton.style.width = "83%"; mobileButton.style.height = "60px"; mobileButton.style.color = "white"; mobileButton.style.background = "linear-gradient(#ffcc33, #dfa421)"; mobileButton.style.display = "block"; mobileButton.style.margin = "0 auto"; mobileButton.style.borderRadius = "23px"; mobileButton.style.lineHeight = "60px"; mobileButton.style.fontSize = "30px"; mobileButton.style.fontFamily = '"Myriad Pro", "Gill Sans", "Gill Sans MT", Calibri, sans-serif'; mobileButton.style.textTransform = "uppercase"; mobileButton.style.letterSpacing = "2px"; mobileButton.style.textAlign = "center"; mobileButton.style.textDecoration = "none"; mobileButton.style.boxShadow = "-5px 5px 3px -2px rgba(0,0,0,0.3);"; mobileButton.style.cursor = "pointer"; var mobileImgAnchor = document.createElement('a'); mobileImgAnchor.href = "sms:18455895900"; mobileImgAnchor.style.cursor = "pointer"; mobileImgAnchor.style.display = "block"; mobileImgAnchor.style.width = "60px"; mobileImgAnchor.style.height = "60px"; mobileImgAnchor.style.position = "absolute"; mobileImgAnchor.style.top = "0"; mobileImgAnchor.style.right = "5%"; mobileImgAnchor.innerHTML = 'text-us-btn'; mobile.appendChild(mobileButton); mobile.appendChild(mobileImgAnchor); document.body.appendChild(mobile); }());