[]
0;if(r&&Z(i,”overflow”)!=”visible”){a=i.getBoundingClientRect();r=C>a.left&&pa.top-1&&g 0){ // Run lazyscript wordkeeperSpeed.lazyloadScriptItem(wordkeeperSpeed.scriptQueue[0]); } else{ wordkeeperSpeed.documentState.push(‘lazyScriptsLoaded’); } } // Delay the process of loading the lazyload later variety of lazyscript if the page is not ready for it else{ setTimeout(function(){ wordkeeperSpeed.processLazyScripts(true); },2); } } } // Lazyload a single script item wordkeeperSpeed.lazyloadScriptItem = function(source){ let script = document.createElement(‘script’); let banAttributes = [‘src’, ‘data-id’, ‘id’, ‘type’, ‘data-lazyload-later’]; script.type = ‘text/javascript’; // Add any missing attributes from the source script to the replacement script Array.prototype.slice.call(source.attributes).forEach(function(att){ if(banAttributes.indexOf(att.nodeName) == -1){ script.setAttribute(att.nodeName, att.textContent); } }); // Add the id back to the element if(source.hasAttribute(‘data-id’)){ script.id = source.getAttribute(‘data-id’); script.removeAttribute(‘data-id’); } // Remove references to data-lazyload-later since we’re keeping the source element if(source.hasAttribute(‘data-lazyload-later’)){ source.removeAttribute(‘data-lazyload-later’); } // Add the element to the DOM, then define onload, then define the src // Must be done in that order to work across browsers source.parentNode.replaceChild(script, source); script.onload = function(e){ // Maintain the correct index order of the current script wordkeeperSpeed.scriptQueueIndex++; if(wordkeeperSpeed.scriptQueueIndex < wordkeeperSpeed.scriptQueue.length){ wordkeeperSpeed.lazyloadScriptItem(wordkeeperSpeed.scriptQueue[wordkeeperSpeed.scriptQueueIndex]); } // If all lazyscripts of this type are loaded, reset else if(wordkeeperSpeed.scriptQueueIndex == wordkeeperSpeed.scriptQueue.length){ wordkeeperSpeed.scriptQueueIndex = 0; wordkeeperSpeed.scriptQueue = []; // If loading the page load variety of lazyscript and we haven't triggered // load events trigger them now if(wordkeeperSpeed.documentState.indexOf('scriptsLoaded') == -1){ wordkeeperSpeed.readyState = 'complete'; wordkeeperSpeed.documentState.push('scriptsLoaded'); wordkeeperSpeed.documentState.push('complete'); wordkeeperSpeed.scriptLater = true; document.querySelectorAll('[data-critical-css]').forEach(function(critical){ critical.remove(); }); if(wordkeeperSpeed.elementor == true){ window.addEventListener('load', wordkeeperSpeed.processElementor()); } document.dispatchEvent(new Event('DOMContentLoaded', {'cancelable': false, 'bubbles': true})); document.dispatchEvent(new Event('load', {'cancelable': false, 'bubbles': true})); } else{ document.querySelectorAll('[data-critical-css-later]').forEach(function(critical){ critical.remove(); }); wordkeeperSpeed.documentState.push('lazyScriptsLoaded'); } } }; // Add the script as either a src or an inline script that has been converted to a data URL for the src if (source.hasAttribute('src')) { script.src = source.src; } else{ let srcBlob = new Blob([ source.textContent ], { type: 'text/javascript' }); script.src = window.URL.createObjectURL(srcBlob); } } // Run lazyload later and remove event listeners for it wordkeeperSpeed.lazyLoadLater = function(){ wordkeeperSpeed.processLazyStyles(true); wordkeeperSpeed.processLazyScripts(true); for (let i = 0; i = 0 && rect.left >= 0 && rect.bottom <= wordkeeperSpeed.boundingWindow.height && rect.right longest){ matched = true; final = index; longest = background.media.length; } } }); if(matched){ elem.style.backgroundImage = backgrounds[final].value; elem.classList.remove('lazyloaded'); elem.classList.add('lazyload'); } } } }); }; // Process lazyload videos for proper sizing and click behavior wordkeeperSpeed.processVideos = function(elements = false){ let videoQueue = []; if(elements != false){ videoQueue = elements; } else{ videoQueue = wordkeeperSpeed.videos; } videoQueue.forEach(function(item, index){ let itemCss = window.getComputedStyle(item); if(itemCss.getPropertyValue('float') == 'left' || itemCss.getPropertyValue('float') == 'right') { if(itemCss.getPropertyValue('max-width') != '') { item.style.width = itemCss.getPropertyValue('max-width'); } else if(itemCss.getPropertyValue('min-width') != '') { item.style.width = itemCss.getPropertyValue('min-width'); } } // Adjust the display window and compatibility with WP Bakery Video Player let itemWidth = item.offsetWidth; let itemHeight = 0.5625 * itemWidth; // Account for situations where the width is zero if(itemWidth == 0){ item.style.width = '100%'; itemWidth = item.offsetWidth; // Hidden item if(itemWidth == 0){ if(item.hasAttribute('data-width')){ item.style.width = parseInt(item.getAttribute('data-width')) + 'px'; itemWidth = parseInt(item.getAttribute('data-width')); } else if(item.hasAttribute('data-height')){ item.style.width = (parseInt(item.getAttribute('data-height')) / 0.5625) + 'px'; itemWidth = (parseInt(item.getAttribute('data-height')) / 0.5625); } } itemHeight = 0.5625 * itemWidth; } if(itemCss.getPropertyValue('min-height').indexOf('px') != -1 && parseInt(itemCss.getPropertyValue('min-height')) > itemHeight){ item.style.minHeight = itemHeight + ‘px’; } item.style.height = itemHeight + ‘px’; // Fix height when native video height is not the right aspect ratio if((item.offsetHeight / item.offsetWidth) = 0 && rect.left >= 0 && rect.bottom <= wordkeeperSpeed.boundingWindow.height && rect.right = 0 && rect.left >= 0 && rect.bottom <= wordkeeperSpeed.boundingWindow.height && rect.right = 0 && rect.left >= 0 && rect.top <= wordkeeperSpeed.boundingWindow.height && rect.left longest){ matched = true; final = index; longest = background.media.length; } } }); if(matched){ elem.style.backgroundImage = backgrounds[final].value; } } } if(elem.classList.contains('elementor-invisible')){ elem.classList.remove('elementor-invisible'); elem.classList.add(elem.getAttribute('data-animation')); } }); // Determine scroll state if(document.documentElement.scrollTop > 40){ wordkeeperSpeed.documentState.push(‘scrolled’); wordkeeperSpeed.images.forEach(function(item, index){ lazySizes.loader.unveil(item); }); } else{ document.addEventListener(‘scroll’, function(e){ wordkeeperSpeed.documentState.push(‘scrolled’); wordkeeperSpeed.images.forEach(function(item, index){ lazySizes.loader.unveil(item); }); }, {once: true}); } // Iterate over videos and set maxwidth for Vimeo videos (if any) // Video thumbnails currently have an index of 2 wordkeeperSpeed.assets[2].assets.forEach(function(url, index){ if(wordkeeperSpeed.assets[2].assets.length > 0){ if(url.indexOf(‘vimeo’) != -1){ wordkeeperSpeed.assets[2].assets[index] = wordkeeperSpeed.assets[2].assets[index] + (2 * screen.availWidth); } } }); // Iterate over the asset list and push each type of asset to the worker to load in the background wordkeeperSpeed.assets.forEach(function(assetGroup, index){ if(assetGroup.assets.length > 0){ // Spawn a new worker per asset group wordkeeperSpeed.workers[index] = new Worker(window.URL.createObjectURL(wordkeeperSpeed.workerBlob)); // Trigger proper follow up events after each asset type is fully loaded wordkeeperSpeed.workers[index].onmessage = function(e) { let data = JSON.parse(e.data); switch(data.type){ case ‘styles’: case ‘scripts’: case ‘lazyStyles’: case ‘lazyScripts’: window.dispatchEvent(new Event(‘wordkeeper’ + data.type[0].toUpperCase() + data.type.slice(1) + ‘Ready’)); e.target.terminate(); break; case ‘thumbnails’: wordkeeperSpeed.processVideoThumbnail(data); break; case ‘widgets’: wordkeeperSpeed.processWidget(data); break; default: break; } }; wordkeeperSpeed.workers[index].postMessage(JSON.stringify(assetGroup)); } else{ window.dispatchEvent(new Event(‘wordkeeper’ + assetGroup.type[0].toUpperCase() + assetGroup.type.slice(1) + ‘Ready’)); } }); // Override default document state to prevent early “ready” fires Object.defineProperty(document, ‘readyState’, { get: function() { return wordkeeperSpeed.readyState }, set: function() {} }); // Stop the original DOMContentLoaded event from firing so we can trigger our own later window.addEventListener(‘DOMContentLoaded’, function(e){ e.preventDefault(); e.stopImmediatePropagation(); // Load up relevant elements for processing wordkeeperSpeed.styles = document.querySelectorAll(‘[type=”text/lazycss”]:not([data-lazyload-later])’); wordkeeperSpeed.scripts = document.querySelectorAll(‘script[type=”text/lazyscript”]:not([data-lazyload-later])’); wordkeeperSpeed.lazyStyles = document.querySelectorAll(‘[type=”text/lazycss”][data-lazyload-later]’); wordkeeperSpeed.lazyScripts = document.querySelectorAll(‘script[type=”text/lazyscript”][data-lazyload-later]’); wordkeeperSpeed.videos = document.querySelectorAll(‘.wordkeeper-video’); wordkeeperSpeed.documentState.push(‘ready’); // Process backgrounds if(wordkeeperSpeed.backgrounds.length > 0){ wordkeeperSpeed.processBackgrounds(); } // Process videos if(wordkeeperSpeed.videos.length > 0){ wordkeeperSpeed.processVideos(); } }, {once: true}); // Stop the original load event from firing so we can trigger our own later window.addEventListener(‘load’, function(e){ e.preventDefault(); e.stopImmediatePropagation(); wordkeeperSpeed.documentState.push(‘loaded’); if(document.documentElement.scrollTop > 40){ wordkeeperSpeed.lazyLoadLater(); } else{ for (let i = 0; i 0) { // element added to DOM [].some.call(mutation.addedNodes, function(el) { if(el.querySelectorAll(‘.wordkeeper-video’).length > 0){ let videos = []; console.log(el); el.querySelectorAll(‘.wordkeeper-video’).forEach(function(item, index){ videos[index] = document.querySelector(‘.wordkeeper-video[data-embed=’ + el.querySelector(‘.wordkeeper-video’).getAttribute(‘data-embed’) + ‘]’); }); wordkeeperSpeed.processVideos(videos); } }); } }); }); observer.observe(document.body, {childList: true});*/ }, {once: true});]]>Top 10 Benefits of Instagram for Business – LYFE Marketingbody .vc_ui-dropdown .vc_ui-list-bar-item,body .vc_ui-panel .vc_panel-tabs>.vc_edit-form-tab.vc_active,body .vc_ui-panel.vc_active,body .vc_ui-prompt-content{display:block}body .vc_row.vc_row-o-content-middle{display:block}body .vc_ui-panel .vc_ui-panel-content-container{max-height:50vh!important}body [data-vc-template-search=true] .vc_edit-form-tab{display:block!important}body [data-vc-template-search=true] .vc_edit-form-tab.vc-search-result-empty{display:none!important}body .vc_edit_form_elements .vc_row,body .vc_tta-tabs.vc_tta-tabs-position-left,body .vc_tta-tabs.vc_tta-tabs-position-left .vc_tta-panels-container,body .vc_tta-tabs.vc_tta-tabs-position-left .vc_tta-tabs-container,body .vc_tta-tabs.vc_tta-tabs-position-right,body .vc_tta-tabs.vc_tta-tabs-position-right .vc_tta-panels-container,body .vc_tta-tabs.vc_tta-tabs-position-right .vc_tta-tabs-container,body .vc_ui-panel-header .vc_ui-panel-header-header,body .vc_ui-panel-window-inner{display:block}.vc_non_responsive body .vc_tta-tabs.vc_tta-tabs-position-left .vc_tta-tabs-container,.vc_tta-o-non-responsive body .vc_tta-tabs.vc_tta-tabs-position-left .vc_tta-tabs-container{display:block}.vc_non_responsive body .vc_tta-tabs.vc_tta-tabs-position-right .vc_tta-tabs-container,.vc_tta-o-non-responsive body .vc_tta-tabs.vc_tta-tabs-position-right .vc_tta-tabs-container{display:block}.vc_separator{display:table}.vc_separator h4{display:table-cell;white-space:pre;vertical-align:middle}.vc_separator .vc_sep_holder{display:table-cell;vertical-align:middle;width:50%}.vc_separator.vc_separator_align_left .vc_sep_holder,.vc_separator.vc_separator_align_right .vc_sep_holder{width:100%} Sending PageView event to Facebook’);fbq(‘track’,”PageView”);var fbqEvents=new Array()]]>
boxtf_pos){if(scroll_bot_pos>bottoms_conts){$(‘#sidebar-fix’).removeClass(‘c-fixed-element’)}else{$(‘#sidebar-fix’).addClass(‘c-fixed-element’);$(‘#sidebar-fix’).css({“top”:” “+topss+”px”});console.log(topss)}}else{$(‘#sidebar-fix’).removeClass(‘c-fixed-element’)} if(scroll>lastScrollTop){topss–}else{topss++} lastScrollTop=scroll})}})]]> “);jQuery.ajax({type:”post”,url:ajax_var.url,data:”action=jm-post-like&nonce=”+ajax_var.nonce+”&jm_post_like=&post_id=”+post_id,success:function(count){if(count.indexOf(“already”)!==-1){var lecount=count.replace(“already”,””);heart.prop(‘title’,’Like’);heart.removeClass(“liked”);heart.html(“ “+lecount)}else{heart.prop(‘title’,’Unlike’);heart.addClass(“liked”);heart.html(“ “+count)}}})})})]]> 0){ $(‘#exit-intent-popup-back’).fadeIn(); } }); $(‘#exit-intent-popup-close-btn’).click(function(){ $(‘#exit-intent-popup-back’).fadeOut(); cclose–; }); });]]> 0){ $(‘#exit-intent-popup-back’).fadeIn(); } }); $(‘#exit-intent-popup-close-btn’).click(function(){ $(‘#exit-intent-popup-back’).fadeOut(); cclose–; }); });]]>
Source
