(function(global) { 'use strict'; var iframe = document.createElement('iframe'); iframe.setAttribute('src', 'https://chat.xcallymotion.com/snippet?version=1.0.6&onlineForm=&offlineForm=&id=1&name=Seesam%20chat&address=https%3A%2F%2Fwww.seesam.lv%2F&description=&mapKey=email&mapKeyOffline=email&key=chat&agentAlias=Operators%20&color=%23ff6a10&color_button=%23ff6a10&textColor=%23ffffff&fontSize=15&remote=https%3A%2F%2Fchat.xcallymotion.com&animation=true&header_shape=rounded&header_online=Sazinies%20ar%20mums&start_chat_button=S%C4%81kt&offline_chat_button=Nos%C5%ABt%C4%ABt&header_offline=Sazinies%20ar%20mums&download_transcript=false&timeout=0&whiteLabel=Powered%20by%20Seesam&defaultWhiteLabel=false&sitepic=&closingQuestion=Vai%20J%C5%ABs%20tie%C5%A1%C4%81m%20v%C4%93laties%20aizv%C4%93rt%20%C4%8Datu%3F&formSubmitSuccessMessage=Veiksm%C4%ABgi%20aizs%C5%ABt%C4%ABts&formSubmitFailureMessage=K%C4%BC%C5%ABda!¬eTitle=Zi%C5%86a&placeholderMessage=L%C5%ABdzu%20ievadiet%20zi%C5%86ojumu&closingMessage=M%C4%93s%20priec%C4%81simies%2C%20ja%20nov%C4%93rt%C4%93si%20m%C5%ABsu%20servisu%3A&closingMessageButton=Nos%C5%ABt%C4%ABt&skipMessageButton=Izlaist&conditionAgreement=false&enableRating=true&enableFeedback=true&ratingType=star&ratingStarsNumber=5&token=LXuMtM4tx2cbXnMsHWR7oocfrLoXaSy2&autoclose=true&enableCustomerWriting=false&forwardTranscript=false&forwardTranscriptMessage=&forwardOffline=true&forwardOfflineAddress=info%40seesam.lv&waitingTitle=L%C5%ABdzu%20uzgaidi&waitingMessage=M%C5%ABsu%20operatori%20%C5%A1obr%C4%ABd%20ir%20aiz%C5%86emti&offlineMessageSubject=New%20offline%20message%20from%20websiteName&offlineMessageBody=You%20received%20a%20new%20offline%20message%20from%20websiteName.%20Here%20you%20can%20find%20the%20details%20of%20the%20request%3A&enableUnmanagedNote=false&unmanagedMessage=Atvaino%2C%20%C5%A1obr%C4%ABd%20operatori%20nav%20pieejami.%20%20M%C4%93%C4%A3ini%20v%C4%93l%C4%81k%20vai%20gaid%C4%ABsim%20Tavu%20zvanu%2067061000&skipUnmanaged=Izlaist&sendUnmanaged=Nos%C5%ABt%C4%ABt&enableCustomerAttachment=true&agentAvatar=1517298243321-seesam_avatar.jpg&showAgentAvatar=false&timezone=&createdAt=&updatedAt=&ListId=2&IntervalId=1&Interval=&customerIp=54.80.58.121%2C%20172.68.65.90%2C%20185.43.211.134&referer=&online=true&custom=true'); iframe.setAttribute('id', 'motion-chat-iframe'); iframe.setAttribute('width', window.innerWidth < 350 ? '300px' : '370px'); iframe.setAttribute('frameborder', '0'); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('style', 'position: fixed; \ right:0; \ height: 430px; \ overflow: hidden; \ margin-left: 10px; \ margin-right: 10px; \ -webkit-transition: all 0.7s ease-out; \ -moz-transition: all 0.7s ease-out; \ -ms-transition: all 0.7s ease-out; \ -o-transition: all 0.7s ease-out; \ z-index: 9999; \ transition: all 0.7s ease-out;'); document.body.appendChild(iframe); // START Events management window.addEventListener('message', function(evt) { switch (evt.data.cmd) { case 'show': iframe.style.bottom = '0px'; break; case 'hide': iframe.style.bottom = '-385px'; break; default: } }, false); // END Events management // START Proactive action management // END Proactive action management }());