!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=116)}({116:function(e,t,n){"use strict";n.r(t);var r=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var o=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var i=function(e,t){return function(n,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,l=e[t];if(o(n)&&r(i))if("function"==typeof a)if("number"==typeof s){var c={callback:a,priority:s,namespace:i};if(l[n]){var u,d=l[n].handlers;for(u=d.length;u>0&&!(s>=d[u-1].priority);u--);u===d.length?d[u]=c:d.splice(u,0,c),l.__current.forEach((function(e){e.name===n&&e.currentIndex>=u&&e.currentIndex++}))}else l[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,a,s)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,a){var s=e[t];if(o(i)&&(n||r(a))){if(!s[i])return 0;var l=0;if(n)l=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else for(var c=s[i].handlers,u=function(e){c[e].namespace===a&&(c.splice(e,1),l++,s.__current.forEach((function(t){t.name===i&&t.currentIndex>=e&&t.currentIndex--})))},d=c.length-1;d>=0;d--)u(d);return"hookRemoved"!==i&&e.doAction("hookRemoved",i,a),l}}};var s=function(e,t){return function(n,r){var o=e[t];return void 0!==r?n in o&&o[n].handlers.some((function(e){return e.namespace===r})):n in o}};var l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var o=e[t];o[r]||(o[r]={handlers:[],runs:0}),o[r].runs++;var i=o[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];if(!i||!i.length)return n?s[0]:void 0;var c={name:r,currentIndex:0};for(o.__current.push(c);c.currentIndex<i.length;){var u=i[c.currentIndex],d=u.callback.apply(null,s);n&&(s[0]=d),c.currentIndex++}return o.__current.pop(),n?s[0]:void 0}};var c=function(e,t){return function(){var n,r,o=e[t];return null!==(n=null===(r=o.__current[o.__current.length-1])||void 0===r?void 0:r.name)&&void 0!==n?n:null}};var u=function(e,t){return function(n){var r=e[t];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};var d=function(e,t){return function(n){var r=e[t];if(o(n))return r[n]&&r[n].runs?r[n].runs:0}},f=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=i(this,"actions"),this.addFilter=i(this,"filters"),this.removeAction=a(this,"actions"),this.removeFilter=a(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=a(this,"actions",!0),this.removeAllFilters=a(this,"filters",!0),this.doAction=l(this,"actions"),this.applyFilters=l(this,"filters",!0),this.currentAction=c(this,"actions"),this.currentFilter=c(this,"filters"),this.doingAction=u(this,"actions"),this.doingFilter=u(this,"filters"),this.didAction=d(this,"actions"),this.didFilter=d(this,"filters")};var h=function(){return new f},p=h();p.addAction,p.addFilter,p.removeAction,p.removeFilter,p.hasAction,p.hasFilter,p.removeAllActions,p.removeAllFilters,p.doAction,p.applyFilters,p.currentAction,p.currentFilter,p.doingAction,p.doingFilter,p.didAction,p.didFilter,p.actions,p.filters;function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}window.isEditMode=!1,window.eael=window.ea={hooks:h(),isEditMode:!1,elementStatusCheck:function(e){return!(!window.eaElementList||!(e in window.eaElementList))||(window.eaElementList=y(y({},window.eaElementList),{},g({},e,!0)),!1)},debounce:function(e,t){var n;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}},eael.hooks.addAction("widgets.reinit","ea",(function(e){var t=jQuery(".eael-filter-gallery-container",e),n=jQuery(".eael-post-grid:not(.eael-post-carousel)",e),r=jQuery(".eael-twitter-feed-masonry",e),o=jQuery(".eael-instafeed",e),i=jQuery(".premium-gallery-container",e),a=jQuery(".eael-event-calendar-cls",e),s=jQuery(".eael-testimonial-slider",e),l=jQuery(".eael-tm-carousel",e),c=jQuery(".eael-post-carousel:not(.eael-post-grid)",e),u=jQuery(".eael-logo-carousel",e),d=jQuery(".eael-twitter-feed-carousel",e);t.length&&t.isotope("layout"),n.length&&n.isotope("layout"),r.length&&r.isotope("layout"),o.length&&o.isotope("layout"),i.length&&i.isotope("layout"),a.length&&eael.hooks.doAction("eventCalendar.reinit"),s.length&&eael.hooks.doAction("testimonialSlider.reinit"),l.length&&eael.hooks.doAction("teamMemberCarousel.reinit"),c.length&&eael.hooks.doAction("postCarousel.reinit"),u.length&&eael.hooks.doAction("logoCarousel.reinit"),d.length&&eael.hooks.doAction("twitterCarousel.reinit")}));var w,b=function(e){void 0===window.eaelPreventResizeOnClick&&window.dispatchEvent(new Event("resize")),(e="object"===v(e)?e:jQuery(e)).find(".swiper-wrapper").each((function(){var e=jQuery(this).css("transform");jQuery(this).css("transform",e)}))};eael.hooks.addAction("ea-advanced-tabs-triggered","ea",b),eael.hooks.addAction("ea-advanced-accordion-triggered","ea",b),jQuery(window).on("elementor/frontend/init",(function(){window.isEditMode=elementorFrontend.isEditMode(),window.eael.isEditMode=elementorFrontend.isEditMode(),eael.hooks.doAction("init"),eael.isEditMode&&eael.hooks.doAction("editMode.init")})),function(e){eael.getToken=function(){localize.nonce&&!eael.noncegenerated&&e.ajax({url:localize.ajaxurl,type:"post",data:{action:"eael_get_token"},success:function(e){e.success&&(localize.nonce=e.data.nonce,eael.noncegenerated=!0)}})},eael.sanitizeURL=function(e){if(e.startsWith("/")||e.startsWith("#"))return e;try{var t=new URL(e);if(!["http:","https:","ftp:","ftps:","mailto:","news:","irc:","irc6:","ircs:","gopher:","nntp:","feed:","telnet:","mms:","rtsp:","sms:","svn:","tel:","fax:","xmpp:","webcal:","urn:"].includes(t.protocol))throw new Error("Invalid protocol");return t.toString()}catch(e){return console.error("Error sanitizing URL:",e.message),"#"}};var t=!0;window.addEventListener("hashchange",(function(){if(t){var n=window.location.hash.substr(1);"undefined"!==(n="safari"===n?"eael-safari":n)&&n&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(n)&&e("#"+n).trigger("click")}})),e("a").on("click",(function(n){var r,o=e(this).attr("href");(r=(o=void 0===o?"":o).startsWith("#"))||(r=(o=o.replace(localize.page_permalink,"")).startsWith("#")),r&&(t=!1,setTimeout((function(){t=!0}),100));try{if(o.startsWith("#!")){var i=o.replace("#!","#");e(i).trigger("click")}else if(r&&(e(o).hasClass("eael-tab-item-trigger")||e(o).hasClass("eael-accordion-header"))&&(e(o).trigger("click"),void 0!==o&&o)){var a=e(o).closest(".eael-advance-tabs");if(a.length>0){var s=a.data("custom-id-offset");s=s?parseFloat(s):0,e("html, body").animate({scrollTop:e(o).offset().top-s},300)}}}catch(e){}})),e(document).on("click",".e-n-tab-title",(function(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),100)}))}(jQuery),(w=jQuery)(document).on("click",".theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus",(function(e){var t=w(this),n=t.closest(".quantity").find(".qty"),r=parseFloat(n.val()),o=parseFloat(n.attr("max")),i=parseFloat(n.attr("min")),a=n.attr("step");r&&""!==r&&"NaN"!==r||(r=0),""!==o&&"NaN"!==o||(o=""),""!==i&&"NaN"!==i||(i=0),"any"!==a&&""!==a&&void 0!==a&&"NaN"!==parseFloat(a)||(a=1),t.hasClass("nm-qty-plus")?o&&(o==r||r>o)?n.val(o):n.val(r+parseFloat(a)):i&&(i==r||r<i)?n.val(i):r>0&&n.val(r-parseFloat(a))})),function(e){e.fn.isInViewport=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;if(e(this).length<1)return!1;var n=e(this).offset().top,r=n+e(this).outerHeight()/t,o=e(window).scrollTop(),i=o+e(window).height()/t;return r>o&&n<i},e(document).ready((function(){var e=new URLSearchParams(location.search);if(e.has("popup-selector")&&(e.has("eael-lostpassword")||e.has("eael-resetpassword"))){var t=e.get("popup-selector");t.length&&/^[A-Za-z.#][A-Za-z0-9_:.#\s-]*$/.test(t)&&(t=t.replace(/_/g," "),setTimeout((function(){jQuery(t).trigger("click")}),300))}})),e(document).on("click",".eael-onpage-edit-template",(function(){var t=e(this),n=t.data("eael-template-id"),r=t.data("page-id"),o=t.data("mode");"edit"===o?(parent.window.$e.internal("panel/state-loading"),parent.window.$e.run("editor/documents/switch",{id:parseInt(n)}).then((function(){t.data("mode","save"),t.find("span").text("Save & Back"),t.find("i").addClass("eicon-arrow-left").removeClass("eicon-edit"),t.closest(".eael-onpage-edit-template-wrapper").addClass("eael-onpage-edit-activate").parent().addClass("eael-widget-otea-active"),parent.window.$e.internal("panel/state-ready")}))):"save"===o&&(parent.window.$e.internal("panel/state-loading"),parent.window.$e.run("editor/documents/switch",{id:parseInt(r),mode:"save",shouldScroll:!1}).then((function(){parent.window.$e.internal("panel/state-ready"),t.data("mode","edit")})))}))}(jQuery)}});
USR_PREFS_CK_NAME="undefined"!=typeof USR_PREFS_CK_NAME?USR_PREFS_CK_NAME:"lwaio_consent_preferences",ACTED_CONSENT_CK_NAME="undefined"!=typeof ACTED_CONSENT_CK_NAME?ACTED_CONSENT_CK_NAME:"lwaio_consent_acted",EXP_CK_NAME="undefined"!=typeof EXP_CK_NAME?EXP_CK_NAME:"1 Year",function(e){"use strict";let t={set:function(e,t,o,i=""){let s="";if(o){let e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3),s="; expires="+e.toGMTString()}i&&(i="; domain="+i),document.cookie=e+"="+t+s+"; path=/"+i},read:function(e){let t=e+"=",o=document.cookie.split(";"),i=o.length;for(let e=0;e<i;e++){let i=o[e];for(;" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},exists:function(e){return null!==this.read(e)},getallcookies:function(){let e=document.cookie.split(";"),t={},o=e.length;for(let i=0;i<o;i++){let o=e[i].split("=");t[(o[0]+"").trim()]=unescape(o[1])}return t},erase:function(e,t){t?this.set(e,"",-10,t):this.set(e,"",-10)}},o={bar_config:{},show_config:{},allowed_categories:[],set:function(e){if("function"!=typeof JSON.parse)return void console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it");this.settings=JSON.parse(e.settings),EXP_CK_NAME=this.settings.cookie_expiry,this.bar_elm=jQuery(this.settings.notify_div_id),this.show_again_elm=jQuery(this.settings.show_again_div_id),this.details_elm=this.bar_elm.find(".lwaio_messagebar_detail"),this.main_button=jQuery("#cookie_action_accept"),this.main_link=jQuery("#cookie_action_link"),this.reject_button=jQuery("#cookie_action_reject"),this.settings_button=jQuery("#cookie_action_settings"),this.save_button=jQuery("#cookie_action_save"),this.confirm_button=jQuery("#cookie_action_confirm"),this.cancel_button=jQuery("#cookie_action_cancel"),this.accept_all_button=jQuery("#cookie_action_accept_all"),this.configBar(),this.toggleBar(),this.attachEvents(),this.configButtons(),this.settings.auto_scroll&&window.addEventListener("scroll",o.acceptOnScroll,!1);let i=JSON.parse(t.read(USR_PREFS_CK_NAME)),s=t.read(ACTED_CONSENT_CK_NAME),n="";n=new CustomEvent("LwAioCookieConsentOnLoad",{detail:{lwaio_consent_preferences:i,lwaio_consent_acted:s}}),window.dispatchEvent(n)},attachEvents:function(){jQuery(".lwaio_action_button").click(function(e){e.preventDefault();let i="",s="",n="",a="",c=jQuery(this).attr("data-lwaio_action");if("accept_all"==c)o.enableAllCookies(),o.accept_all_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAcceptAll",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("accept"==c)o.accept_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("reject"==c){o.reject_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),a=t.read(ACTED_CONSENT_CK_NAME),t.erase(USR_PREFS_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnReject",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i);let e=t.getallcookies();"object"==typeof e&&null!==e&&jQuery.each(e,function(e,o){e!=ACTED_CONSENT_CK_NAME&&t.erase(e,"."+window.location.host)}),o.logConsent(c)}else"settings"==c?(o.bar_elm.slideUp(o.settings.animate_speed_hide),o.show_again_elm.slideUp(o.settings.animate_speed_hide)):"close"==c?o.displayHeader():"show_settings"==c?o.show_details():"hide_settings"==c?o.hide_details():"close_banner"==c&&(o.hideHeader(),o.accept_close(),"yes"!=(a=t.read(ACTED_CONSENT_CK_NAME))&&(s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i)))}),jQuery(".group-switch-buttons input").each(function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),"necessary"==e||jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio-consent-show-again",function(t){t.preventDefault(),jQuery(o.settings.notify_div_id).find("p.lwaio").show(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").show(),o.displayHeader(),e(this).hide()}),jQuery(document).on("click",".group-switch-buttons input",function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio_consent_tabs_overview",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_about").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_about").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_about").hide(),jQuery("#lwaio_consent_overview").show()}),jQuery(document).on("click","#lwaio_consent_tabs_about",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_overview").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_overview").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_overview").hide(),jQuery("#lwaio_consent_about").show()}),jQuery(document).on("click","#lwaio_consent_overview_cookie_container_types a",function(e){e.preventDefault();let t=jQuery(this),i=t.parent();i.find("a").removeClass("lwaio_consent_overview_cookie_container_type_selected"),i.find("a").css("border-right-color",o.settings.border_color),i.find("a").css("background-color",o.settings.background_color),t.addClass("lwaio_consent_overview_cookie_container_type_selected"),t.css("border-right-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color);let s=jQuery(this).attr("data-target"),n=i.siblings("#lwaio_consent_overview_cookie_container_type_details");n.find(".lwaio_consent_cookie_type_details").hide(),n.find("#"+s).show()})},configButtons:function(){this.settings_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.main_button.css("color",this.settings.button_link_color),this.main_button.css("background-color",this.settings.primary_color),this.accept_all_button.css("color",this.settings.button_link_color),this.accept_all_button.css("background-color",this.settings.primary_color),this.confirm_button.css("color",this.settings.button_link_color),this.confirm_button.css("background-color",this.settings.primary_color),this.main_link.css("color",this.settings.secondary_color),this.reject_button.css("display","inline-block"),this.reject_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.cancel_button.css("color",this.settings.button_link_color),this.cancel_button.css("display","inline-block"),this.cancel_button.css("background-color",this.settings.secondary_color),this.save_button.css("color",this.settings.button_link_color),this.save_button.css("background-color",this.settings.primary_color),this.details_elm.find("table.lwaio_consent_cookie_type_table tr").css("border-color",o.settings.border_color),this.details_elm.find(".lwaio_consent_cookie_type_intro").css("border-color",o.settings.border_color),this.details_elm.find("a").each(function(){jQuery(this).css("border-color",o.settings.border_color),jQuery(this).css("background-color",o.settings.background_color)}),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("border-right-color",o.settings.border_active_color),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("background-color",o.settings.background_active_color),this.details_elm.find("#lwaio_consent").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("border-bottom-color",o.settings.border_active_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("background-color",o.settings.background_active_color)},configBar:function(){this.bar_config={"background-color":this.settings.background,color:this.settings.text,"border-top":"1px solid "+this.settings.secondary_color},this.show_config={width:"auto","background-color":this.settings.background,color:this.settings.text,position:"fixed",opacity:this.settings.opacity,bottom:"0","border-top":"1px solid "+this.settings.secondary_color},"right"==this.settings.show_again_position?this.show_config.right=this.settings.show_again_margin+"%":this.show_config.left=this.settings.show_again_margin+"%",this.bar_config.position="fixed",this.bar_config.opacity=this.settings.opacity,this.bar_elm.find(".lwaio_messagebar_content").css("max-width","800px"),"bottom"==this.settings.banner_position?this.bar_config.bottom="0":this.bar_config.top="0",this.bar_elm.css(this.bar_config).hide(),this.show_again_elm.css(this.show_config).hide()},toggleBar:function(){t.exists(ACTED_CONSENT_CK_NAME)?this.hideHeader():(this.displayHeader(),this.settings.auto_hide&&setTimeout(function(){o.accept_close()},this.settings.auto_hide_delay))},accept_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},accept_all_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},reject_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),o.disableAllCookies(),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.decline_reload&&window.location.reload(!0),!1},logConsent:function(e){this.settings.logging_on&&jQuery.ajax({url:log_obj.ajax_url,type:"POST",data:{action:"lwaio_log_consent_action",lwaio_user_action:e,cookie_list:t.getallcookies()},success:function(e){}})},disableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="no",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!1);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},enableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="yes",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!0);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},show_details:function(){this.details_elm.show(),this.bar_elm.css("opacity",1),this.details_elm.css("border-top-color",o.settings.border_color),this.settings_button.attr("data-lwaio_action","hide_settings")},hide_details:function(){this.details_elm.hide(),this.bar_elm.css("opacity",o.settings.opacity),this.settings_button.attr("data-lwaio_action","show_settings")},displayHeader:function(e,t){this.bar_elm.show(),e&&(jQuery(o.settings.notify_div_id).find("p.lwaio").hide(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").hide()),this.show_again_elm.slideUp(this.settings.animate_speed_hide)},hideHeader:function(e){this.bar_elm.slideUp(this.settings.animate_speed_hide),e||this.show_again_elm.slideDown(this.settings.animate_speed_hide)},acceptOnScroll:function(){let i=e(window).scrollTop()/(e(document).height()-e(window).height());Math.round(100*i)>o.settings.auto_scroll_offset&&!t.exists(ACTED_CONSENT_CK_NAME)&&(o.accept_close(),window.removeEventListener("scroll",o.acceptOnScroll,!1),1==o.settings.auto_scroll_reload&&window.location.reload())}},i={blockingStatus:!0,scriptsLoaded:!1,set:function(e){"function"==typeof JSON.parse?this.cookies=JSON.parse(e.cookies):console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it")},removeCookieByCategory:function(){if(1==i.blockingStatus)for(let e in i.cookies){let s=i.cookies[e],n=s.lwaio_category_slug;if(-1===o.allowed_categories.indexOf(n)){let e=s.data;if(e&&0!=e.length)for(let o in e){let i=e[o];t.erase(i.name)}}}},runScripts:function(){let e=["iframe","IFRAME","EMBED","embed","OBJECT","object","IMG","img"],s=function(e){n.renderScripts(),a.renderSrcElement(),e(),i.scriptsLoaded=!0},n={scriptsDone:function(){let e=document.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),window.document.dispatchEvent(e)},seq:function(e,t,o){void 0===o&&(o=0),e[o](function(){++o===e.length?t():n.seq(e,t,o)})},insertScript:function(e,s){let n=["data-wpl-class","data-wpl-label","data-wpl-placeholder","data-wpl-script-type","data-wpl-src"],a=e.getAttribute("data-wpl-script-type"),c=e.getAttribute("data-wpl-element-position"),r=e.getAttribute("data-wpl-block"),l=document.createElement("script");l.type="text/plain",e.async&&(l.async=e.async),e.defer&&(l.defer=e.defer),e.src?(l.onload=s,l.onerror=s,l.src=e.src):l.textContent=e.innerText;let _=jQuery(e).prop("attributes"),d=_.length;for(let e=0;e<d;++e)"id"!==_[e].nodeName&&-1!==n.indexOf(_[e].nodeName)&&l.setAttribute(_[e].nodeName,_[e].value);!0===i.blockingStatus?("yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(a)||null==t.read(ACTED_CONSENT_CK_NAME)&&"false"===r)&&(l.setAttribute("data-wpl-consent","accepted"),l.type="text/javascript"):l.type="text/javascript",e.type!=l.type&&("head"===c?(document.head.appendChild(l),e.src||s(),e.parentNode.removeChild(e)):(document.body.appendChild(l),e.src||s(),e.parentNode.removeChild(e)))},renderScripts:function(){let e=document.querySelectorAll('script[data-wpl-class="wpl-blocker-script"]');if(e.length>0){let t,o=[];Array.prototype.forEach.call(e,function(e){t=e.getAttribute("type");e.tagName;o.push(function(t){n.insertScript(e,t)})}),n.seq(o,n.scriptsDone)}}},a={renderSrcElement:function(){let s=document.querySelectorAll('[data-wpl-class="wpl-blocker-script"]'),n=s.length;for(let a=0;a<n;a++){let n=s[a],c=n.tagName;if(-1!==e.indexOf(c)){let e=n.getAttribute("data-wpl-script-type"),s=n.getAttribute("data-wpl-block");!0===i.blockingStatus?"yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(e)||null!=t.read(ACTED_CONSENT_CK_NAME)&&"false"===s?this.replaceSrc(n):this.addPlaceholder(n):this.replaceSrc(n)}}},addPlaceholder:function(e){if(0===jQuery(e).prev(".wpl-iframe-placeholder").length){let t=e.getAttribute("data-wpl-placeholder"),o=e.getAttribute("width"),i=e.getAttribute("height");null==o&&(o=e.offsetWidth),null==i&&(i=e.offsetHeight);let s=/px/,n='<div style="width:'+(o=s.test(o)?o:o+"px")+"; height:"+(i=s.test(i)?i:i+"px")+';" class="wpl-iframe-placeholder"><div class="wpl-inner-text">'+t+"</div></div>";"IMG"!==e.tagName&&jQuery(n).insertBefore(e),e.removeAttribute("src"),e.style.display="none"}},replaceSrc:function(e){if(!e.hasAttribute("src")){let t=e.getAttribute("data-wpl-src");e.setAttribute("src",t),jQuery(e).prev(".wpl-iframe-placeholder").length>0&&jQuery(e).prev(".wpl-iframe-placeholder").remove(),e.style.display="block"}}};(function(){jQuery(document).on("click",".wpl_manage_current_consent",function(){o.displayHeader()})})(),s(i.removeCookieByCategory)}};e(document).ready(function(){"undefined"!=typeof lwaiobar_settings&&o.set({settings:lwaiobar_settings}),"undefined"!=typeof lwaios_list&&(i.set({cookies:lwaios_list}),i.runScripts())}),e(document).ready(function(){e(".lwaio-column").click(function(){e(".lwaio-column",this),e(this).children(".lwaio-columns").hasClass("active-group")||(e(".lwaio-columns").removeClass("active-group"),e(this).children(".lwaio-columns").addClass("active-group")),e(this).siblings(".description-container").hasClass("hide")&&(e(".description-container").addClass("hide"),e(this).siblings(".description-container").removeClass("hide"))})})}(jQuery);
(function ($){
"use strict";
$(document).ready(function (){
$('body').on('click', '.rhea_pagination_wrapper a', function (e){
e.preventDefault();
var thisParent=$(this).parents('.rhea_ele_property_ajax_target');
var id=$(thisParent).attr('id');
var thisLoader=$(thisParent).find('.rhea_svg_loader');
var thisInner=$(thisParent).find('.home-properties-section-inner-target');
var pageNav=$(thisParent).find('.rhea_pagination_wrapper a');
var thisLink=$(this);
if(!(thisLink).hasClass('current')){
var link=$(this).attr('href');
thisInner.fadeTo('slow', 0.5);
thisLoader.slideDown('fast');
thisParent.load(link + ' #' + id + ' .home-properties-section-inner-target', function (response, status, xhr){
if(status=='success'){
thisInner.fadeTo('fast', 1);
pageNav.removeClass('current');
thisLink.addClass('current');
thisLoader.slideUp('fast');
if(typeof EREloadNewsSlider!='undefined'&&$.isFunction(EREloadNewsSlider)){
EREloadNewsSlider();
}
if(typeof setVideoHeightElementor!='undefined'&&$.isFunction(setVideoHeightElementor)){
setVideoHeightElementor();
}
$('html, body').animate({
scrollTop: $('#' + id).offset().top - 32
}, 1000);
}else{
thisInner.fadeTo('fast', 1);
thisLoader.slideUp('fast');
}});
}});
});
window.rheaSelectPicker=function (id){
if($().selectpicker){
$(id).selectpicker({
iconBase: 'fas',
dropupAuto: 'true',
tickIcon: 'fa-check',
selectAllText: '<span class="rhea_select_bs_buttons rhea_bs_select"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><polygon points="22.1 9 20.4 7.3 14.1 13.9 15.8 15.6 "/><polygon points="27.3 7.3 16 19.3 9.6 12.8 7.9 14.5 16 22.7 29 9 "/><polygon points="1 14.5 9.2 22.7 10.9 21 2.7 12.8 "/></svg></span>',
deselectAllText: '<span class="rhea_select_bs_buttons rhea_bs_deselect"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><style type="text/css">  \n' +
'\t.rh-st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;}\n' +
'</style><path class="rhea_des rh-st0" d="M3.4 10.5H20c3.8 0 7 3.1 7 7v0c0 3.8-3.1 7-7 7h-6"/><polyline class="rhea_des rh-st0" points="8.4 15.5 3.4 10.5 8.4 5.5 "/></svg></span>',
});
}};
window.rheaSearchFields=function (id, fieldCount, topFields, collapsedFields){
var divList=$(id).find('.rhea_prop_search__option');
divList.sort(function (a, b){
return $(a).data("key-position") - $(b).data("key-position")
});
$(topFields).html(divList).promise().done(function (){
var getDataTopBar=fieldCount;
var advanceSearch=$(topFields).find('.rhea_prop_search__option');
var prePendTo=$(collapsedFields);
var j=0;
var i=0;
advanceSearch.each(function (){
if(i < getDataTopBar){
if($(this).hasClass('hide-fields')){
j=2;
}}
i++;
});
var advanceElements=getDataTopBar + j + 1;
if(advanceElements > 0){
var advanceFieldsSmart=$(topFields).find('.rhea_prop_search__option:nth-of-type(n+' + advanceElements + ')');
advanceFieldsSmart.detach().prependTo(prePendTo);
}});
};
window.rheaPropertySlider=function (id, min, max, pos='before', separator=',', currency='$', min_searched='', max_searched=''){
function thousandSeparator(n){
if(typeof n==='number'){
n +='';
var x=n.split('.');
var x1=x[0];
var x2=x.length > 1 ? '.' + x[1]:'';
var rgx=/(\d+)(\d{3})/;
while (rgx.test(x1)){
x1=x1.replace(rgx, '$1' + separator + '$2');
}
return x1 + x2;
}else{
return n;
}}
var getPosition=pos;
var PosBefore='';
var PosAfter='';
if(getPosition==='before'){
PosBefore=currency;
}else{
PosAfter=currency;
}
var minVal=min;
var maxVal=max;
if(min_searched!==''){
minVal=min_searched
}
if(max_searched!==''){
maxVal=max_searched
}
$(id).slider({
range: true,
min: min,
max: max,
step: 100,
values: [minVal, maxVal],
slide: function (event, ui){
for (var i=0; i < ui.values.length; ++i){
$("input.rhea_slider_value[data-index=" + i + "]").val(ui.values[i]);
$("span.rhea_price_display[data-index=" + i + "]").text(PosBefore + thousandSeparator(ui.values[i]) + PosAfter);
}},
});
};
window.rheaSearchAdvanceState=function (buttonID, wrapperID){
$(buttonID).on('click', function (){
$(buttonID).toggleClass('rhea_advance_open');
if($(buttonID).hasClass('rhea_advance_open')){
$(wrapperID).slideDown('normal');
}else{
$(wrapperID).slideUp('normal');
}});
};
window.rheaFeaturesState=function (buttonID, wrapperID){
$(buttonID).on('click', function (){
$(buttonID).toggleClass('rhea_features_open');
if($(buttonID).hasClass('rhea_features_open')){
$(wrapperID).slideDown('normal');
}else{
$(wrapperID).slideUp('normal');
}});
};
window.rheaSearchStatusChange=function (priceOther, PriceRent, statusID,){
if(typeof localizedSearchParams.rent_slug!=="undefined"){
var rhea_property_status_changed=function (new_status){
var price_for_others=$(priceOther);
var price_for_rent=$(PriceRent);
if(price_for_others.length > 0&&price_for_rent.length > 0){
if(new_status==localizedSearchParams.rent_slug){
price_for_others.addClass('hide-fields').find('select');
price_for_rent.removeClass('hide-fields').find('select');
}else{
price_for_rent.addClass('hide-fields').find('select');
price_for_others.removeClass('hide-fields').find('select');
}}
};
$(statusID).change(function (e){
var selected_status=$(this).val();
rhea_property_status_changed(selected_status);
});
var selected_status=$(statusID).val();
if(selected_status==localizedSearchParams.rent_slug){
rhea_property_status_changed(selected_status);
}}
};
window.minMaxPriceValidation=function (minID, maxID){
$(minID).add(maxID).on('changed.bs.select', function (){
var min_text_val=$(minID).val();
var min_int_val=(isNaN(min_text_val)) ? 0:parseInt(min_text_val);
var max_text_val=$(maxID).val();
var max_int_val=(isNaN(max_text_val)) ? 0:parseInt(max_text_val);
if((min_int_val >=max_int_val)&&(min_int_val!=0)&&(max_int_val!=0)){
$(minID).add(maxID).siblings('.dropdown-toggle').addClass('rhea-error');
}else{
$(minID).add(maxID).siblings('.dropdown-toggle').removeClass('rhea-error');
}});
};
window.minMaxRentPriceValidation=function (minID, maxID){
$(minID).add(maxID).on('changed.bs.select', function (){
var min_text_val=$(minID).val();
var min_int_val=(isNaN(min_text_val)) ? 0:parseInt(min_text_val);
var max_text_val=$(maxID).val();
var max_int_val=(isNaN(max_text_val)) ? 0:parseInt(max_text_val);
if((min_int_val >=max_int_val)&&(min_int_val!=0)&&(max_int_val!=0)){
$(minID).add(maxID).siblings('.dropdown-toggle').addClass('rhea-error');
}else{
$(minID).add(maxID).siblings('.dropdown-toggle').removeClass('rhea-error');
}});
};
window.minMaxAreaValidation=function (minID, maxID){
$(minID).add(maxID).on('change', function (obj, e){
var min_text_val=$(minID).val();
var min_int_val=(isNaN(min_text_val)) ? 0:parseInt(min_text_val);
var max_text_val=$(maxID).val();
var max_int_val=(isNaN(max_text_val)) ? 0:parseInt(max_text_val);
if((min_int_val >=max_int_val)&&(min_int_val!=0)&&(max_int_val!=0)){
$(minID).add(maxID).addClass('rhea-error');
}else{
$(minID).add(maxID).removeClass('rhea-error');
}});
};
window.rheaLoadOSMap=function (id, settingObj){
var ThisMapID=id;
if(typeof settingObj!=="undefined"){
if(0 < settingObj.length){
var tileLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
var mapBounds=[];
for (var i=0; i < settingObj.length; i++){
if(settingObj[i].lat&&settingObj[i].lng){
mapBounds.push([settingObj[i].lat, settingObj[i].lng]);
}}
var mapCenter=L.latLng(27.664827, -81.515755);
if(1==mapBounds.length){
mapCenter=L.latLng(mapBounds[0]);
}
var mapDragging=(L.Browser.mobile) ? false:true;
var mapOptions={
dragging: mapDragging,
center: mapCenter,
zoom: 13,
zoomControl: false,
tap: false
};
var propertiesMap=L.map(ThisMapID, mapOptions);
L.control.zoom({
position: 'bottomleft'
}).addTo(propertiesMap);
propertiesMap.scrollWheelZoom.disable();
if(1 < mapBounds.length){
propertiesMap.fitBounds(mapBounds);
}
propertiesMap.addLayer(tileLayer);
for (var i=0; i < settingObj.length; i++){
if(settingObj[i].lat&&settingObj[i].lng){
var propertyMapData=settingObj[i];
var markerLatLng=L.latLng(propertyMapData.lat, propertyMapData.lng);
var markerOptions={
riseOnHover: true
};
if(propertyMapData.title){
markerOptions.title=propertyMapData.title;
}
if(propertyMapData.classes){
var mapClasses=propertyMapData.classes.join(' ');
}else{
mapClasses='';
}
if(propertyMapData.icon){
var iconOptions={
iconUrl: propertyMapData.icon,
iconSize: [42, 57],
iconAnchor: [20, 57],
popupAnchor: [1, -54],
className: mapClasses,
};
if(propertyMapData.retinaIcon){
iconOptions.iconRetinaUrl=propertyMapData.retinaIcon;
}
markerOptions.icon=L.icon(iconOptions);
}
var propertyMarker=L.marker(markerLatLng, markerOptions).addTo(propertiesMap);
var popupContentWrapper=document.createElement("div");
popupContentWrapper.className='osm-popup-content';
var popupContent="";
if(propertyMapData.thumb){
popupContent +='<a class="osm-popup-thumb-link" href="' + propertyMapData.url + '"><img class="osm-popup-thumb" src="' + propertyMapData.thumb + '" alt="' + propertyMapData.title + '"/></a>';
}
if(propertyMapData.title){
popupContent +='<h5 class="osm-popup-title"><a class="osm-popup-link" href="' + propertyMapData.url + '">' + propertyMapData.title + '</a></h5>';
}
if(propertyMapData.price){
popupContent +='<p><span class="osm-popup-price">' + propertyMapData.price + '</span></p>';
}
popupContentWrapper.innerHTML=popupContent;
propertyMarker.bindPopup(popupContentWrapper);
}}
}else{
var fallbackLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
var fallbackMapOptions={
center: [27.664827, -81.515755],
zoom: 12
};
var fallbackMap=L.map(ThisMapID, fallbackMapOptions);
fallbackMap.addLayer(fallbackLayer);
}}
};
window.rheaLoadGoogleMap=function (id, propertiesMapData, propertiesMapOptions, mapStuff){
var ThisMapID=id;
if(typeof propertiesMapData!=="undefined"){
if(0 < propertiesMapData.length){
var fullScreenControl=true;
var fullScreenControlPosition=google.maps.ControlPosition.TOP_LEFT;
var mapTypeControl=true;
var mapTypeControlPosition=google.maps.ControlPosition.LEFT_BOTTOM;
if(mapStuff.modernHome){
mapTypeControl=false;
fullScreenControlPosition=google.maps.ControlPosition.LEFT_BOTTOM;
}
var mapOptions={
zoom: 12,
maxZoom: 16,
fullscreenControl: fullScreenControl,
fullscreenControlOptions: {
position: fullScreenControlPosition
},
mapTypeControl: mapTypeControl,
mapTypeControlOptions: {
position: mapTypeControlPosition
},
scrollwheel: false, styles: [{
"featureType": "landscape", "stylers": [{
"hue": "#FFBB00"
}, {
"saturation": 43.400000000000006
}, {
"lightness": 37.599999999999994
}, {
"gamma": 1
}]
}, {
"featureType": "road.highway", "stylers": [{
"hue": "#FFC200"
}, {
"saturation": -61.8
}, {
"lightness": 45.599999999999994
}, {
"gamma": 1
}]
}, {
"featureType": "road.arterial", "stylers": [{
"hue": "#FF0300"
}, {
"saturation": -100
}, {
"lightness": 51.19999999999999
}, {
"gamma": 1
}]
}, {
"featureType": "road.local", "stylers": [{
"hue": "#FF0300"
}, {
"saturation": -100
}, {
"lightness": 52
}, {
"gamma": 1
}]
}, {
"featureType": "water", "stylers": [{
"hue": "#0078FF"
}, {
"saturation": -13.200000000000003
}, {
"lightness": 2.4000000000000057
}, {
"gamma": 1
}]
}, {
"featureType": "poi", "stylers": [{
"hue": "#00FF6A"
}, {
"saturation": -1.0989010989011234
}, {
"lightness": 11.200000000000017
}, {
"gamma": 1
}]
}]
};
if(undefined!==propertiesMapOptions.styles){
mapOptions.styles=JSON.parse(propertiesMapOptions.styles);
}
switch (propertiesMapOptions.type){
case 'satellite':
mapOptions.mapTypeId=google.maps.MapTypeId.SATELLITE;
break;
case 'hybrid':
mapOptions.mapTypeId=google.maps.MapTypeId.HYBRID;
break;
case 'terrain':
mapOptions.mapTypeId=google.maps.MapTypeId.TERRAIN;
break;
default:
mapOptions.mapTypeId=google.maps.MapTypeId.ROADMAP;
}
var propertiesMap=new google.maps.Map(document.getElementById(ThisMapID), mapOptions);
var overlappingMarkerSpiderfier=new OverlappingMarkerSpiderfier(propertiesMap, {
markersWontMove: true,
markersWontHide: true,
keepSpiderfied: true,
circleSpiralSwitchover: Infinity,
nearbyDistance: 50
});
var mapBounds=new google.maps.LatLngBounds();
var openedWindows=[];
var closeOpenedWindows=function (){
while (0 < openedWindows.length){
var windowToClose=openedWindows.pop();
windowToClose.close();
}};
var attachInfoBoxToMarker=function (map, marker, infoBox){
google.maps.event.addListener(marker, 'click', function (){
closeOpenedWindows();
var scale=Math.pow(2, map.getZoom());
var offsety=((100 / scale)||0);
var projection=map.getProjection();
var markerPosition=marker.getPosition();
var markerScreenPosition=projection.fromLatLngToPoint(markerPosition);
var pointHalfScreenAbove=new google.maps.Point(markerScreenPosition.x, markerScreenPosition.y - offsety);
var aboveMarkerLatLng=projection.fromPointToLatLng(pointHalfScreenAbove);
map.setCenter(aboveMarkerLatLng);
infoBox.open(map, marker);
openedWindows.push(infoBox);
var infoBoxImage=infoBox.getContent().getElementsByClassName('prop-thumb');
if(infoBoxImage.length){
if(infoBoxImage[0].dataset.src){
infoBoxImage[0].src=infoBoxImage[0].dataset.src;
}}
});
};
var markers=[];
var map={
'&amp;': '&',
'&#038;': "&",
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#039;': "'",
'&#8217;': "’",
'&#8216;': "‘",
'&#8211;': "–",
'&#8212;': "—",
'&#8230;': "…",
'&#8221;': '”'
};
for (var i=0; i < propertiesMapData.length; i++){
if(propertiesMapData[i].lat&&propertiesMapData[i].lng){
var iconURL=propertiesMapData[i].icon;
var size=new google.maps.Size(42, 57);
if(window.devicePixelRatio > 1.5){
if(propertiesMapData[i].retinaIcon){
iconURL=propertiesMapData[i].retinaIcon;
size=new google.maps.Size(83, 113);
}}
var makerIcon={
url: iconURL,
size: size,
scaledSize: new google.maps.Size(42, 57),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(21, 56)
};
markers[i]=new google.maps.Marker({
position: new google.maps.LatLng(propertiesMapData[i].lat, propertiesMapData[i].lng),
map: propertiesMap,
icon: makerIcon,
title: propertiesMapData[i].title.replace(/\&[\w\d\#]{2,5}\;/g, function (m){
return map[m];
}),
animation: google.maps.Animation.DROP,
visible: true
});
mapBounds.extend(markers[i].getPosition());
var boxText=document.createElement("div");
boxText.className='rhea-map-info-window';
var innerHTML="";
var infoBoxPlaceholderURL="";
if((typeof mapStuff!=="undefined")&&mapStuff.infoBoxPlaceholder){
infoBoxPlaceholderURL=mapStuff.infoBoxPlaceholder;
}
if(propertiesMapData[i].thumb){
innerHTML +='<a class="thumb-link" href="' + propertiesMapData[i].url + '">' + '<img class="prop-thumb" src="' + infoBoxPlaceholderURL + '"  data-src="' + propertiesMapData[i].thumb + '" alt="' + propertiesMapData[i].title + '"/>' + '</a>';
}else{
innerHTML +='<a class="thumb-link" href="' + propertiesMapData[i].url + '">' + '<img class="prop-thumb" src="' + infoBoxPlaceholderURL + '" alt="' + propertiesMapData[i].title + '"/>' + '</a>';
}
innerHTML +='<h5 class="prop-title"><a class="title-link" href="' + propertiesMapData[i].url + '">' + propertiesMapData[i].title + '</a></h5>';
if(propertiesMapData[i].price){
innerHTML +='<p><span class="rhea-popup-price price">' + propertiesMapData[i].price + '</span></p>';
}
innerHTML +='<div class="arrow-down"></div>';
boxText.innerHTML=innerHTML;
var closeIconURL="";
if((typeof mapStuff!=="undefined")&&mapStuff.closeIcon){
closeIconURL=mapStuff.closeIcon;
}
var infoWindowOptions={
content: boxText,
disableAutoPan: true,
maxWidth: 0,
alignBottom: true,
pixelOffset: new google.maps.Size(-122, -48),
zIndex: null,
closeBoxMargin: "0 0 -16px -16px",
closeBoxURL: closeIconURL,
infoBoxClearance: new google.maps.Size(1, 1),
isHidden: false,
pane: "floatPane",
enableEventPropagation: false
};
var currentInfoBox=new InfoBox(infoWindowOptions);
attachInfoBoxToMarker(propertiesMap, markers[i], currentInfoBox);
overlappingMarkerSpiderfier.addMarker(markers[i]);
}}
propertiesMap.fitBounds(mapBounds);
var clusterIconURL="";
if((typeof mapStuff!=="undefined")&&mapStuff.clusterIcon){
clusterIconURL=mapStuff.clusterIcon;
}
var markerClustererOptions={
ignoreHidden: true, maxZoom: 14, styles: [{
textColor: '#ffffff',
url: clusterIconURL,
height: 48,
width: 48
}]
};
var markerClusterer=new MarkerClusterer(propertiesMap, markers, markerClustererOptions);
}else{
var fallBackLocation=new google.maps.LatLng(27.664827, -81.515755);
var fallBackOptions={
center: fallBackLocation,
zoom: 10,
maxZoom: 16,
scrollwheel: false
};
if(undefined!==propertiesMapOptions.styles){
fallBackOptions.styles=JSON.parse(propertiesMapOptions.styles);
}
var fallBackMap=new google.maps.Map(document.getElementById(ThisMapID), fallBackOptions);
}}
};
window.rheaLoadMapBoxMap=function (id, settingObj){
let ThisMapID=id,
mapBoxContainer=document.getElementById(id);
mapBoxContainer.className=mapBoxContainer.className + ' mapbox-dl-map-wrap rhea-mapbox-wrap';
if(typeof settingObj!=="undefined"){
if(0 < settingObj.properties.length&&typeof settingObj.settings.api_key!=='undefined'){
const eleMapBoxAPI=settingObj.settings.api_key,
mapBoxPropertiesData=settingObj.properties,
widgetSettings=settingObj.settings,
mapBoxStyle=widgetSettings.style,
mapBoxMarkerType='pin'; //widgetSettings.marker_type;
let tileLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
let mapBounds=[];
for (let i=0; i < mapBoxPropertiesData.length; i++){
if(mapBoxPropertiesData[i].lat&&mapBoxPropertiesData[i].lng){
mapBounds.push([mapBoxPropertiesData[i].lat, mapBoxPropertiesData[i].lng]);
}}
let mapBoxCenter=L.latLng(27.664827, -81.515755);
if(1===mapBounds.length){
mapBoxCenter=L.latLng(mapBounds[0]);
}
L.mapbox.accessToken=eleMapBoxAPI;
const mapBoxProperties=L.mapbox.map(mapBoxContainer)
.setView(mapBoxCenter, 12)
.addLayer(L.mapbox.styleLayer(mapBoxStyle));
if(1 < mapBounds.length){
mapBoxProperties.fitBounds(mapBounds);
}
let markers=new L.MarkerClusterGroup();
for (let i=0; i < mapBoxPropertiesData.length; i++){
if(mapBoxPropertiesData[i].lat&&mapBoxPropertiesData[i].lng){
let propertyMapData=mapBoxPropertiesData[i],
markerLatLng=L.latLng(propertyMapData.lat, propertyMapData.lng),
propertyMarker,
markerOptions={
id: propertyMapData.id,
riseOnHover: true
};
if(propertyMapData.title){
markerOptions.title=propertyMapData.title;
}
if('pin'===mapBoxMarkerType){
let iconOptions={
iconUrl: propertyMapData.icon,
iconSize: [42, 57],
iconAnchor: [20, 57],
popupAnchor: [1, -54]
};
if(propertyMapData.retinaIcon){
iconOptions.iconRetinaUrl=propertyMapData.retinaIcon;
}
markerOptions.icon=L.icon(iconOptions);
propertyMarker=L.marker(markerLatLng, markerOptions);
}else{
propertyMarker=new L.CircleMarker(markerLatLng, {
fillColor: '#1cb2ff', //widgetSettings.marker_color,
color: '#1cb2ff', //widgetSettings.marker_color,
weight: 2,
fillOpacity: 0.6,
opacity: 0.6,
radius: 25
}).addTo(mapBoxProperties);
}
let popupContentWrapper=document.createElement("div");
popupContentWrapper.className='mapboxgl-popup-content';
let popupContent="";
if(propertyMapData.thumb){
popupContent +='<a class="mapbox-popup-thumb-link" href="' + propertyMapData.url + '"><img class="mapbox-popup-thumb" src="' + propertyMapData.thumb + '" alt="' + propertyMapData.title + '"/></a>';
}
if(propertyMapData.title){
popupContent +='<h5 class="mapbox-popup-title"><a class="mapbox-popup-link" href="' + propertyMapData.url + '">' + propertyMapData.title + '</a></h5>';
}
if(propertyMapData.price){
popupContent +='<p><span class="mapbox-popup-price">' + propertyMapData.price + '</span></p>';
}
popupContentWrapper.innerHTML=popupContent;
propertyMarker.popupContents=popupContentWrapper;
propertyMarker.id=propertyMapData.id;
propertyMarker.className='mapboxgl-wrapper';
propertyMarker.bindPopup(popupContentWrapper);
markers.addLayer(propertyMarker);
}}
mapBoxProperties.addLayer(markers);
mapBoxProperties.scrollWheelZoom.disable();
mapBoxProperties.on('popupopen', function (e){
var px=mapBoxProperties.project(e.target._popup._latlng);
px.y -=e.target._popup._container.clientHeight / 2;
mapBoxProperties.panTo(mapBoxProperties.unproject(px), {animate: true});
});
function is_marker_in_cluster(marker, cluster){
let length=cluster.length;
for (let i=0; i < length; i++){
if(cluster[i].id==marker){
return true;
}}
return false;
}
function mapbox_open_popup(markerid){
mapBoxProperties.eachLayer(function (layer){
if(typeof layer._childCount!=="undefined"){
let markersincluster=layer.getAllChildMarkers();
if(is_marker_in_cluster(markerid, markersincluster)){
layer.spiderfy();
markersincluster.forEach(function (property_marker){
if(property_marker.id===parseInt(markerid)){
property_marker.openPopup();
}});
}}else{
if(layer.id===parseInt(markerid)){
layer.openPopup();
}}
});
}
function mapbox_close_popup(markerid){
mapBoxProperties.eachLayer(function (layer){
if(typeof layer._childCount!=="undefined"){
var markersincluster=layer.getAllChildMarkers();
if(is_marker_in_cluster(markerid, markersincluster)){
layer.unspiderfy();
markersincluster.forEach(function (property_marker){
if(property_marker.id==parseInt(markerid)){
layer.closePopup();
}});
}}else{
if(layer.id==parseInt(markerid)){
layer.closePopup();
mapBoxProperties.closePopup();
}}
});
}
let realhomesInfoboxPopupTrigger=function (){
$('.rh_popup_info_map').each(function (i){
let property_ID=$(this).attr('data-rh-id').replace(/[^\d.]/g, '');
$(this)
.on('mouseenter', function (){
mapbox_open_popup(property_ID);
})
.on('mouseleave', function (){
mapbox_close_popup(property_ID);
});
});
return false;
};
let RHisMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true:false;
if(!RHisMobile){
realhomesInfoboxPopupTrigger();
}}else{
var fallbackLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
var fallbackMapOptions={
center: [27.664827, -81.515755],
zoom: 12
};
var fallbackMap=L.map(ThisMapID, fallbackMapOptions);
fallbackMap.addLayer(fallbackLayer);
}}
};
window.rheaLocationsHandler=function (hierarchicalLocations,
locationPlaceholders,
selectBoxesIDs,
slugsInQueryParams,
selectBoxesCount,
anyValue,
multiSelect){
(function (){
prepareSelectBoxes();
let parentLocations=[];
for (let selectIndex=0; selectIndex < selectBoxesCount; selectIndex++){
const currentSelect=$('#' + selectBoxesIDs[selectIndex]); 
const currentIsLast=(selectBoxesCount===(selectIndex + 1)); 
if(selectIndex===0){ 
parentLocations=addParentLocations(currentSelect, currentIsLast);
}else{ 
if(parentLocations.length > 0){
let currentLocations=[];
const previousSelect=$('#' + selectBoxesIDs[selectIndex - 1]);
if(previousSelect.val()===anyValue){
for (let i=0; i < parentLocations.length; i++){
let tempLocations=addChildrenLocations(currentSelect, parentLocations[i].children, '', currentIsLast);
if(tempLocations.length > 0){
currentLocations=$.merge(currentLocations, tempLocations);
}}
}else{
let previousLocation=searchLocation(previousSelect.val(), hierarchicalLocations);
if(previousLocation&&previousLocation.children.length > 0){
currentLocations=addChildrenLocations(currentSelect, previousLocation.children, '', currentIsLast);
}}
previousSelect.change(updateChildSelect);
parentLocations=currentLocations;
}}
if(parentLocations.length===0){
disableSelect(currentSelect);
break;
}else{
selectParamOption(currentSelect);
}}   
})(); 
function addParentLocations(targetSelect, addAllChildren){
let addedLocations=[];
let insertionCounter=0;
hierarchicalLocations.forEach(function (currentLocation, index, locationsArray){
targetSelect.append('<option value="' + currentLocation.slug + '">' + currentLocation.name + '</option>');
addedLocations[insertionCounter++]=currentLocation;
if(addAllChildren&&currentLocation.children.length){
addChildrenLocations(targetSelect, currentLocation.children, '- ', addAllChildren);
}});
return addedLocations;
}
function addChildrenLocations(targetSelect, childrenLocations, prefix, addAllChildren){
let addedChildrenLocations=[];
let insertionCounter=0;
childrenLocations.forEach(function (currentLocation, index, locationsArray){
targetSelect.append('<option value="' + currentLocation.slug + '">' + prefix + currentLocation.name + '</option>');
addedChildrenLocations[insertionCounter++]=currentLocation;
if(addAllChildren&&currentLocation.children.length){
let tempLocations=addChildrenLocations(targetSelect, currentLocation.children, prefix + '- ', addAllChildren);
if(tempLocations.length > 0){
addedChildrenLocations=$.merge(addedChildrenLocations, tempLocations);
}}
});
return addedChildrenLocations;
}
function searchLocation(slug, locations){
let targetLocation=false;
for (let index=0; index < locations.length; index++){
let currentLocation=locations[index];
if(currentLocation.slug===slug){
targetLocation=currentLocation;
break;
}
if(currentLocation.children.length > 0){
targetLocation=searchLocation(slug, currentLocation.children);
if(targetLocation){
break;
}}
}
return targetLocation;
}
function updateChildSelect(event){
let selectedSlug=$(this).val();
let currentSelectIndex=selectBoxesIDs.indexOf($(this).attr('id'));
if(selectedSlug===anyValue&&(currentSelectIndex > -1)&&(currentSelectIndex < (selectBoxesCount - 1))){
for (let s=currentSelectIndex; s < (selectBoxesCount - 1); s++){
let childSelectIsLast=(selectBoxesCount===(s + 2));
let childSelect=$('#' + selectBoxesIDs[s + 1]);
childSelect.empty();
addAnyOption(childSelect);
let anyChildLocations=[];
$('#' + selectBoxesIDs[s] + ' > option').each(function (){
if(this.value!==anyValue){
let relatedLocation=searchLocation(this.value, hierarchicalLocations);
if(relatedLocation&&relatedLocation.children.length > 0){
let tempChildrenLocations=addChildrenLocations(childSelect, relatedLocation.children, '', childSelectIsLast);
if(tempChildrenLocations.length > 0){
anyChildLocations=$.merge(anyChildLocations, tempChildrenLocations);
}}
}});
if(anyChildLocations.length > 0){
enableSelect(childSelect);
}else{
disableSelect(childSelect);
break;
}}   
}else{
let selectedParentLocation=searchLocation(selectedSlug, hierarchicalLocations);
if(selectedParentLocation){
let childLocations=[];
for (let childSelectIndex=currentSelectIndex + 1; childSelectIndex < selectBoxesCount; childSelectIndex++){
let childSelectIsLast=(selectBoxesCount===(childSelectIndex + 1));
let childSelect=$('#' + selectBoxesIDs[childSelectIndex]);
childSelect.empty();
if(childLocations.length===0){
if(selectedParentLocation.children.length > 0){
addAnyOption(childSelect);
let tempLocations=addChildrenLocations(childSelect, selectedParentLocation.children, '', childSelectIsLast);
if(tempLocations.length > 0){
childLocations=tempLocations;
}}
}else if(childLocations.length > 0){ 
let currentLocations=[];
for (let i=0; i < childLocations.length; i++){
let tempChildLocation=childLocations[i];
if(tempChildLocation.children.length > 0){
addAnyOption(childSelect);
let tempLocations=addChildrenLocations(childSelect, tempChildLocation.children, '', childSelectIsLast);
if(tempLocations.length > 0){
currentLocations=$.merge(currentLocations, tempLocations);
}}
}
childLocations=currentLocations;
}
if(childLocations.length > 0){
enableSelect(childSelect);
}else{
disableSelect(childSelect);
break;
}} 
}}
}
function addAnyOption(targetSelect){
if(targetSelect.has('option').length > 0){
return;
}
let targetSelectIndex=selectBoxesIDs.indexOf(targetSelect.attr('id'));
if(targetSelect.parents('.rhea_prop_search__select').hasClass('rhea_location_prop_search_' + targetSelectIndex)){
targetSelect.append('<option value="' + anyValue + '" selected="selected">' + locationPlaceholders[targetSelectIndex] + '</option>');
}}
function disableSelect(targetSelect){
let targetSelectID=targetSelect.attr('id');
targetSelect.empty();
targetSelect.closest('.option-bar').addClass('disabled');
if(targetSelect.is(':enabled')){
targetSelect.prop('disabled', true);
targetSelect.parents('.rhea_prop_search__select').addClass('rhea_disable_parent');
}
let targetSelectIndex=selectBoxesIDs.indexOf(targetSelectID);
let nextSelectBoxesCount=selectBoxesCount - (targetSelectIndex + 1);
if(nextSelectBoxesCount > 0){
let nextSelect=$('#' + selectBoxesIDs[targetSelectIndex + 1]);
disableSelect(nextSelect);
}}
function enableSelect(targetSelect){
let targetSelectID=targetSelect.attr('id');
if(targetSelect.is(':disabled')){
targetSelect.prop('disabled', false);
}
targetSelect.parents('.rhea_prop_search__select').map(function (){
if($(this).hasClass('rhea_disable_parent')){
$(this).removeClass('rhea_disable_parent');
}});
let optionWrapper=targetSelect.closest('.option-bar');
if(optionWrapper.hasClass('disabled')){
optionWrapper.removeClass('disabled');
}}
function selectParamOption(currentSelect){
if(Object.keys(slugsInQueryParams).length > 0){
let selectName=currentSelect.attr('name');
if(typeof selectName!=="undefined"){
selectName=selectName.replace(/[\[\]]+/g, ''); 
}
if(typeof slugsInQueryParams[selectName]!=='undefined'){
let tempValue=slugsInQueryParams[selectName];
if(Array.isArray(tempValue)){
for (let i=0; i < tempValue.length; i++){
currentSelect.find('option[value="' + tempValue[i] + '"]').prop('selected', true);
}}else{
currentSelect.find('option[value="' + tempValue + '"]').prop('selected', true);
}}
}}
function prepareSelectBoxes(){
for (let selectIndex=0; selectIndex < selectBoxesCount; selectIndex++){
let currentSelectId=selectBoxesIDs[selectIndex];
let currentSelect=$('#' + currentSelectId);
if((multiSelect!=='multiple') &&
(currentSelect.has('option').length===0) &&
(currentSelect.parents('.rhea_prop_search__select').hasClass('rhea_location_prop_search_' + selectIndex))){
addAnyOption(currentSelect);
}}
}};
var rheaLocationSuccessList=function (data, thisParent, refreshList=false){
if(true===refreshList){
thisParent.find('option').not(':selected, .none').remove().end();
}
var getSelected=$(thisParent).val();
jQuery.each(data, function (index, text){
if(getSelected){
if(getSelected.indexOf(text[0]) < 0){
thisParent.append($('<option value="' + text[0] + '">' + text[1] + '</option>')
);
}}else{
thisParent.append($('<option value="' + text[0] + '">' + text[1] + '</option>')
);
}});
thisParent.selectpicker('refresh');
$(parent).find('ul.dropdown-menu li:first-of-type a').focus();
$(parent).find('input').focus();
};
var rheaLoaderFadeIn=function (parent){
$(parent).find('.rhea-location-ajax-loader').fadeIn('fast');
};
var rheaLoaderFadeOut=function (parent){
$(parent).find('.rhea-location-ajax-loader').fadeOut('fast');
};
var rheaTriggerAjaxOnLoad=function (parent, thisParent, ajaxurl, hideEmpty, SortAlpha, fieldValue=''){
$.ajax({
url: ajaxurl,
dataType: 'json',
delay: 250,
data: {
action: 'rhea_get_location_options',
query: fieldValue,
hideemptyfields: hideEmpty,
sortplpha: SortAlpha,
},
beforeSend: rheaLoaderFadeIn(parent),
success: function (data){
rheaLoaderFadeOut(parent);
rheaLocationSuccessList(data, thisParent, true);
}});
};
var rheaTriggerAjaxOnScroll=function (parent, thisParent, farmControl, ajaxurl, hideEmpty, SortAlpha, fieldValue=''){
var paged=2;
farmControl.on('keyup', function (e){
paged=2;
fieldValue=$(this).val();
});
var targetInner=$(parent).find('div.inner');
targetInner.on('scroll', function (){
var thisInner=$(this);
var thisInnerHeight=thisInner.innerHeight();
var getScrollIndex=thisInner.scrollTop() + thisInnerHeight;
if(getScrollIndex >=$(this)[0].scrollHeight){
$.ajax({
url: ajaxurl,
dataType: 'json',
delay: 250,
data: {
action: 'rhea_get_location_options',
query: fieldValue,
page: paged,
hideemptyfields: hideEmpty,
sortplpha: SortAlpha,
},
beforeSend: rheaLoaderFadeIn(parent),
success: function (data){
rheaLoaderFadeOut(parent);
paged++;
rheaLocationSuccessList(data, thisParent, false);
if(!$.trim(data)){
$(parent).find('.rhea-location-ajax-loader').fadeTo("fast", 0);
}}
});
}});
};
window.rheaAjaxSelect=function (parent, id, ajaxurl, hideEmpty, SortAlpha){
var farmControl=$(parent).find('.form-control');
var thisParent=$(id);
rheaTriggerAjaxOnScroll(parent, thisParent, farmControl, ajaxurl, hideEmpty, SortAlpha);
rheaTriggerAjaxOnLoad(parent, thisParent, ajaxurl, hideEmpty, SortAlpha);
farmControl.on('keyup', function (e){
var fieldValue=$(this).val();
fieldValue=fieldValue.trim();
var wordcounts=jQuery.trim(fieldValue).length;
$(parent).find('.rhea-location-ajax-loader').fadeTo("fast", 1);
if(wordcounts > 0){
$.ajax({
url: ajaxurl,
dataType: 'json',
delay: 250,
data: {
action: 'rhea_get_location_options',
query: fieldValue,
hideemptyfields: hideEmpty,
sortplpha: SortAlpha,
},
beforeSend: rheaLoaderFadeIn(parent),
success: function (data){
rheaLoaderFadeOut(parent);
thisParent.find('option').not(':selected').remove().end();
if(fieldValue&&data){
rheaLocationSuccessList(data, thisParent);
}else{
thisParent.find('option').not(':selected').remove().end();
thisParent.selectpicker('refresh');
$(parent).find('ul.dropdown-menu li:first-of-type a').focus();
$(parent).find('input').focus();
}},
});
}else{
rheaTriggerAjaxOnLoad(parent, thisParent, ajaxurl, hideEmpty, SortAlpha)
}});
};
window.rheaTestimonialsTwoCarousel=function (id, itemsFluid=4, items=3, itemsTab=2, itemsMob=1, gap=30, dots=true, rtl=false){
if($().owlCarousel){
$(id).owlCarousel({
loop: false,
dots: dots,
nav: false,
margin: gap,
rtl: rtl,
responsive: {
0: {
items: itemsMob
},
767: {
items: itemsTab
},
1024: {
items: items
},
1440: {
items: itemsFluid
}}
});
}};
window.rheaTestimonialsThreeCarousel=function (slide1, slide2, navSelectors, animationspeed='600', slideshowspeed='5000', slideShow1=true, direction1='horizontal', animation1='fade', reverse1=false, animation2='fade', reverse2=false){
if($().flexslider){
$(slide1).flexslider({
controlNav: false,
directionNav: false,
animationLoop: true,
slideshow: slideShow1,
direction: direction1,
animation: animation1,
reverse: reverse1,
animationSpeed: animationspeed,
slideshowSpeed: slideshowspeed,
});
$(slide2).flexslider({
controlNav: false,
animation: animation2,
animationLoop: true,
slideshow: slideShow1,
reverse: reverse2,
customDirectionNav: $(navSelectors),
sync: $(slide1),
animationSpeed: animationspeed,
slideshowSpeed: slideshowspeed,
});
}};
window.rheaTestimonialsFourCarousel=function (slider, navSelectors, animation='fade', animationSpeed='600', reverse=false, slideshow=false, slideshowSpeed='5000'){
if($().flexslider){
$(slider).flexslider({
controlNav: false,
directionNav: false,
animation: animation,
animationSpeed: animationSpeed,
reverse: reverse,
slideshow: slideshow,
slideshowSpeed: slideshowSpeed,
});
$(navSelectors).on('click', function (event){
$(slider).flexslider($(this).attr('href'));
event.preventDefault();
});
}};
window.rheaSubmitContactForm=function (formID, btnSelector){
if(jQuery().validate&&jQuery().ajaxSubmit){
var submitButton=$(btnSelector),
ajaxLoader=$(formID).find('.rhea-ajax-loader'),
messageContainer=$(formID).find('.rhea-message-container'),
errorContainer=$(formID).find(".rhea-error-container");
var formOptions={
beforeSubmit: function (){
submitButton.attr('disabled', 'disabled');
ajaxLoader.fadeIn('fast');
messageContainer.fadeOut('fast');
errorContainer.fadeOut('fast');
},
success: function (ajax_response, statusText, xhr, $form){
var response=$.parseJSON(ajax_response);
ajaxLoader.fadeOut('fast');
submitButton.removeAttr('disabled');
if(response.success){
$form.resetForm();
messageContainer.html(response.message).fadeIn('fast');
setTimeout(function (){
messageContainer.fadeOut('slow')
}, 5000);
if(typeof inspiryResetReCAPTCHA=='function'){
inspiryResetReCAPTCHA();
}
if(typeof CFOSData!=='undefined'){
setTimeout(function (){
window.location.replace(CFOSData.redirectPageUrl);
}, 1000);
}
if(typeof contactFromData!=='undefined'){
setTimeout(function (){
window.location.replace(contactFromData.redirectPageUrl);
}, 1000);
}}else{
errorContainer.html(response.message).fadeIn('fast');
}}
};
$(formID).validate({
errorLabelContainer: errorContainer,
submitHandler: function (form){
$(form).ajaxSubmit(formOptions);
}});
}};
function isInViewport(node){
var rect=node.getBoundingClientRect();
return (
(rect.height > 0||rect.width > 0) &&
rect.bottom >=0 &&
rect.right >=0 &&
rect.top <=(window.innerHeight||document.documentElement.clientHeight) &&
rect.left <=(window.innerWidth||document.documentElement.clientWidth)
)
}
function scrollParallax(selector){
var scrolled=jQuery(window).scrollTop();
jQuery(selector).each(function (index, element){
var initY=jQuery(this).offset().top;
var height=jQuery(this).height();
var endY=initY + jQuery(this).height();
var visible=isInViewport(this);
if(visible){
var diff=scrolled - initY;
var ratio=Math.round((diff / height) * 100);
jQuery(this).css('background-position', 'center ' + parseInt((ratio * 1)) + 'px')
}})
}
jQuery('.ere_cta_parallax').each(function (){
scrollParallax(this);
});
jQuery(window).scroll(function (){
jQuery('.ere_cta_parallax').each(function (){
scrollParallax(this);
});
});
window.rheaTestimonialsFiveCarousel=function (settings){
if($().owlCarousel){
let carouselOptions={
items: 1,
margin: 0,
nav: false,
autoHeight: true,
loop: settings.loop,
autoplay: settings.autoplay,
autoplayTimeout: settings.autoplaySpeed,
autoplayHoverPause: true,
smartSpeed: settings.animationSpeed,
dotsContainer: settings.dots,
rtl: $('body').hasClass('rtl'),
};
if('fade'===settings.slideAnimation){
carouselOptions.animateOut='fadeOut';
carouselOptions.animateIn='fadeIn';
}
$(settings.id).owlCarousel(carouselOptions);
}};
window.rheaImageCarousel=function (settings){
if($().slick){
$(settings.id).on('init', function (event, slick, direction){
$(event.currentTarget).show();
});
$(settings.id).slick({
fade: settings.fade,
speed: settings.speed,
infinite: settings.infinite,
autoplay: settings.autoplay,
autoplaySpeed: settings.autoplaySpeed,
pauseOnHover: settings.pauseOnHover,
pauseOnInteraction: settings.pauseOnInteraction,
slidesToShow: settings.slidesToShow,
slidesToScroll: settings.slidesToScroll,
rows: 1,
slidesPerRow: 1,
dots: true,
arrows: false,
vertical: false,
mobileFirst: true,
adaptiveHeight: false,
rtl: $('body').hasClass('rtl'),
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: settings.slidesToShow,
slidesToScroll: settings.slidesToScroll,
}},
{
breakpoint: 768,
settings: {
slidesToShow: settings.slidesToShowTablet,
slidesToScroll: settings.slidesToScrollTablet,
}},
{
breakpoint: 380,
settings: {
slidesToShow: settings.slidesToShowMobile,
slidesToScroll: settings.slidesToScrollMobile,
}},
{
breakpoint: 0,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}}
]
});
}};
window.rheaAccordion=function (id){
$('#' + id + ' > .rhea-accordion-title').on('click', function (event){
var $this=$(this);
if($this.hasClass('rhea-accordion-active')){
$this.next('.rhea-accordion-content').slideUp(500, function (){
$this.removeClass('rhea-accordion-active')
});
}else{
$this.siblings('.rhea-accordion-title').removeClass('rhea-accordion-active');
$this.addClass('rhea-accordion-active').next('.rhea-accordion-content').slideDown(500).siblings('.rhea-accordion-content').slideUp(500);
}});
};
window.rheaTabs=function (id){
const tabsContainer=$('#' + id);
const tabsList=tabsContainer.find('.rhea-tabs-list li');
const tabsContentWrapper=tabsContainer.find('.rhea-tabs-content-wrapper');
const tabsContent=tabsContainer.find('.rhea-tabs-content-wrapper .rhea-tabs-content');
if(tabsContent.length){
let minHeight=0;
let contentHeights=[];
tabsContent.each(function (index){
contentHeights.push($(this).outerHeight());
});
if(contentHeights){
minHeight=Math.max.apply(Math, contentHeights) + (tabsContentWrapper.outerHeight() - tabsContentWrapper.height());
tabsContainer.css('min-height', minHeight);
}}
tabsList.on('click', function (event){
const $this=$(this);
tabsList.removeClass('rhea-tabs-active');
$this.addClass('rhea-tabs-active');
tabsContent.hide().removeClass('rhea-tabs-active');
tabsContent.eq($this.index()).show().addClass('rhea-tabs-active');
});
};
window.rheaImageGallery=function (settings){
if(jQuery().isotope){
const container=$(settings.containerId),
filterLinks=$(settings.filters),
galleryOptions={
filter: "*",
animationEngine: 'best-available',
itemSelector: settings.itemSelector
};
if('grid'===settings.layout){
galleryOptions.layoutMode='fitRows';
}
const gallery=container.isotope(galleryOptions);
gallery.isotope('layout');
filterLinks.on('click', function (event){
filterLinks.removeClass('current');
$(this).addClass('current');
gallery.isotope({filter: '.' + $(this).attr('data-filter')});
event.preventDefault();
});
}};
window.rheaScheduleTourForm=function (id){
if(jQuery().validate&&jQuery().ajaxSubmit){
const formId=$(id),
submitButton=formId.find('.rhea-stf-submit'),
ajaxLoader=formId.find('.rhea-stf-ajax-loader'),
messageContainer=formId.find('.rhea-stf-message-container'),
errorContainer=formId.find(".rhea-stf-error-container");
const formOptions={
beforeSubmit: function (){
submitButton.attr('disabled', 'disabled');
ajaxLoader.fadeIn('fast');
messageContainer.fadeOut('fast');
errorContainer.fadeOut('fast');
},
success: function (ajax_response, statusText, xhr, $form){
var response=$.parseJSON(ajax_response);
ajaxLoader.fadeOut('fast');
submitButton.removeAttr('disabled');
if(response.success){
$form.resetForm();
messageContainer.html(response.message).fadeIn('fast');
setTimeout(function (){
messageContainer.fadeOut('slow')
}, 5000);
}else{
errorContainer.html(response.message).fadeIn('fast');
}}
};
$(id).validate({
errorLabelContainer: errorContainer,
submitHandler: function (form){
$(form).ajaxSubmit(formOptions);
}});
}};
if(jQuery().isotope){
$('.rhea_properties_cities_wrapper.masonry').isotope({
itemSelector: '.rhea_property_city',
masonry: {
horizontalOrder: true
}})
}})(jQuery);