OwlCyberSecurity - MANAGER
Edit File: lovely-custom-scripts.js
/*! * Magnific Popup v1.0.1 by Dmitry Semenov * The MIT License (MIT) * Copyright (c) 2014-2015 Dmitry Semenov, http://dimsemenov.com * http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom+fastclick * * Modified to adapt the latest jQuery version (v3 above) included on WordPress 5.6: * - (2020-12-15) - jQuery isFunction method is deprecated. * - (2021-02-01) - Number type value passed to css method is deprecated. * - (2021-02-04) - jQuery focus event shorthand is deprecated. * - (2020-02-27) - jQuery isArray method is deprecated. */ /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,Array.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=Array.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop()+"px",position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height()+"px",position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).trigger("focus"),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d+"px"),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH+"px"),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if("function"==typeof g){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).trigger("focus")},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if("function"==typeof d)return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c+"px")}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width()+"px",height:(u?d.innerHeight():d[0].offsetHeight)-g-f+"px"};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c+"px",width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); /* jQuery directional hover The MIT License (MIT) Copyright (c) 2015 Alex Craig (http://acraig.ca/) */ !function(t){t.fn.directionalHover=function(e){var n=t.extend({},t.fn.directionalHover.defaults,e),o=function(t,e,n,o,f,a,r,s){var u=0;o-s<=a/2&&(u^=1),n-r>=f/2&&(u^=2),o-s>a/2&&(u^=4),n-r<f/2&&(u^=8),i(u,t,e,n-r,o-s,f/2,a/2)},i=function(t,e,n,o,i,u,l){f(t,9)?a(o,i,u,l)?s(e,n,0,2*-u):s(e,n,2*-l,0):f(t,3)?r(o,i,u,l)?s(e,n,2*-l,0):s(e,n,0,2*u):f(t,12)?r(o,i,u,l)?s(e,n,0,2*-u):s(e,n,2*l,0):f(t,6)&&(a(o,i,u,l)?s(e,n,2*l,0):s(e,n,0,2*u))},f=function(t,e){return(t&e)===e},a=function(t,e,n,o){return o*t-n*e<0},r=function(t,e,n,o){return n*(e-o)+o*t-n*o<0},s=function(t,e,o,i){"in"===e?t.animate({top:o,left:i},0,function(){t.stop().animate({top:0,left:0},n.speed,n.easing)}):"out"===e&&t.animate({top:0,left:0},0,function(){t.stop().animate({top:o,left:i},n.speed,n.easing)})};return this.css({position:"relative",overflow:"hidden"}),this.find(n.overlay).css({position:"absolute",top:"-100%"}),this.each(function(){var e=t(this);e.hover(function(t){o(e.find(n.overlay),"in",t.pageX,t.pageY,e.width(),e.height(),Math.floor(e.offset().left),e.offset().top)},function(t){o(e.find(n.overlay),"out",t.pageX,t.pageY,e.width(),e.height(),Math.floor(e.offset().left),e.offset().top)})})},t.fn.directionalHover.defaults={overlay:".et_overlay",easing:"swing",speed:400}}(jQuery); (function($){ var triggerClassChange = $.fn.addClass; $.fn.addClass = function() { $(this).trigger( 'classChanged' ); return triggerClassChange.apply( this, arguments ); } })(jQuery); jQuery(document).ready(function($) { setTimeout(function () { var classCountC = "1"; $('.ingrid_slider_testi .et_pb_slide').each(function () { var attrText = $(this).find('.et_pb_slide_image img').attr('src'); $('.ingrid_slider_testi .et-pb-controllers a:nth-child(' + classCountC + ')').css('background-image', 'url('+attrText+')'); classCountC++; }); $('.ingrid_slider_testi .et_pb_slider .et-pb-controllers a').on('click', function () { var classCountC = "1"; $('.impi_circle_click_testimonials .et_pb_slide').each(function () { var attrText = $(this).find('.et_pb_slide_image img').attr('src'); $('.ingrid_slider_testi .et-pb-controllers a:nth-child(' + classCountC + ')').css('background-image', 'url('+attrText+')'); classCountC++; }); }) }, 1000); setTimeout(function () { $('.ingrid_slider_testi .et_pb_testimonial').each(function () { $(this).find('.et_pb_testimonial_description .et_pb_testimonial_description_inner strong:not(.et_pb_testimonial_author)').insertBefore( $(this).find('.et_pb_testimonial_portrait')) }); },200); }); jQuery(document).ready(function($) { $(window).on("load", function(){ $('.lovely-divider svg').fadeIn('fast'); // will fade out the white DIV that covers the website. }); $('.lovely-checkmark').each(function() { $(this).prepend('<svg class="lovely-divider checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><path d="M66.9.5c-3.2-1.7-6.7 1.6-8.7 3.5-4.7 4.6-8.8 10-13.2 14.8-5 5.3-9.6 10.7-14.7 15.9-2.9 2.9-6.1 6.1-8 9.7-4.4-4.3-8.1-8.9-13-12.6-3.5-2.7-9.4-4.6-9.2 1.8.1 8.4 7.6 17.4 13 23.1 2.3 2.4 5.3 5 8.9 5.1 4.3.2 8.6-4.9 11.2-7.7 4.5-4.9 8.1-10.3 12.3-15.3 5.3-6.6 10.8-13 16-19.7 3.3-4 13.6-14.3 5.4-18.6zM5.3 33.2c-.1 0-.2 0-.5.1-.4-.1-.8-.3-1.3-.5.4-.3 1-.1 1.8.4z"/></svg>') }); $('.lovely-testimonial').each(function() { if( $('.et_pb_testimonial_portrait', this).length ) { portrait = $('.et_pb_testimonial_portrait', this); $('.et_pb_testimonial_author', this).before(portrait); $(this).addClass('has-portrait'); } if( $(this).hasClass('et_pb_testimonial_no_image') ) { $('.et_pb_testimonial_author', this).before('<span class="quote-icon"></span>'); } }); $('.lovely-blurb1').each(function () { //loop over each list item description= $('.et_pb_blurb_content .et_pb_blurb_container .et_pb_blurb_description', this); $('.et_pb_blurb_container', this).after('<div class="blurb-description lovely-border"></div>'); $('.blurb-description', this).append(description); // add blurb link on back side of the flip if( $('.et_pb_blurb_content .et_pb_module_header a', this).length ) { $(this).addClass('has_link'); if ( $('.et_pb_blurb_content .et_pb_module_header a', this).attr('target') == '_blank' ) { link_target = $(this).find('a').attr('href'); $('.et_pb_blurb_content .blurb-description', this).after("<div class='lovely-read-more'><a href='"+link_target+"' target='_blank'></a></div>"); } else { link_target = $(this).find('a').attr('href'); $('.et_pb_blurb_content .blurb-description', this).after("<div class='lovely-read-more'><a href='"+link_target+"'></a></div>"); } } }); // wrap blog article elements on archive pages /*$('.et_pb_post').contents().filter(function() { return this.nodeType == 3 && $.trim(this.nodeValue).length; }) .wrap('<p class="post-content">'); $('.blog .et_pb_post, .category .et_pb_post, .archive .et_pb_post, .search .et_pb_post').each(function () { $('>:not(a)', this).wrapAll('<div class="wrapped"></div>'); if ( $('.entry-featured-image-url', this).length ) { $(this).addClass('has-img'); } });*/ // change Select Page to Menu $('#et_mobile_nav_menu .select_page').text('Menu'); jQuery(document).ready(function($) { /** * Collapse Divi mobile menu submenus. * * Works for both the Menu and the Fullwidth Menu modules. * The parent item links can be either disabled or clickable. * * @site https://www.divicio.us/ * * @param bool parentClickable Pass true to keep the parent menu item links clickable. Default: false. */ function dvcs_collapse_menu_module_submenus_on_mobile(parentClickable = false) { // Mobile menu let $menu = $('.et_pb_module .et_mobile_menu'); // Iterate the mobile menu links $menu.find('a').each(function() { // Menu hamburger icon let $menu_icon = $(this).parents('.mobile_nav').find('.mobile_menu_bar'); // Remove click event handlers from the link $(this).off('click'); // If the menu item DOESN'T HAVE submenus if( ! $(this).siblings('.sub-menu').length ) { // Close the mobile menu on link click $(this).on('click', (e) => $menu_icon.trigger('click')); } else { // If parent items links are DISABLED if( ! parentClickable ){ // Replace the URL with the # symbol $(this).attr('href', '#'); // Open/close the submenu on link click $(this).on('click', (e) => toggle_visible(e, $(this).parent())); } else { // Add the "clickable" class to the parent(<li> tag) $(this).parent().addClass('clickable') // Prepend the icon to parent .prepend('<span class="parent_icon"></span>') // Open/close the submenu on icon click .find('.parent_icon').on('click', (e) => toggle_visible(e, $(this).parent())); // Link click $(this).on('click', function(e){ // Toggle the submenu if the link doesn't have a URL or anchor if ( $(this).attr('href') === '#' ) { toggle_visible(e, $(this).parent()); } else { // Close the mobile menu $menu_icon.trigger('click'); } }); } } }); /** * Toggles the 'visible' class on passed element. */ const toggle_visible = (e, elem) => { e.preventDefault(); elem.toggleClass('visible'); } } $(function() { /** * Call the function with a delay to allow * the mobile menu(s) be ready first. * * To keep parent links clickable pass true (boolean) as argument. */ setTimeout(function() { dvcs_collapse_menu_module_submenus_on_mobile(true); }, 700); }); }) function lovely_ajax_fn() { if ($('.more-link').length > 0) { $('.more-link').text(lovely_values.lovely_readmore); } if ( lovely_values.lovely_popup == 'on' ) { // open popup on click $('a[href="#open-popup"]').addClass('et_smooth_scroll_disabled'); $('a[href="#open-popup"]').magnificPopup({ type:'inline', mainClass: 'lovely-mfp', zoom: { enabled: true, // By default it's false, so don't forget to enable it duration: 2000, // duration of the effect, in milliseconds easing: 'ease-in-out', // CSS transition easing function }, callbacks: { open: function() { $('body').addClass('blurred'); }, close: function() { $('body').removeClass('blurred'); } }, prependTo: '#page-container' }); } $('.lovely-portfolio .et_pb_portfolio_item').directionalHover(); $('.lovely-gallery .et_pb_gallery_item').directionalHover(); $( 'div.lovely-portfolio' ).find( 'li.et_pb_portfolio_filter a' ).on( 'classChanged', function() { setTimeout( function() { $('.lovely-portfolio .et_pb_portfolio_item').directionalHover(); }); }); $( 'div.lovely-portfolio' ).on( 'classChanged', 'li.page a', function() { setTimeout( function() { $('.lovely-portfolio .et_pb_portfolio_item').directionalHover(); }); }); // add button class to read more & previous & next link //$('a.more-link, .pagination .alignleft a, .pagination .alignright a').addClass('et_pb_button'); //Remove pipes, commas and 'by' from the meta $(".ingrid_listblog .post-meta, .vivienpro-postgrid .post-meta, .post-meta, .archive #left-area .et_pb_post").html(function () { return $(this).html().replace(/\|/g, '').replace('by', '').replace('...', '').replace(/,/g, ''); }); // wrap blog elements for 2 columns / list layout $('.ingrid_listblog .et_pb_post, .kathy_blogimg .et_pb_post, .kathy_blognews .et_pb_post').each(function () { if ($('.wrapped', this).length < 1) { $('>:not(.entry-featured-image-url)', this).wrapAll('<div class="wrapped"></div>'); } $('.entry-featured-image-url img', this).wrap('<div class="img-wrap"></div>'); overlay= $('.et_overlay', this); $('.img-wrap', this).append(overlay); }); //Wrap the category in a container $('.vivienpro_gridblog .et_pb_post, .vivienpro_blogalternate .et_pb_post, .vivienpro_listblog .et_pb_post, .vivienpro-postgrid .et_pb_post').each(function () { $(this).find('[rel~="tag"]').wrapAll('<div class="vivienpro-blog-cat"></div>'); //Move the category above the post title $(this).find('.vivienpro-blog-cat').detach().insertBefore($(".entry-title", this)); }); $('.lovely-blog-grid .et_pb_post').each(function () { var morelink = $('.more-link', this); $('.post-content', this).after(morelink); var excerpt = $('.post-content p', this).text(); var shortExcerpt = $.trim(excerpt).substring(0, 110).split(" ").slice(0, -1).join(" ") + "…"; $('.post-content', this).html(shortExcerpt); overlay= $('.et_overlay', this); $('.entry-featured-image-url img', this).wrap('<div class="img-wrap"></div>'); }); $('.lovely-timeline').parent('.et_pb_column').addClass('lovely-timeline-wrap'); $('.lovely-timeline').each(function () { $(this).wrap( '<div class="lovely-timeline-item"></div>' ); }); } $(document).ajaxComplete(function() { lovely_ajax_fn(); }); lovely_ajax_fn(); }); jQuery(document).ready(function($){ $(window).scroll(function(){ var topOffset = $(window).scrollTop(); var fixedSection = $('.fixed_header'); if (topOffset >= 450) { fixedSection.addClass('dl-scrolled'); } else { fixedSection.removeClass('dl-scrolled'); } }); }) jQuery(document).ready(function($) { $('a.video_popup, .video_popup a').magnificPopup({ type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: true, fixedContentPos: false }); }); (function($){ // equal blurbs height function equalizeHeights(selector) { var heights = new Array(); $(selector).each(function() { $(this).css('min-height', '0'); $(this).css('max-height', 'none'); $(this).css('height', 'auto'); heights.push($(this).height()); }); var max = Math.max.apply( Math, heights ); $(selector).each(function() { $(this).css('height', max + 'px'); }); } $(window).on("load", function() { equalizeHeights('.lovely-equal-height-blurb .et_pb_blurb_container'); var iv = null; $(window).resize(function() { if(iv !== null) { window.clearTimeout(iv); } iv = setTimeout(function() { equalizeHeights('.lovely-equal-height-blurb .et_pb_blurb_container'); }, 120); }); }); // folded submenus function dtb_setup_submenus() { $("<div class='sub-menu-toggle'></div>").insertBefore(".et_mobile_menu .menu-item-has-children > a, #dtb-m-menu .menu-item-has-children > a"); $(".sub-menu-toggle").click(function (e) { e.preventDefault(); $(this).toggleClass("popped"); }); } $(window).on("load", function(){ dtb_setup_submenus(); var parent_links = $(".et_mobile_menu .menu-item-has-children > a, #dtb-m-menu .menu-item-has-children > a"); var toggles = $(".sub-menu-toggle"); parent_links.off(); parent_links.each(function (i) { if ($(this).attr("href") === '#') { $(this).click(function () { toggles[i].click(function () { $(this).toggleClass('popped'); }); }); } }); }); })(jQuery);