Posted on Leave a comment

Perfect gifts for Dog Lovers & Nail Suppiles


0) { for (var y = 0; y -1) { document.location.href = ‘http://www.google.com’; } ]]> f&&l?i():j(i,f))}},B=function(a){var b,c,d=99,f=function(){b=null,a()},g=function(){var a=e.now()-c;d>a?j(g,d-a):(l||f)(f)};return function(){c=e.now(),b||(b=j(g,d))}},C=function(){var f,k,l,n,o,x,C,E,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O=”onscroll”in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=-1,T=function(a){R–,a&&a.target&&t(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var e,f=a,g=”hidden”==w(b.body,”visibility”)||”hidden”!=w(a,”visibility”);for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=d;)g=(w(f,”opacity”)||1)>0,g&&”visible”!=w(f,”overflow”)&&(e=f.getBoundingClientRect(),g=H>e.left&&Ge.top-1&&FR&&(a=f.length)){e=0,S++,null==K&&(“expand”in c||(c.expand=d.clientHeight>500&&d.clientWidth>500?500:370),J=c.expand,K=J*c.expFactor),K>Q&&1>R&&S>2&&o>2&&!b.hidden?(Q=K,S=0):Q=o>1&&S>1&&6>R?J:P;for(;a>e;e++)if(f[e]&&!f[e]._lazyRace)if(O)if((p=f[e][h](“data-expand”))&&(m=1*p)||(m=Q),q!==m&&(C=innerWidth+m*L,E=innerHeight+m,n=-1*m,q=m),g=f[e].getBoundingClientRect(),(I=g.bottom)>=n&&(F=g.top)=n*L&&(G=g.left)R&&!p&&(3>o||4>S)||U(f[e],m))){if(ba(f[e]),j=!0,R>9)break}else!j&&l&&!i&&4>R&&4>S&&o>2&&(k[0]||c.preloadAfterLoad)&&(k[0]||!p&&(I||H||G||F||”auto”!=f[e][h](c.sizesAttr)))&&(i=k[0]||f[e]);else ba(f[e]);i&&!j&&ba(i)}},W=A(V),X=function(a){r(a.target,c.loadedClass),s(a.target,c.loadingClass),t(a.target,Z)},Y=z(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,d,e=a[h](c.srcsetAttr);(b=c.customMedia[a[h](“data-media”)||a[h](“media”)])&&a.setAttribute(“media”,b),e&&a.setAttribute(“srcset”,e),b&&(d=a.parentNode,d.insertBefore(a.cloneNode(),a),d.removeChild(a))},aa=z(function(a,b,d,e,f){var g,i,k,l,o,q;(o=u(a,”lazybeforeunveil”,b)).defaultPrevented||(e&&(d?r(a,c.autosizesClass):a.setAttribute(“sizes”,e)),i=a[h](c.srcsetAttr),g=a[h](c.srcAttr),f&&(k=a.parentNode,l=k&&m.test(k.nodeName||””)),q=b.firesLoad||”src”in a&&(i||g||l),o={target:a},q&&(t(a,T,!0),clearTimeout(n),n=j(T,2500),r(a,c.loadingClass),t(a,Z,!0)),l&&p.call(k.getElementsByTagName(“source”),_),i?a.setAttribute(“srcset”,i):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),(i||l)&&v(a,{src:g})),a._lazyRace&&delete a._lazyRace,s(a,c.lazyClass),y(function(){(!q||a.complete&&a.naturalWidth>1)&&(q?T(o):R–,X(o))},!0)}),ba=function(a){var b,d=M.test(a.nodeName),e=d&&(a[h](c.sizesAttr)||a[h](“sizes”)),f=”auto”==e;(!f&&l||!d||!a.src&&!a.srcset||a.complete||q(a,c.errorClass))&&(b=u(a,”lazyunveilread”).detail,f&&D.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,d))},ca=function(){if(!l){if(e.now()-x<999)return void j(ca,999);var a=B(function(){c.loadMode=3,W()});l=!0,c.loadMode=3,W(),i("scroll",function(){3==c.loadMode&&(c.loadMode=2),a()},!0)}};return{_:function(){x=e.now(),f=b.getElementsByClassName(c.lazyClass),k=b.getElementsByClassName(c.lazyClass+" "+c.preloadClass),L=c.hFac,i("scroll",W,!0),i("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(d,{childList:!0,subtree:!0,attributes:!0}):(d[g]("DOMNodeInserted",W,!0),d[g]("DOMAttrModified",W,!0),setInterval(W,999)),i("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[g](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(i("load",ca),b[g]("DOMContentLoaded",W),j(ca,2e4)),f.length?(V(),y._lsFlush()):W()},checkElems:W,unveil:ba}}(),D=function(){var a,d=z(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),m.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute(“sizes”,d);c.detail.dataAttr||v(a,c.detail)}),e=function(a,b,c){var e,f=a.parentNode;f&&(c=x(a,f,c),e=u(a,”lazybeforesizes”,{width:c,dataAttr:!!b}),e.defaultPrevented||(c=e.detail.width,c&&c!==a._lazysizesWidth&&d(a,f,e,c)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=B(f);return{_:function(){a=b.getElementsByClassName(c.autosizesClass),i(“resize”,g)},checkElems:g,updateElem:e}}(),E=function(){E.i||(E.i=!0,D._(),C._())};return function(){var b,d={lazyClass:”lazyload”,loadedClass:”lazyloaded”,loadingClass:”lazyloading”,preloadClass:”lazypreload”,errorClass:”lazyerror”,autosizesClass:”lazyautosizes”,srcAttr:”data-src”,srcsetAttr:”data-srcset”,sizesAttr:”data-sizes”,minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2};c=a.lazySizesConfig||a.lazysizesConfig||{};for(b in d)b in c||(c[b]=d[b]);a.lazySizesConfig=c,j(function(){c.init&&E()})}(),{cfg:c,autoSizer:D,loader:C,init:E,uP:v,aC:r,rC:s,hC:q,fire:u,gW:x,rAF:y}}});]]> Perfect gifts for Dog Lovers & Nail Suppiles

{“id”:””, “email”:””,”default_address”:null,”first_name”:””,”last_name”:””,”name”:”” }

{“domain”:”follus.myshopify.com” }

Play With Me! Peace, Love & Dogs offset) { $(‘.back-to-top’).fadeIn(duration); } else { $(‘.back-to-top’).fadeOut(duration); } }); $(‘.back-to-top’).unbind(‘click.smoothscroll’).bind(‘click’, function(e) { e.preventDefault(); $(‘html, body’).animate( { scrollTop: 0 }, duration); return false; }) }); } ]]> 0 && cartBtn.offsetWidth <351 && (selects.length === 0 || selects[0].offsetParent === null)) { messengerWrapper.style.maxWidth = cartBtn.offsetWidth + 'px'; discountBox.style.maxWidth = cartBtn.offsetWidth + 'px'; } else { messengerWrapper.style.maxWidth = '350px'; discountBox.style.maxWidth = '350px' } this.alignWraper(messengerWrapper,settings.align) var iconDiv = document.createElement('div'); iconDiv.setAttribute('style', 'position:absolute;left:0;width:25%;padding:13px 0;height:100%;text-align:center;'); iconDiv.style.backgroundColor = settings.icon_background_color; iconDiv.style.borderTopLeftRadius = settings.border_radius + 'px'; iconDiv.style.borderBottomLeftRadius = settings.border_radius + 'px'; var iconImg = document.createElement('img'); iconImg.src = 'https://cdn.shopify.com/s/files/1/0194/1736/6592/t/1/assets/' + settings.icon + '.png?4295918388649998166'; iconImg.style.height = '48px'; iconDiv.appendChild(iconImg); var checkboxWrapper = document.createElement('div'); checkboxWrapper.setAttribute('style', 'position:absolute;left:0;height:100%;margin-left:25%;width:75%;display:table;'); checkboxWrapper.style.borderLeft = settings.border_width + 'px dashed ' + settings.border_color; checkboxWrapper.style.backgroundColor = settings.background_color; var messengerDiv = document.createElement('div'); messengerDiv.classList = 'fb-messenger-checkbox'; messengerWrapper.id = 'fb-messenger-checkbox'; messengerDiv.setAttribute('style', 'display:inline-block!important;position:relative!important;max-width:180px;overflow:hidden;margin-top:3px;margin-left:15px;'); messengerDiv.setAttribute('origin', 'https://follus.com'); messengerDiv.setAttribute('page_id', window.baMsg.fb_page_id); messengerDiv.setAttribute('messenger_app_id', window.baMsg.app_id); messengerDiv.setAttribute('user_ref', window.baMsg.user_ref); messengerDiv.setAttribute('prechecked', !0); messengerDiv.setAttribute('allow_login', !0); messengerDiv.setAttribute('size', 'large'); checkboxWrapper.appendChild(messengerDiv); discountBox.appendChild(iconDiv); discountBox.appendChild(checkboxWrapper); var optInButton = document.createElement('div'); optInButton.classList.add('ba-opt-in-confirm'); optInButton.setAttribute('style', 'margin-top:10px;width:100%;border:none;min-width:250px;cursor:pointer;text-align:center;padding:3px'); optInButton.style.boxShadow = '0 0 0 ' + settings.button_border_width + 'px ' + settings.button_border_color; optInButton.style.borderRadius = settings.button_border_radius + 'px'; optInButton.style.backgroundColor = settings.button_background_color; optInButton.style.fontWeight = settings.button_font_style; optInButton.style.fontStyle = settings.button_font_style; optInButton.style.color = settings.button_text_color; optInButton.innerHTML = settings.button_text; optInButton.addEventListener('click', function() { shakeBox(discountBox) }, !1); var baTitle = document.createElement('div'); baTitle.classList = 'ba-title'; baTitle.setAttribute('style', 'max-width:350px;min-width:250px;display:block;text-align:center;'); baTitle.innerHTML = settings.text; var subtitle = document.createElement('div'); subtitle.classList = 'ba-subtitle'; subtitle.setAttribute('style', 'max-width:350px;min-width:250px;display:block;text-align:center;'); subtitle.innerHTML = settings.subtitle; subtitle.style.fontSize = (settings.font_size - 2) + 'px'; if (settings.text_placement === 'above') { baTitle.style.marginBottom = '11px'; subtitle.style.marginBottom = '11px'; messengerWrapper.appendChild(baTitle); if (settings.subtitle !== '' && settings.subtitle !== null && settings.subtitle.length > 0) { baTitle.style.marginBottom = ‘5px’; messengerWrapper.appendChild(subtitle) } messengerWrapper.appendChild(discountBox); messengerWrapper.appendChild(optInButton) } else { messengerWrapper.appendChild(discountBox); messengerWrapper.appendChild(optInButton); messengerWrapper.appendChild(baTitle); baTitle.style.marginTop = ’11px’; messengerWrapper.appendChild(baTitle); if (settings.subtitle !== ” && settings.subtitle !== null && settings.subtitle.length > 0) { subtitle.style.marginTop = ‘5px’; messengerWrapper.appendChild(subtitle) } } window.fbLoaded.promise.then(function(){ if (settings.placement === ‘custom’) { var checkbox = document.getElementsByClassName(‘ba-checkbox’); if (checkbox.length > 0) { checkbox = checkbox[0]; checkbox.appendChild(messengerWrapper) } } else{ form.parentNode.insertBefore(messengerWrapper, settings.placement === ‘under_cart’ ? form.nextSibling : form); } FB.Event.subscribe(‘xfbml.render’, function(e) { baMsg.log(‘rendered’) messengerWrapper.style.opacity = ‘1’; messengerWrapper.style.height = ‘inherit’; applyMet(‘fb_chk_view’); }); FB.Event.subscribe(‘messenger_checkbox’, function(e) { if (e.event === ‘checkbox’) { if (e.state === ‘checked’) { var optInButton = document.getElementsByClassName(‘ba-opt-in-confirm’)[0]; var optInButtonClone = optInButton.cloneNode(!0); optInButton.parentNode.replaceChild(optInButtonClone, optInButton); optInButtonClone.addEventListener(‘click’, function(){ confirmFbChkOptIn(‘discount’, !0); messengerWrapper.style.opacity = 0; if (settings.checked_text.length > 0) { setTimeout(function() { iconImg.src = ‘https://cdn.shopify.com/s/files/1/0194/1736/6592/t/1/assets/’ + settings.checked_icon + ‘.png?4295918388649998166’; document.getElementsByClassName(‘ba-title’)[0].style.display = ‘none’; messengerDiv.style.display = ‘none’; optInButtonClone.style.display = ‘none’; var checkedDiv = document.createElement(‘div’); checkedDiv.setAttribute(‘style’, ‘padding-left: 10px;display:table-cell;vertical-align:middle;’); checkedDiv.style.color = settings.checked_color; checkedDiv.innerHTML = settings.discount_code === null ? settings.checked_text : settings.checked_text.replace(‘%discountCode’, settings.discount_code); var checkedButton = document.createElement(‘div’); checkedButton.setAttribute(‘style’, ‘margin-top:10px;width:100%;border:none;min-width:250px;cursor:pointer;text-align:center;padding:3px’); checkedButton.style.boxShadow = ‘0 0 0 ‘ + settings.button_border_width + ‘px ‘ + settings.button_border_color; checkedButton.style.borderRadius = settings.button_border_radius + ‘px’; checkedButton.style.backgroundColor = settings.button_background_color; checkedButton.style.fontWeight = settings.button_font_style; checkedButton.style.fontStyle = settings.button_font_style; checkedButton.style.color = settings.button_text_color; checkedButton.innerHTML = ‘Copy Discount Code’ checkedButton.addEventListener(‘click’, function() { var tempCopyInput = document.createElement(‘input’); tempCopyInput.value = settings.discount_code; document.getElementsByTagName(‘body’)[0].appendChild(tempCopyInput); tempCopyInput.select(); document.execCommand(“copy”); document.body.removeChild(tempCopyInput); }, !1); setTimeout(function() { messengerWrapper.style.opacity = 1 }, 1000); checkboxWrapper.appendChild(checkedDiv) messengerWrapper.appendChild(checkedButton) }, 1000) } }) } else { var optInButton = document.getElementsByClassName(‘ba-opt-in-confirm’)[0]; var optInButtonClone = optInButton.cloneNode(!0); optInButton.parentNode.replaceChild(optInButtonClone, optInButton); optInButtonClone.addEventListener(‘click’, function() { shakeBox(discountBox) }, !1) } } }) }); window.onresize = function() { var cartBtn = addToCartBtn ? addToCartBtn : form.getElementsByTagName(‘button’)[0]; if (cartBtn.offsetWidth > 0 && cartBtn.offsetWidth <351 && (selects.length === 0 || selects[0].offsetParent === null)) { messengerWrapper.style.maxWidth = cartBtn.offsetWidth + 'px'; discountBox.style.maxWidth = cartBtn.offsetWidth + 'px'; } else { messengerWrapper.style.maxWidth = '350px'; discountBox.style.maxWidth = '350px' } self.alignWraper(messengerWrapper,settings.align) } } }; function shakeBox(elem) { shake(elem, 16); } var shake = function (element, magnitude) { //A counter to count the number of shakes var counter = 1; //The total number of shakes (there will be 1 shake per frame) var numberOfShakes = 10; //Capture the element's position and angle so you can //restore them after the shaking has finished var startX = 0, startY = 0; // Divide the magnitude into 10 units so that you can // reduce the amount of shake by 10 percent each frame var magnitudeUnit = magnitude / numberOfShakes; var randomInt = function(min, max){ return Math.floor(Math.random() * (max - min + 1)) + min; }; upAndDownShake(); function upAndDownShake() { //Shake the element while the `counter` is less than //the `numberOfShakes` if (counter = numberOfShakes) { element.style.transform = 'translate(' + startX + ', ' + startY + ')'; } } }; function confirmFbChkOptIn(chkType, optedIn) { if (chkType == 'regular' && !checkboxChecked){ return; } else if (chkType == 'discount' && (!optedIn || window.baMsg.subscriber_hash.ba_fbchk_opted_in)){ return; } baMet.getCartData(function(data){ var cartToken = JSON.parse(data).token; if (!window.baMsg.subscriber_hash.ba_fbchk_opted_in){ var rightNow = parseInt(new Date().getTime()); var updateHash = { ba_fbchk_opt_in_cart_token: cartToken, ba_fbchk_opted_in: rightNow, ba_fb_opted_in: rightNow } updateSubscriberHash(updateHash); FB.AppEvents.logEvent('MessengerCheckboxUserConfirmation', null, { 'app_id': window.baMsg.app_id, 'page_id': window.baMsg.fb_page_id, 'user_ref': window.baMsg.user_ref, 'ref': cartToken + '|' + window.baMsg.visitor_token, }) trackFbOptIn(data, 'checkbox'); } }); } return this; } function boosterFbModal() { window.baLoaded = false; this.generate = function (settings) { if (window.baMsg.page_url.indexOf('/checkouts/') !== -1 && window.baMsg.page_url.indexOf('/thank_you') !== -1){ return; } if (window.baMsg.page_url.indexOf('ba-modal-preview') === -1) { if (!settings.active){return;} if (window.baMsg.subscriber_hash.ba_fb_modal_opted_in){return;} if (window.baMsg.subscriber_hash.ba_fb_opted_in){return;} if (window.baMsg.subscriber_hash.ba_fb_modal_closed){return;} if (!canDisplayByDevice(settings.devices)){return;} //TODO if (!canDisplayByRules(settings.rules)){return;} } var modalShade = document.createElement('div'); modalShade.classList = 'ba-modal-shade'; modalShade.setAttribute('style', 'position: fixed; z-index: 100000; background: rgba(0,0,0,.42); width:100%; height: 100%; opacity: 0;display:none;'); modalShade.style.overflow = 'none'; modalShade.style.transition = 'all 0.5s'; window.fbLoaded.promise.then(function(){ var s = document.body.firstChild; s.parentNode.insertBefore(modalShade, s); }); var modal = document.createElement('div'); modal.id = 'ba-send-to-messenger-modal'; modal.setAttribute('style', 'max-width: 430px; height: auto;z-index:2147483647; border-radius:5px;text-align:center;'); modal.style.position = 'relative'; modal.style.left = 0; modal.style.right = 0; modal.style.margin = '20px auto'; modal.style.marginTop = '10%'; modal.style.marginTop = '10vh'; modal.style.padding = '15px'; modal.style.overflow = 'hidden'; modal.style.backgroundColor = settings.background_color; if (window.innerHeight <600) { modalShade.style.overflowY = 'scroll'; modalShade.style.zIndex = 2147483647; modal.style.marginTop = '5%'; modal.style.marginTop = '5vh'; } else if (window.innerHeight <700) { modalShade.style.overflowY = 'scroll'; modalShade.style.zIndex = 2147483647; modal.style.marginTop = '10%'; modal.style.marginTop = '10vh'; } var exitIcon = document.createElement('span'); exitIcon.classList = 'ba-modal-close'; exitIcon.setAttribute('style', 'position: absolute;right: 10px;top: 5px;cursor: pointer;color: #000;opacity:0.3;font-size:30px;'); exitIcon.innerHTML = '×'; modal.appendChild(exitIcon); var title = document.createElement('div'); title.setAttribute('id', 'ba-fb-modal-title'); title.setAttribute('style', 'text-align: center; padding: 20px 20px 15px;font-size: 20px; line-height:24px;'); title.style.color = settings.title_color; title.innerHTML = settings.title; modal.appendChild(title); var description = document.createElement('div'); description.setAttribute('style', 'text-align: center;font-size:17px;padding:10px 20px 35px;'); description.style.color = settings.subtitle_color; description.innerHTML = settings.subtitle; description.setAttribute('id', 'ba-fb-modal-desc'); modal.appendChild(description); var image = document.createElement('img'); if (settings.image_name !== null) { image.style.width = '100%'; image.src = settings.image_name; if (settings.image_placement === 'above_title') { modal.style.paddingTop = '40px'; modal.insertBefore(image, modal.childNodes[0]); } else if (settings.image_placement === 'under_title') { modal.insertBefore(image, title.nextSibling); } else { modal.appendChild(image); } } var width = 125; if (settings.send_size === 'standard'){ width = 125; } else if (settings.send_size === 'large'){ width = 155; } else if (settings.send_size === 'xlarge'){ width = 180; } var optInBoxWrapper = document.createElement('div'); optInBoxWrapper.setAttribute('style', 'margin: 20px auto 30px;'); optInBoxWrapper.style.width = width + 'px'; modal.appendChild(optInBoxWrapper); var dataRef = 'OPT_IN_FROM_SEND_TO_MESSENGER:modal:'; if (window.baMsg.visitor_token !== ''){ dataRef += window.baMsg.visitor_token; } var optInBox = document.createElement('div'); optInBox.classList = 'fb-send-to-messenger'; optInBox.setAttribute('messenger_app_id', window.baMsg.app_id); optInBox.setAttribute('page_id', window.baMsg.fb_page_id); optInBox.setAttribute('data-ref', dataRef); optInBox.setAttribute('color', settings.send_color); optInBox.setAttribute('size', settings.send_size); modal.appendChild(optInBox); optInBoxWrapper.appendChild(optInBox); var buttonWrapper = document.createElement('div'); buttonWrapper.setAttribute('style', 'margin: 0 auto;padding-bottom: 20px;display:none;'); modal.appendChild(buttonWrapper); var button = document.createElement('a'); button.setAttribute('target', '_blank'); button.href = 'https://m.me/' + window.baMsg.fb_page_id; button.innerHTML = settings.button_text; button.setAttribute('style', 'text-align:center;padding: 10px 20px; border-radius: 5px; margin-bottom: 15px;margin-top:10px;text-decoration: none;'); button.style.backgroundColor = settings.button_color; button.style.color = settings.button_text_color; button.style.border = '1px solid ' + settings.border_color; button.onmouseover = function () {button.style.opacity = 0.8;}; button.onmouseout = function () {button.style.opacity = 1;}; button.onclick = function () {closeModal(false);}; buttonWrapper.appendChild(button); modalShade.appendChild(modal); switch (settings.display) { case 'immediately': showModal(); break; case 'exit_intent': document.addEventListener("mouseleave", function (e) { if (e.clientY <0) { showModal(); } }, false); break; case 'seconds_passed': setTimeout(function () { showModal(); }, settings.delay * 1000); break; } exitIcon.onclick = function () { closeModal(true); }; function showModal(){ modalShade.style.display = 'block'; modalShade.style.opacity = 1; window.baMsg.use_stm_callback = 'modal'; applyMet('fb_modal_view'); } function closeModal(markAsClosed) { modalShade.style.opacity = '0'; window.baMsg.use_stm_callback = ''; if (markAsClosed){ updateSubscriberHash({ba_fb_modal_closed: parseInt(new Date().getTime())}); applyMet('ba_fb_modal_close') } setTimeout(function () { document.body.removeChild(modalShade); }, 500); } }; return this; } function boosterFbAtcModal() { window.baLoaded = false; try{ var css = document.createElement('style'); css.type = 'text/css'; var styles = '@import url("https://fonts.googleapis.com/css?family=Roboto");'; css.appendChild(document.createTextNode(styles)); document.getElementsByTagName("head")[0].appendChild(css); } catch (err){ console.log(err) } this.generate = function (settings) { window.baMsg.showFbAtcModal = function(event){ if (window.baMsg.active_fb_atc_shown == false && window.baMsg.settings.fb_atc_popup.active){ if (window.baMsg.subscriber_hash.ba_fb_opted_in){return;} if (window.baMsg.subscriber_hash.ba_fb_atc_popup_closed){return;} event.preventDefault(); window.baMsg.active_atc.classList.remove("ba-click-ready"); //var atcModal = document.getElementById("ba-fb-atc-popup"); createModal.classList.add("show-pop"); createModal.style.display = "block"; window.baMsg.active_atc.removeEventListener('click', function(){}); window.baMsg.use_stm_callback = 'fb_atc_popup'; applyMet('fb_atc_view'); window.baMsg.active_fb_atc_shown = true; return false; } } window.baMsg.closeFbAtcModal = function(markAsClosed){ createModal.classList.remove("show-pop"); createModal.style.display = "none"; window.baMsg.use_stm_callback = ''; window.baMsg.active_atc.removeEventListener('click',function(){}); if (markAsClosed){ updateSubscriberHash({ba_fb_atc_popup_closed: parseInt(new Date().getTime())}); applyMet('fb_atc_close'); } setTimeout(function (){ window.baMsg.active_atc.click(); }, 500); } if (!window.baMsg.is_preview){ if (!settings.active){return;} if (window.baMsg.subscriber_hash.ba_fb_atc_popup_opted_in){return;} if (window.baMsg.subscriber_hash.ba_fb_opted_in){return;} if (window.baMsg.subscriber_hash.ba_fb_atc_popup_closed){return;} } if (window.baMsg.page_url.indexOf('products') !== -1) { if (!settings.active && !window.baMsg.is_preview){ return; } var form = getProductForm(); if (!form || form.length === 0 || (window.baMsg.subscriber_hash.ba_fb_atc_popup_opted_in && !window.baMsg.is_preview)){ return; } } var modalShade = document.createElement('div'); modalShade.classList = 'ba-modal-shade'; modalShade.setAttribute('style', 'position: fixed; z-index: 100000; background: rgba(0,0,0,.42); width:100%; height: 100%; opacity: 0;display:none;'); modalShade.style.overflow = 'none'; modalShade.style.transition = 'all 0.5s'; window.fbLoaded.promise.then(function(){ var s = document.body.firstChild; s.parentNode.insertBefore(modalShade, s); }); var createModal = document.createElement('div'); createModal.setAttribute('id', 'ba-fb-atc-popup'); var appendModal = document.body.appendChild(createModal); var modalClass = appendModal.classList.add("ba-fb-add-tc-popup__overlay"); createModal.setAttribute('style','position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 2147483647;display: none;'); var modalWrapper = document.createElement('div'); var modalWrapperMain = createModal.appendChild(modalWrapper); modalWrapperMain.classList.add('ba-fb-add-tc-popup__wrapper'); modalWrapper.setAttribute('style','display: block;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);width: 720px;max-width: 93%;'); var modalContainer = document.createElement('div'); modalWrapperMain.appendChild(modalContainer); modalContainer.classList.add('ba-fb-add-tc-popup__container'); modalContainer.setAttribute('style','background: #FFFFFF;border: 1px solid #DADADA;border-radius: 7px;box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.1);position: relative;'); if(settings.close_button == "1"){ var closeButton = document.createElement('button'); modalContainer.appendChild(closeButton); closeButton.classList.add('ba-fb-add-tc-popup__close','ba-fb-tc-modal-close'); closeButton.innerHTML = "✖"; closeButton.setAttribute('style','width: 30px;height: 30px;line-height: 30px;position: absolute;top: 15px;right: 15px;border: none;background: none;z-index: 10;'); } var modalHeader = document.createElement('div'); modalContainer.appendChild(modalHeader); modalHeader.classList.add('ba-fb-add-tc-pop-head'); var modalHeaderImage = document.createElement('div'); modalHeader.setAttribute('style','background: #F2F5F9;border-bottom: 1px solid #DADADA;border-radius: 7px 7px 0 0;height: 130px;position: relative;'); modalHeader.appendChild(modalHeaderImage); modalHeaderImage.setAttribute('style','position: absolute;bottom: 0px;width: 100%;height: 200%;background-image: url("https://cdn.shopify.com/s/files/1/2701/3534/t/1/assets/phone-hand.svg?10344228977754903280");background-size: 260px;background-position: center bottom;background-repeat: no-repeat;'); modalHeaderImage.classList.add('ba-fb-add-tc-popup-head-img'); var modalBody = document.createElement('div'); modalContainer.appendChild(modalBody); modalBody.classList.add('ba-fb-add-tc-popup__body'); modalBody.setAttribute('style','padding: 30px;text-align: center;background: #ffffff;'); var modalHeaderTag = document.createElement('h3'); modalBody.appendChild(modalHeaderTag); modalHeaderTag.classList.add('ba-fb-add-tc-pop-title'); modalHeaderTag.setAttribute('style','margin: 10px 0 25px;font-family: "Roboto", sans-serif;font-size: 25px;text-align: center;'); modalHeaderTag.innerHTML = settings.title; modalHeaderTag.style.color = settings.header_text_color; var modalParaTag = document.createElement('p'); modalParaTag.innerHTML = settings.paragraph; modalBody.appendChild(modalParaTag); modalParaTag.classList.add('ba-fb-add-tc-pop-desc'); modalParaTag.setAttribute('style','margin: 0 0 20px;font-family: "Roboto", sans-serif;font-size: 17px;text-align: center;line-height: 25px;'); modalParaTag.style.color = settings.paragraph_text_color; var optInBoxWrapper = document.createElement('div'); optInBoxWrapper.setAttribute('style', 'margin: 10px auto 30px;'); modalBody.appendChild(optInBoxWrapper); var dataRef = 'OPT_IN_FROM_SEND_TO_MESSENGER:atc_popup'; if (window.baMsg.visitor_token !== ''){ dataRef += ':' + window.baMsg.visitor_token; } var optInBox = document.createElement('div'); optInBox.classList = 'fb-send-to-messenger'; optInBox.setAttribute('messenger_app_id', window.baMsg.app_id); optInBox.setAttribute('page_id', window.baMsg.fb_page_id); optInBox.setAttribute('data-ref', dataRef); optInBox.setAttribute('color', settings.button_cta_color); optInBox.setAttribute('size', 'xlarge'); optInBox.setAttribute('cta_text', settings.button_cta); optInBox.setAttribute('style', 'width:176px !important;margin-top:15px;'); modalBody.appendChild(optInBox); optInBoxWrapper.appendChild(optInBox); var modalFooter = document.createElement('small'); modalFooter.innerHTML = settings.no_thanks_text; modalBody.appendChild(modalFooter); modalFooter.classList.add('ba-fb-add-tc-pop-footer','ba-fb-tc-modal-close'); modalFooter.setAttribute('style','display: block;margin: 5px auto 0;font-family: "Roboto", sans-serif;font-size: 12px;text-align: center;cursor: pointer;'); modalFooter.style.color = settings.no_thanks_text_color; var closePopup = document.querySelector(".ba-fb-tc-modal-close"); closePopup.addEventListener("click", function(e) { e.preventDefault(); window.baMsg.closeFbAtcModal(true); }); modalFooter.addEventListener("click", function(e) { e.preventDefault(); window.baMsg.closeFbAtcModal(true); }); return this; }; function getProductForm() { var form = document.getElementById('add-item-form'); if (!form || form.length === 0){ form = document.querySelector("form[action='/cart/add']"); } if (!form || form.length === 0){ form = document.querySelector("form[action^='/cart/add']"); } if (!form || form.length === 0){ form = document.querySelector("form[action$='/cart/add']"); } if (!form || form.length === 0){ form = document.querySelector("form[action='/cart/add.js']"); } if (!form || form.length === 0){ form = document.querySelector("form[action='/cart/add?return=/']"); } if (!form || form.length === 0){ form = document.getElementsByClassName("form.product-form")[0]; } if (!form || form.length === 0){ form = document.getElementsByClassName("btn-addtocart")[0]; } return form } setTimeout(function () { FB.Event.subscribe('send_to_messenger', function (e) { if (window.baMsg.use_stm_callback == 'modal'){ if (e.event === 'clicked') { applyMet('ba_fb_modal_click'); var fbModalTitle = document.getElementById('ba-fb-modal-title'); var fbModalDesc = document.getElementById('ba-fb-modal-desc'); if (window.baMsg.settings.fb_modal.discount_code === null) { fbModalTitle.innerHTML = window.baMsg.settings.fb_modal.submitted_title; fbModalDesc.innerHTML = window.baMsg.settings.fb_modal.submitted_subtitle; } else { fbModalTitle.innerHTML = window.baMsg.settings.fb_modal.submitted_title.replace('%discountCode', '‘ + window.baMsg.settings.fb_modal.discount_code + ”); fbModalDesc.innerHTML = window.baMsg.settings.fb_modal.submitted_subtitle === null ? null : window.baMsg.settings.fb_modal.submitted_subtitle.replace(‘%discountCode’, ‘‘ + window.baMsg.settings.fb_modal.discount_code + ”); } if (window.baMsg.settings.fb_modal.image_name !== null){ //image.parentNode.removeChild(image); } } if (e.event === ‘opt_in’) { if (window.baMsg.subscriber_hash.ba_fb_modal_opted_in){return;} baMet.getCartData(function(data){ var cartToken = JSON.parse(data).token; if (!window.baMsg.subscriber_hash.ba_fb_modal_opted_in){ var rightNow = parseInt(new Date().getTime()); var updateHash = { ba_fb_modal_opted_in: rightNow, ba_fb_opted_in: rightNow, ba_fb_modal_opt_in_cart_token: cartToken } updateSubscriberHash(updateHash); trackFbOptIn(data, ‘ba_fb_modal’); } }); } } else if (window.baMsg.use_stm_callback == ‘fb_atc_popup’){ // if (e.event === ‘clicked’) { // trackClick(); // } if (e.event === ‘opt_in’) { if (window.baMsg.subscriber_hash.ba_fb_atc_popup_opted_in === ‘true’){return;} baMet.getCartData(function(data){ var cartToken = JSON.parse(data).token; if (!window.baMsg.subscriber_hash.ba_fb_atc_popup_opted_in){ var rightNow = parseInt(new Date().getTime()); var updateHash = { ba_fb_atc_popup_opted_in: rightNow, ba_fb_opted_in: rightNow, ba_fb_atc_popup_opt_in_cart_token: cartToken } updateSubscriberHash(updateHash); trackFbOptIn(data, ‘atc_popup’); } }); window.baMsg.closeFbAtcModal(false); } } }); }, 1000); return this; } (function() { if (window.baMsg.fb_active && window.baMsg.fb_page_id){ //fb var loader = new boosterFBLoader(); loader.load(); loader.loadChat({ “active”:0, “minimized”:0, “theme_color”:’#0084FF’, “logged_in_greeting”:”Hi there! How can we help you?”, “logged_out_greeting”:”Hi! We’re here to answer any questions you may have.” }); new boosterFbCheckboxes().generate(window.baMsg.settings.fb_base); new boosterFbModal().generate(window.baMsg.settings.fb_modal); new boosterFbAtcModal().generate(window.baMsg.settings.fb_atc_popup); } //push if (window.baMsg.push_active){ new boosterPushSession().generate({ “active”: false }); } if (window.baMsg.sms_active){ new boosterSMSAtcModal().generate({ “active”:1, “title”:”Join us on SMS”, “paragraph”:”Sign up and gain access to new products, exclusive deals, and discounts before anybody else!”, “no_thanks_text”:”No thanks”, “close_button”:”1″, “plugin_type”:””, “button_cta”:”Subscribe to SMS”, “button_cta_color”:”blue”, “header_bg_color”:”#f4f6f8″, “body_bg_color”:”#fff”, “header_text_color”:”#626974″, “paragraph_text_color”:”#626974″, “no_thanks_text_color”:”#626974″, “disclaimer”:”” }); } })(); listentoAtc(); }); }()) ]]> = 0){window.gt_autoswitch_interval = setInterval(function(){if(typeof window.gtranslate_installed == ‘undefined’)return;clearInterval(window.gt_autoswitch_interval);doGTranslate(‘en|’+preferred_language);document.cookie = ‘gt_auto_switch=1; expires=Thu, 05 Dec 2030 08:08:08 UTC; path=/; domain=.’+location.host.replace(/^www./, ”);},500);}}); $(‘.switcher .selected’).click(function() {$(‘.switcher .option a img’).each(function() {if(!$(this)[0].hasAttribute(‘src’))$(this).attr(‘src’, $(this).attr(‘data-gt-lazy-src’))});if(!($(‘.switcher .option’).is(‘:visible’))) {$(‘.switcher .option’).stop(true,true).delay(100).slideDown(500);$(‘.switcher .selected a’).toggleClass(‘open’)}}); $(‘.switcher .option’).bind(‘mousewheel’, function(e) {var options = $(‘.switcher .option’);if(options.is(‘:visible’))options.scrollTop(options.scrollTop() – e.originalEvent.wheelDelta/10);return false;}); $(‘body’).not(‘.switcher’).bind(‘click’, function(e) {if($(‘.switcher .option’).is(‘:visible’) && e.target != $(‘.switcher .option’).get(0)) {$(‘.switcher .option’).stop(true,true).delay(100).slideUp(500);$(‘.switcher .selected a’).toggleClass(‘open’)}}); if(typeof GTranslateGetCurrentLang == ‘function’)if(GTranslateGetCurrentLang() != null)$(document).ready(function() {var lang_html = $(‘div.switcher div.option’).find(‘img[alt=”‘+GTranslateGetCurrentLang()+'”]’).parent().html();if(typeof lang_html != ‘undefined’)$(‘div.switcher div.selected a’).html(lang_html.replace(‘data-gt-lazy-‘, ”));}); }; gt_loadScript(“//code.jquery.com/jquery-1.12.4.min.js”, function(){jQuery_gtranslate = jQuery.noConflict(true);gtSwitcherJS(jQuery_gtranslate);}); ]]>

Source

Leave a Reply

Your email address will not be published.