'),"string"==typeof a&&i.css("background-image","url("+a+")"),this.$overlay=i,this.$elmt.prepend(i)),this.$elmt.addClass("vegas-container"),n||this.$elmt.append(s),setTimeout(function(){r.trigger("init"),r._goto(r.slide),r.settings.autoplay&&r.trigger("play")},1)},_preload:function(){var t,s;for(s=0;s
1&&!this.ended&&!this.paused&&!this.noshow&&(this.timeout=setTimeout(function(){t.next()},this._options("delay")))},_timer:function(t){var s=this;clearTimeout(this.timeout),this.$timer&&(this.$timer.removeClass("vegas-timer-running").find("div").css("transition-duration","0ms"),this.ended||this.paused||this.noshow||t&&setTimeout(function(){s.$timer.addClass("vegas-timer-running").find("div").css("transition-duration",s._options("delay")-100+"ms")},100))},_video:function(t){var s,e,n=t.toString();return i[n]?i[n]:(t instanceof Array==!1&&(t=[t]),s=document.createElement("video"),s.preload=!0,t.forEach(function(t){e=document.createElement("source"),e.src=t,s.appendChild(e)}),i[n]=s,s)},_fadeOutSound:function(t,s){var i=this,e=s/10,n=t.volume-.09;n>0?(t.volume=n,setTimeout(function(){i._fadeOutSound(t,s)},e)):t.pause()},_fadeInSound:function(t,s){var i=this,e=s/10,n=t.volume+.09;n<1&&(t.volume=n,setTimeout(function(){i._fadeInSound(t,s)},e))},_options:function(t,s){return void 0===s&&(s=this.slide),void 0!==this.settings.slides[s][t]?this.settings.slides[s][t]:this.settings[t]},_goto:function(s){function i(){f._timer(!0),setTimeout(function(){y&&(f.support.transition?(h.css("transition","all "+_+"ms").addClass("vegas-transition-"+y+"-out"),h.each(function(){var t=h.find("video").get(0);t&&(t.volume=1,f._fadeOutSound(t,_))}),e.css("transition","all "+_+"ms").addClass("vegas-transition-"+y+"-in")):e.fadeIn(_));for(var t=0;tg)&&(_=g),"auto"===b&&(b=g),e=t(''),this.support.transition&&y&&e.addClass("vegas-transition-"+y),this.support.video&&l?(a=l instanceof Array?this._video(l):this._video(l.src),a.loop=void 0===l.loop||l.loop,a.muted=void 0===l.mute||l.mute,a.muted===!1?(a.volume=0,this._fadeInSound(a,_)):a.pause(),o=t(a).addClass("vegas-video").css("background-color",m),this.support.objectFit?o.css("object-position",u+" "+c).css("object-fit",p).css("width","100%").css("height","100%"):"contain"===p&&o.css("width","100%").css("height","100%"),e.append(o)):(r=new Image,n=t('').css("background-image",'url("'+d+'")').css("background-color",m).css("background-position",u+" "+c),"repeat"===p?n.css("background-repeat","repeat"):n.css("background-size",p),this.support.transition&&w&&n.addClass("vegas-animation-"+w).css("animation-duration",b+"ms"),e.append(n)),this.support.transition||e.css("display","none"),v?h.eq(v-1).after(e):this.$elmt.prepend(e),h.css("transition","all 0ms").each(function(){this.className="vegas-slide","VIDEO"===this.tagName&&(this.className+=" vegas-video"),y&&(this.className+=" vegas-transition-"+y,this.className+=" vegas-transition-"+y+"-in")}),f._timer(!1),a?(4===a.readyState&&(a.currentTime=0),a.play(),i()):(r.src=d,r.complete?i():r.onload=i)},_end:function(){this.ended=!0,this._timer(!1),this.trigger("end")},shuffle:function(){for(var t,s,i=this.total-1;i>0;i--)s=Math.floor(Math.random()*(i+1)),t=this.settings.slides[i],this.settings.slides[i]=this.settings.slides[s],this.settings.slides[s]=t},play:function(){this.paused&&(this.paused=!1,this.next(),this.trigger("play"))},pause:function(){this._timer(!1),this.paused=!0,this.trigger("pause")},toggle:function(){this.paused?this.play():this.pause()},playing:function(){return!this.paused&&!this.noshow},current:function(t){return t?{slide:this.slide,data:this.settings.slides[this.slide]}:this.slide},jump:function(t){t<0||t>this.total-1||t===this.slide||(this.slide=t,this._goto(this.slide))},next:function(){if(this.slide++,this.slide>=this.total){if(!this.settings.loop)return this._end();this.slide=0}this._goto(this.slide)},previous:function(){if(this.slide--,this.slide<0){if(!this.settings.loop)return void this.slide++;this.slide=this.total-1}this._goto(this.slide)},trigger:function(t){var s=[];s="init"===t?[this.settings]:[this.slide,this.settings.slides[this.slide]],this.$elmt.trigger("vegas"+t,s),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,s)},options:function(i,e){var n=this.settings.slides.slice();if("object"==typeof i)this.settings=t.extend({},s,t.vegas.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.settings.slides!==n&&(this.total=this.settings.slides.length,this.noshow=this.total<2,this._preload())},destroy:function(){clearTimeout(this.timeout),this.$elmt.removeClass("vegas-container"),this.$elmt.find("> .vegas-slide").remove(),this.$elmt.find("> .vegas-wrapper").clone(!0).children().appendTo(this.$elmt),this.$elmt.find("> .vegas-wrapper").remove(),this.settings.timer&&this.$timer.remove(),this.settings.overlay&&this.$overlay.remove(),this.elmt._vegas=null}},t.fn.vegas=function(t){var s,i=arguments,n=!1;if(void 0===t||"object"==typeof t)return this.each(function(){this._vegas||(this._vegas=new e(this,t))});if("string"==typeof t){if(this.each(function(){var e=this._vegas;if(!e)throw new Error("No Vegas applied to this element.");"function"==typeof e[t]&&"_"!==t[0]?s=e[t].apply(e,[].slice.call(i,1)):n=!0}),n)throw new Error('No method "'+t+'" in Vegas.');return void 0!==s?s:this}},t.vegas={},t.vegas.defaults=s,t.vegas.isVideoCompatible=function(){return!/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent)}}(window.jQuery||window.Zepto);
//# sourceMappingURL=vegas.min.js.map;
// source --> https://roayahstudies.com/wp-content/plugins/easy-social-share-buttons3/assets/js/essb-core.js?ver=7.9
/**
* Easy Social Share Buttons for WordPress Core Javascript
*
* @package EasySocialShareButtons
* @author appscreo
* @since 5.0
*/
/**
* jQuery function extension package for Easy Social Share Buttons
*/
jQuery(document).ready(function($){
"use strict";
jQuery.fn.essb_toggle_more = function(){
return this.each(function(){
$(this).removeClass('essb_after_more');
$(this).addClass('essb_before_less');
});
};
jQuery.fn.essb_toggle_less = function(){
return this.each(function(){
$(this).addClass('essb_after_more');
$(this).removeClass('essb_before_less');
});
};
jQuery.fn.extend({
center: function () {
return this.each(function() {
var top = (jQuery(window).height() - jQuery(this).outerHeight()) / 2;
var left = (jQuery(window).width() - jQuery(this).outerWidth()) / 2;
jQuery(this).css({position:'fixed', margin:0, top: (top > 0 ? top : 0)+'px', left: (left > 0 ? left : 0)+'px'});
});
}
});
});
(function ($) {
$.fn.countTo = function (options) {
options = options || {};
return $(this).each(function () {
// set options for current element
var settings = $.extend({}, $.fn.countTo.defaults, {
from: $(this).data('from'),
to: $(this).data('to'),
speed: $(this).data('speed'),
refreshInterval: $(this).data('refresh-interval'),
decimals: $(this).data('decimals')
}, options);
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;
// references & variables that will change with each update
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data('countTo') || {};
$self.data('countTo', data);
// if an existing interval can be found, clear it first
if (data.interval) {
clearInterval(data.interval);
}
data.interval = setInterval(updateTimer, settings.refreshInterval);
// initialize the element with the starting value
render(value);
function updateTimer() {
value += increment;
loopCount++;
render(value);
if (typeof (settings.onUpdate) == 'function') {
settings.onUpdate.call(self, value);
}
if (loopCount >= loops) {
// remove the interval
$self.removeData('countTo');
clearInterval(data.interval);
value = settings.to;
if (typeof (settings.onComplete) == 'function') {
settings.onComplete.call(self, value);
}
}
}
function render(value) {
var formattedValue = settings.formatter.call(self, value, settings);
$self.text(formattedValue);
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 0, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
formatter: formatter, // handler for formatting the value before rendering
onUpdate: null, // callback method for every time the element is updated
onComplete: null // callback method for when the element finishes updating
};
function formatter(value, settings) {
return value.toFixed(settings.decimals);
}
}(jQuery));
( function( $ ) {
"use strict";
/**
* Easy Social Share Buttons for WordPress
*
* @package EasySocialShareButtons
* @since 5.0
* @author appscreo
*/
var essb = {};
var debounce = function( func, wait ) {
var timeout, args, context, timestamp;
return function() {
context = this;
args = [].slice.call( arguments, 0 );
timestamp = new Date();
var later = function() {
var last = ( new Date() ) - timestamp;
if ( last < wait ) {
timeout = setTimeout( later, wait - last );
} else {
timeout = null;
func.apply( context, args );
}
};
if ( ! timeout ) {
timeout = setTimeout( later, wait );
}
};
};
var isElementInViewport = function (el) {
//special bonus for those using jQuery
if (typeof jQuery === "function" && el instanceof jQuery) {
el = el[0];
}
var rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */
rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */
);
};
var isVisibleSelector = function(selector) {
var top_of_element = $(selector).offset().top;
var bottom_of_element = $(selector).offset().top + $(selector).outerHeight();
var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight();
var top_of_screen = $(window).scrollTop();
if ((bottom_of_screen > top_of_element) && (top_of_screen < bottom_of_element)){
return true;
} else {
return false;
}
};
essb.add_event = function(eventID, user_function) {
if (!essb.events) essb.events = {};
essb.events[eventID] = user_function;
};
essb.trigger = function(eventID, options) {
if (!essb.events) return;
if (essb.events[eventID]) essb.events[eventID](options);
};
essb.window = function (url, service, instance, trackingOnly) {
var element = $('.essb_'+instance),
instance_post_id = $(element).attr('data-essb-postid') || '',
instance_position = $(element).attr('data-essb-position') || '',
wnd,
isMobile = $(window).width() <= 1024 ? true : false,
keyWin = 'essb_share_window' + (isMobile) + '-' + (Date.now()).toString();
var w = (service == 'twitter') ? '500' : '800',
h = (service == 'twitter') ? '300' : '500',
left = (screen.width/2)-(Number(w)/2),
top = (screen.height/2)-(Number(h)/2);
if (!trackingOnly)
wnd = window.open( url, keyWin, "height="+(service == 'twitter' ? '500' : '500')+",width="+(service == 'twitter' ? '500' : '800')+",resizable=1,scrollbars=yes,top="+top+",left="+left );
if (typeof(essb_settings) != "undefined") {
if (essb_settings.essb3_stats) {
if (typeof(essb_handle_stats) != "undefined")
essb_handle_stats(service, instance_post_id, instance);
}
if (essb_settings.essb3_ga)
essb_ga_tracking(service, url, instance_position);
}
if (typeof(essb_settings) != 'undefined') {
if (typeof(essb_settings.stop_postcount) == 'undefined') essb_self_postcount(service, instance_post_id);
}
if (typeof(essb_abtesting_logger) != "undefined")
essb_abtesting_logger(service, instance_post_id, instance);
if (typeof(essb_conversion_tracking) != 'undefined')
essb_conversion_tracking(service, instance_post_id, instance);
if (!trackingOnly)
var pollTimer = window.setInterval(function() {
if (wnd.closed !== false) {
window.clearInterval(pollTimer);
essb_smart_onclose_events(service, instance_post_id);
if (instance_position == 'booster' && typeof(essb_booster_close_from_action) != 'undefined')
essb_booster_close_from_action();
}
}, 200);
};
essb.share_window = function(url, custom_position, service) {
var w = '800', h = '500', left = (screen.width/2)-(Number(w)/2), top = (screen.height/2)-(Number(h)/2);
wnd = window.open( url, "essb_share_window", "height="+'500'+",width="+'800'+",resizable=1,scrollbars=yes,top="+top+",left="+left );
if (typeof(essb_settings) != "undefined") {
if (essb_settings.essb3_stats) {
if (typeof(essb_log_stats_only) != "undefined")
essb_log_stats_only(service, essb_settings["post_id"] || '', custom_position);
}
if (essb_settings.essb3_ga)
essb_ga_tracking(service, url, custom_position);
}
};
essb.fbmessenger = function(app_id, url, saltKey) {
var isMobile = $(window).width() <= 1024 ? true : false,
cmd = '';
if (isMobile) cmd = 'fb-messenger://share/?link=' + url;
else cmd = 'https://www.facebook.com/dialog/send?app_id='+app_id+'&link='+url+'&redirect_uri=https://facebook.com';
if (isMobile) {
window.open(cmd, "_self");
essb.tracking_only('', 'messenger', saltKey, true);
}
else {
essb.window(cmd, 'messenger', saltKey);
}
return false;
};
essb.whatsapp = function(url, saltKey) {
var isMobile = $(window).width() <= 1024 ? true : false,
cmd = '';
if (isMobile) cmd = 'whatsapp://send?text=' + url;
else cmd = 'https://web.whatsapp.com/send?text=' + url;
if (isMobile) {
window.open(cmd, "_self");
essb.tracking_only('', 'whatsapp', saltKey, true);
}
else {
essb.window(cmd, 'whatsapp', saltKey);
}
return false;
};
essb.sms = function(url, saltKey) {
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream,
cmd = 'sms:' + (iOS ? '&' : '?') + 'body=' + url;
window.open(cmd, "_self");
essb.tracking_only('', 'sms', saltKey, true);
return false;
};
essb.tracking_only = function(url, service, instance, afterShare) {
if (url == '')
url = document.URL;
essb.window(url, service, instance, true);
var element = $('.essb_'+instance),
instance_position = $(element).attr('data-essb-position') || '';
if (afterShare) {
var instance_post_id = $('.essb_'+instance).attr('data-essb-postid') || '';
essb_smart_onclose_events(service, instance_post_id);
if (instance_position == 'booster' && typeof(essb_booster_close_from_action) != 'undefined')
essb_booster_close_from_action();
}
};
essb.pinterest_picker = function(instance) {
essb.tracking_only('', 'pinterest', instance);
var e=document.createElement('script');
e.setAttribute('type','text/javascript');
e.setAttribute('charset','UTF-8');
e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);
document.body.appendChild(e);
};
essb.print = function (instance) {
essb.tracking_only('', 'print', instance);
window.print();
};
essb.setCookie = function(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toGMTString();
document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/";
};
essb.getCookie = function(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i (win_height - 30)) {
var additional_correction = 0;
if (is_from_mobilebutton) {
$(element_class).css( { top: '5px'});
additional_correction += 5;
}
$(element_class).css( { height: (win_height - height_of_mobile_bar - height_correction - additional_correction)+'px'});
$(element_content_class).css( { height: (win_height - height_of_mobile_bar - additional_correction - (height_correction+50))+'px', "overflowY" :"auto"});
}
if (is_from_mobilebutton)
$(element_class_shadow).css( { height: (win_height - (is_from_mobilebutton ? height_of_mobile_bar : 0))+'px'});
if (!alignToBottom)
$(element_class).center();
else {
var left = ($(window).width() - $(element_class).outerWidth()) / 2;
$(element_class).css( { left: left+"px", position:'fixed', margin:0, bottom: (height_of_mobile_bar + height_correction) + "px" });
}
$(element_class).fadeIn(400);
$(element_class_shadow).fadeIn(200);
essb['essb_morepopup_opened'] = true;
};
essb.toggle_less_popup = function(unique_id) {
$(".essb_morepopup_"+unique_id).fadeOut(200);
$(".essb_morepopup_shadow_"+unique_id).fadeOut(200);
essb['essb_morepopup_opened'] = false;
};
essb.toggle_more_inline = function(unique_id) {
var buttons_element = $(".essb_"+unique_id);
if (!buttons_element.length) return;
var element_class = ".essb_morepopup_"+unique_id;
var appear_y = $(buttons_element).position().top + $(buttons_element).outerHeight(true);
var appear_x = $(buttons_element).position().left;
var appear_position = "absolute";
var appear_at_bottom = false;
if ($(buttons_element).css("position") === "fixed")
appear_position = "fixed";
if ($(buttons_element).hasClass("essb_displayed_bottombar"))
appear_at_bottom = true;
if (appear_at_bottom) {
appear_y = $(buttons_element).position().top - $(element_class).outerHeight(true);
var pointer_element = $(element_class).find(".modal-pointer");
if ($(pointer_element).hasClass("modal-pointer-up-left")) {
$(pointer_element).removeClass("modal-pointer-up-left");
$(pointer_element).addClass("modal-pointer-down-left");
}
}
var more_button = $(buttons_element).find(".essb_link_more");
if (!$(more_button).length)
more_button = $(buttons_element).find(".essb_link_more_dots");
if ($(more_button).length)
appear_x = (appear_position != "fixed") ? $(more_button).position().left - 5 : (appear_x + $(more_button).position().left - 5);
var share_button = $(buttons_element).find(".essb_link_share");
if ($(share_button).length)
appear_x = (appear_position != "fixed") ? $(share_button).position().left - 5 : (appear_x + $(share_button).position().left - 5);
$(element_class).css( { left: appear_x+"px", position: appear_position, margin:0, top: appear_y + "px" });
$(element_class).fadeIn(200);
essb['essb_morepopup_opened'] = true;
};
essb.subscribe_popup_close = function(key) {
$('.essb-subscribe-form-' + key).fadeOut(400);
$('.essb-subscribe-form-overlay-' + key).fadeOut(400);
};
essb.sharebutton = function(key) {
if ($('.essb-windowcs-'+key).length) {
$('.essb-windowcs-'+key).fadeIn(200);
$('.essb-windowcs-'+key+' .inner-content').center();
}
};
essb.sharebutton_close = function(key) {
if ($('.essb-windowcs-'+key).length) {
$('.essb-windowcs-'+key).fadeOut(200);
}
};
essb.toggle_subscribe = function(key) {
// subsribe container do not exist
if (!$('.essb-subscribe-form-' + key).length) return;
if (!essb['essb_subscribe_opened'])
essb['essb_subscribe_opened'] = {};
var asPopup = $('.essb-subscribe-form-' + key).attr("data-popup") || "";
// it is not popup (in content methods is asPopup == "")
if (asPopup != '1') {
if ($('.essb-subscribe-form-' + key).hasClass("essb-subscribe-opened")) {
$('.essb-subscribe-form-' + key).slideUp('fast');
$('.essb-subscribe-form-' + key).removeClass("essb-subscribe-opened");
}
else {
$('.essb-subscribe-form-' + key).slideDown('fast');
$('.essb-subscribe-form-' + key).addClass("essb-subscribe-opened");
if (!essb['essb_subscribe_opened'][key]) {
essb['essb_subscribe_opened'][key] = key;
essb.tracking_only('', 'subscribe', key, true);
}
}
}
else {
var win_width = $( window ).width();
var doc_height = $('document').height();
var base_width = 600;
if (win_width < base_width) { base_width = win_width - 40; }
$('.essb-subscribe-form-' + key).css( { width: base_width+'px'});
$('.essb-subscribe-form-' + key).center();
$('.essb-subscribe-form-' + key).fadeIn(400);
$('.essb-subscribe-form-overlay-' + key).fadeIn(200);
}
};
essb.ajax_subscribe = function(key, event) {
event.preventDefault();
var formContainer = $('.essb-subscribe-form-' + key + ' #essb-subscribe-from-content-form-mailchimp'),
positionContainer = $('.essb-subscribe-form-' + key + ' .essb-subscribe-form-content');
var usedPosition = $(positionContainer).attr('data-position') || '',
usedDesign = $(positionContainer).attr('data-design') || '';
if (formContainer.length) {
// Additional check for require agree to terms check
if ($(formContainer).find('.essb-subscribe-confirm').length) {
var state = $(formContainer).find('.essb-subscribe-confirm').is(":checked");
if (!state) {
if (essb_settings.subscribe_terms_error)
alert(essb_settings.subscribe_terms_error);
else
alert('You need to confirm that you agree with our terms');
return;
}
}
if ($(formContainer).find('.essb-subscribe-form-content-name-field').length && essb_settings.subscribe_validate_name) {
if ($(formContainer).find('.essb-subscribe-form-content-name-field').val() == '') {
if (essb_settings.subscribe_validate_name_error)
alert(essb_settings.subscribe_validate_name_error);
else
alert('You need to fill name field too');
return;
}
}
var user_mail = $(formContainer).find('.essb-subscribe-form-content-email-field').val();
var user_name = $(formContainer).find('.essb-subscribe-form-content-name-field').length ? $(formContainer).find('.essb-subscribe-form-content-name-field').val() : '';
$(formContainer).find('.submit').prop('disabled', true);
$(formContainer).hide();
$('.essb-subscribe-form-' + key).find('.essb-subscribe-loader').show();
var submitapi_call = formContainer.attr('action') + '&mailchimp_email='+user_mail+'&mailchimp_name='+user_name+'&position='+usedPosition+'&design='+usedDesign+'&title='+encodeURIComponent(document.title);
/**
* @since 7.7 Additional check to prevent mixed content
*/
var current_page_url = window.location.href;
if (current_page_url.indexOf('https://') > -1 && submitapi_call.indexOf('https://') == -1) submitapi_call = submitapi_call.replace('http://', 'https://');
// validate reCaptcha too
if ($('.essb-subscribe-captcha').length) {
var recaptcha = $( '#g-recaptcha-response' ).val();
submitapi_call += '&validate_recaptcha=true&recaptcha=' + recaptcha;
}
$.post(submitapi_call, { mailchimp_email1: user_mail, mailchimp_name1: user_name},
function (data) {
if (data) {
console.log(data);
if (data['code'] == '1') {
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-success').show();
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').hide();
$(formContainer).hide();
// subscribe conversions tracking
//usedPosition
if (typeof(essb_subscribe_tracking) != 'undefined') {
essb_subscribe_tracking(usedPosition);
}
// redirecting users if successful redirect URL is set
if (data['redirect']) {
setTimeout(function() {
if (data['redirect_new']) {
var win = window.open(data['redirect'], '_blank');
win.focus();
}
else
window.location.href = data['redirect'];
}, 200);
}
essb.trigger('subscribe_success', {'design': usedDesign, 'position': usedPosition, 'email': user_mail, 'name': user_name});
}
else {
var storedMessage = $('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').attr('data-message') || '';
if (storedMessage == '') {
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').attr('data-message', $('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').text());
}
if (data['code'] == 90)
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').text(data['message']);
else
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').text(storedMessage);
$('.essb-subscribe-form-' + key).find('.essb-subscribe-form-content-error').show();
$('.essb-subscribe-form-' + key).find('.essb-subscribe-from-content-form').show();
$(formContainer).find('.submit').prop('disabled', false);
}
$('.essb-subscribe-form-' + key).find('.essb-subscribe-loader').hide();
}},
'json');
}
};
essb.is_after_comment = function() {
var addr = window.location.href;
return addr.indexOf('#comment') > -1 ? true : false;
};
essb.flyin_close = function () {
$(".essb-flyin").fadeOut(200);
};
essb.popup_close = function() {
$(".essb-popup").fadeOut(200);
$(".essb-popup-shadow").fadeOut(400);
};
essb.copy_link = function(instance_id, user_href) {
var currentLocation = window.location.href, win_width = $( window ).width();
if (instance_id && $('.essb_' + instance_id).length) {
var instance_url = $('.essb_' + instance_id).data('essb-url') || '';
if (instance_url != '') currentLocation = instance_url;
}
if (user_href && user_href != '') currentLocation = user_href;
if (!$('.essb-copylink-window').length) {
var output = [];
output.push('');
output.push('');
$('body').append(output.join(''));
$('.essb-copylink-window .essb_morepopup_close').on('click', function(e) {
e.preventDefault();
$('.essb-copylink-window').fadeOut(300);
$('.essb-copylink-shadow').fadeOut(200);
});
$('.essb-copylink-window .essb-copy-link').on('click', function(e) {
e.preventDefault();
var copyText = document.querySelector("#essb_copy_link_field");
try {
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/
document.execCommand("copy");
$('.essb-copylink-window .essb_morepopup_header span').html(essb_settings.translate_copy_message2 ? essb_settings.translate_copy_message2 : 'Copied to clipboard.');
setTimeout(function() {
$('.essb-copylink-window .essb_morepopup_header span').html(' ');
}, 2000);
}
catch (e) {
$('.essb-copylink-window .essb_morepopup_header span').html(essb_settings.translate_copy_message3 ? essb_settings.translate_copy_message3 : 'Please use Ctrl/Cmd+C to copy the URL.');
setTimeout(function() {
$('.essb-copylink-window .essb_morepopup_header span').html(' ');
}, 2000);
}
});
}
$('.essb-copy-message').html('');
$('.essb-copylink-window').css({'width': (win_width > 600 ? 600 : win_width - 50) + 'px'});
$('.essb-copylink-window').center();
$('.essb-copylink-window').fadeIn(300);
$('.essb-copylink-shadow').fadeIn(200);
$('#essb_copy_link_field').val(currentLocation);
$('#essb_copy_link_field').focus();
$('#essb_copy_link_field').select();
};
/**
* Mobile Display Code
*/
essb.mobile_sharebar_open = function() {
var element = $('.essb-mobile-sharebar-window');
if (!element.length) return;
var sharebar_element = $('.essb-mobile-sharebar');
if (!sharebar_element.length)
sharebar_element = $('.essb-mobile-sharepoint');
if (!sharebar_element.length)
return;
if (essb['is_displayed_sharebar']) {
essb.mobile_sharebar_close();
return;
}
var current_height_of_bar = $(sharebar_element).outerHeight();
var win_height = $(window).height();
var win_width = $(window).width();
win_height -= current_height_of_bar;
if ($('#wpadminbar').length)
$("#wpadminbar").hide();
var element_inner = $('.essb-mobile-sharebar-window-content');
if (element_inner.length) {
element_inner.css({
height : (win_height - 60) + 'px'
});
}
$(element).css({
width : win_width + 'px',
height : win_height + 'px'
});
$(element).fadeIn(400);
essb['is_displayed_sharebar'] = true;
};
essb.mobile_sharebar_close = function() {
var element = $('.essb-mobile-sharebar-window');
if (!element.length)
return;
$(element).fadeOut(400);
essb['is_displayed_sharebar'] = false;
};
essb.responsiveEventsCanRun = function(element) {
var hideOnMobile = $(element).hasClass('essb_mobile_hidden'),
hideOnDesktop = $(element).hasClass('essb_desktop_hidden'),
hideOnTablet = $(element).hasClass('essb_tablet_hidden'),
windowWidth = $(window).width(),
canRun = true;
if (windowWidth <= 768 && hideOnMobile) canRun = false;
if (windowWidth > 768 && windowWidth <= 1100 && hideOnTablet) canRun = false;
if (windowWidth > 1100 && hideOnDesktop) canRun = false;
if (!$(element).length) canRun = false;
return canRun;
};
window.essb = essb;
/**
* Incore Specific Functions & Events
*/
var essb_int_value = function(value) {
value = parseInt(value);
if (isNaN(value) || !isFinite(value)) value = 0;
return value;
}
var essb_self_postcount = function (service, countID) {
if (typeof(essb_settings) != "undefined") {
countID = String(countID);
$.post(essb_settings.ajax_url, {
'action': 'essb_self_postcount',
'post_id': countID,
'service': service,
'nonce': essb_settings.essb3_nonce
}, function (data) { },'json');
}
};
var essb_smart_onclose_events = function (service, postID) {
// 7.0 - trigger only on selected networks (when such are present)
if (essb_settings && essb_settings['aftershare_networks']) {
var workingNetworks = essb_settings['aftershare_networks'] != '' ? essb_settings['aftershare_networks'].split(',') : [];
if (workingNetworks.indexOf(service) == -1) return;
}
else {
// 6.0.3 - adding email & mail as also ignoring options
if (service == "subscribe" || service == "comments" || service == 'email' || service == 'mail') return;
}
if (service == "subscribe" || service == "comments" || service == 'email' || service == 'mail') return;
if (typeof (essbasc_popup_show) == 'function')
essbasc_popup_show();
if (typeof essb_acs_code == 'function')
essb_acs_code(service, postID);
if ($('.essb-aftershare-subscribe-form').length) {
var key = $('.essb-aftershare-subscribe-form').data('salt') || '';
if (key != '') essb.toggle_subscribe(key);
}
};
var essb_ga_tracking = function(service, url, position) {
var essb_ga_type = essb_settings.essb3_ga_mode;
if ( 'ga' in window && window.ga !== undefined && typeof window.ga === 'function' ) {
if (essb_ga_type == "extended")
ga('send', 'event', 'social', service + ' ' + position, url);
else
ga('send', 'event', 'social', service, url);
}
if (essb_ga_type == "layers" && typeof(dataLayer) != "undefined") {
dataLayer.push({
'service': service,
'position': position,
'url': url,
'event': 'social'
});
}
};
var essb_open_mailform = window.essb_open_mailform = function(unique_id) {
if (essb['essb_mailform_opened']) {
essb_close_mailform(unique_id);
return;
}
var sender_element = $(".essb_"+unique_id);
if (!sender_element.length) return;
var sender_post_id = $(sender_element).attr("data-essb-postid") || "";
$("#essb_mail_instance").val(unique_id);
$("#essb_mail_post").val(sender_post_id);
var win_width = $( window ).width(),
win_height = $(window).height(),
base_width = 400;
if (win_width < base_width) base_width = win_width - 30;
var height_correction = 20,
element_class = ".essb_mailform",
element_class_shadow = ".essb_mailform_shadow";
$(element_class).css( { width: base_width+'px'});
var popup_height = $(element_class).outerHeight();
if (popup_height > (win_height - 30)) {
$(element_class).css( { height: (win_height - height_correction)+'px'});
}
$("#essb_mailform_from").val("");
$("#essb_mailform_to").val("");
$('#essb_mailform_from_name').val('');
if ($("#essb_mailform_c").length)
$("#essb_mailform_c").val("");
// Maybe load reCAPTCHA.
if ( typeof(essb_recaptcha) != 'undefined' && essb_recaptcha && essb_recaptcha.recaptchaSitekey ) {
grecaptcha.render( 'essb-modal-recaptcha', {
sitekey: essb_recaptcha.recaptchaSitekey
} );
}
$(element_class).center();
$(element_class).slideDown(200);
$(element_class_shadow).fadeIn(200);
essb['essb_mailform_opened'] = true;
essb.tracking_only("", "mail", unique_id);
};
var essb_close_mailform = window.essb_close_mailform = function() {
$(".essb_mailform").fadeOut(200);
$(".essb_mailform_shadow").fadeOut(200);
essb['essb_mailform_opened'] = false;
};
var essb_mailform_send = window.essb_mailform_send = function() {
var sender_email = $("#essb_mailform_from").val(),
sender_name = $('#essb_mailform_from_name').val(),
recepient_email = $("#essb_mailform_to").val(),
captcha_validate = $("#essb_mailform_c").length ? true : false,
errorMessage = $('.essb_mailform').attr('data-error') || '',
captcha = captcha_validate ? $("#essb_mailform_c").val() : "",
recaptcha = $( '#g-recaptcha-response' ).val(),
custom_message = '';
if (sender_email == "" || recepient_email == "" || (captcha == "" && captcha_validate)) {
alert(errorMessage);
return;
}
var mail_salt = $("#essb_mail_salt").val(),
instance_post_id = $("#essb_mail_post").val();
if (typeof(essb_settings) != "undefined") {
$.post(essb_settings.ajax_url, {
"action": "essb_mail_action",
"post_id": instance_post_id,
"from": sender_email,
"from_name": sender_name,
"to": recepient_email,
"c": captcha,
"cu": custom_message,
"salt": mail_salt,
'recapcha': recaptcha,
"nonce": essb_settings.essb3_nonce
}, function (data) { if (data) {
alert(data["message"]);
if (data["code"] == "1") essb_close_mailform();
}}, 'json');
}
};
/**
* After Share Events functions
*/
var essbasc_popup_show = window.essbasc_popup_show = function() {
if (!$('.essbasc-popup').length) return;
if (essb.getCookie('essb_aftershare')) return; // cookie already set for visible events
var cookie_len = (typeof(essbasc_cookie_live) != "undefined") ? essbasc_cookie_live : 7;
if (parseInt(cookie_len) == 0) { cookie_len = 7; }
var win_width = $( window ).width(), base_width = 800,
userwidth = $('.essbasc-popup').attr("data-popup-width") || '',
singleShow = $('.essbasc-popup').attr("data-single") || '';
if (Number(userwidth) && Number(userwidth) > 0) base_width = userwidth;
if (win_width < base_width) base_width = win_width - 60;
$(".essbasc-popup").css( { width: base_width+'px'});
$(".essbasc-popup").center();
$(".essbasc-popup").fadeIn(300);
$(".essbasc-popup-shadow").fadeIn(100);
if (singleShow == 'true') essb.setCookie('essb_aftershare', "yes", cookie_len);
};
var essbasc_popup_close = window.essbasc_popup_close = function () {
$(".essbasc-popup").fadeOut(200);
$(".essbasc-popup-shadow").fadeOut(100);
};
$(document).ready(function(){
/**
* Mobile Share Bar
*/
var mobileHideOnScroll = false;
var mobileHideTriggerPercent = 90;
var mobileAppearOnScroll = false;
var mobileAppearOnScrollPercent = 0;
var mobileAdBarConnected = false;
var essb_mobile_sharebuttons_onscroll = function() {
var current_pos = $(window).scrollTop();
var height = $(document).height() - $(window).height();
var percentage = current_pos / height * 100;
var isVisible = true;
if (mobileAppearOnScroll && !mobileHideOnScroll) {
if (percentage < mobileAppearOnScrollPercent) isVisible = false;
}
if (mobileHideOnScroll && !mobileAppearOnScroll) {
if (percentage > mobileHideTriggerPercent) isVisible = false;
}
if (mobileAppearOnScroll && mobileHideOnScroll) {
if (percentage > mobileHideTriggerPercent || percentage < mobileAppearOnScrollPercent) isVisible = false;
}
if (!isVisible) {
if (!$('.essb-mobile-sharebottom').hasClass("essb-mobile-break")) {
$('.essb-mobile-sharebottom').addClass("essb-mobile-break");
$('.essb-mobile-sharebottom').fadeOut(400);
}
if ($('.essb-adholder-bottom').length && mobileAdBarConnected) {
if (!$('.essb-adholder-bottom').hasClass("essb-mobile-break")) {
$('.essb-adholder-bottom').addClass("essb-mobile-break");
$('.essb-adholder-bottom').fadeOut(400);
}
}
} else {
if ($('.essb-mobile-sharebottom').hasClass("essb-mobile-break")) {
$('.essb-mobile-sharebottom').removeClass("essb-mobile-break");
$('.essb-mobile-sharebottom').fadeIn(400);
}
if ($('.essb-adholder-bottom').length && mobileAdBarConnected) {
if ($('.essb-adholder-bottom').hasClass("essb-mobile-break")) {
$('.essb-adholder-bottom').removeClass("essb-mobile-break");
$('.essb-adholder-bottom').fadeIn(400);
}
}
}
};
if ($('.essb-mobile-sharebottom').length) {
var hide_on_end = $('.essb-mobile-sharebottom').attr('data-hideend');
var hide_on_end_user = $('.essb-mobile-sharebottom').attr('data-hideend-percent');
var appear_on_scroll = $('.essb-mobile-sharebottom').attr('data-show-percent') || '';
var check_responsive = $('.essb-mobile-sharebottom').attr('data-responsive') || '';
if (Number(appear_on_scroll)) {
mobileAppearOnScroll = true;
mobileAppearOnScrollPercent = Number(appear_on_scroll);
}
if (hide_on_end == 'true') mobileHideOnScroll = true;
var instance_mobile = false;
if( (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent) ) {
instance_mobile = true;
}
if ($('.essb-adholder-bottom').length) {
$adbar_connected = $('.essb-adholder-bottom').attr('data-connected') || '';
if ($adbar_connected == 'true') mobileAdBarConnected = true;
}
if (mobileHideOnScroll || mobileAppearOnScroll) {
if (parseInt(hide_on_end_user) > 0)
mobileHideTriggerPercent = parseInt(hide_on_end_user);
if (check_responsive == '' || (check_responsive == 'true' && instance_mobile))
$(window).on('scroll', debounce(essb_mobile_sharebuttons_onscroll, 1));
}
}
/**
* Display Methods: Float on top
*/
if ($('.essb_displayed_float').length) {
var floatingTop = $('.essb_displayed_float').offset().top - parseFloat($('.essb_displayed_float').css('marginTop').replace(/auto/, 0)),
basicElementWidth = '',
hide_float_percent = $('.essb_displayed_float').data('float-hide') || '',
custom_top_postion = $('.essb_displayed_float').data('float-top') || '',
hide_float_active = false;
if (hide_float_percent != '' && Number(hide_float_percent) > 0) {
hide_float_percent = parseInt(hide_float_percent);
hide_float_active = true;
}
var active_custom_top = false;
if (custom_top_postion != '' && Number(custom_top_postion) > 0) {
custom_top_postion = parseInt(custom_top_postion);
active_custom_top = true;
}
/**
* Hold down scroll event for floating top display method when such is present
* inside code
*/
function essbFloatingButtons() {
var y = $(window).scrollTop();
if (active_custom_top)
y -= custom_top_postion;
var height = $(document).height() - $(window).height();
var percentage = y/height*100;
// whether that's below the form
if (y >= floatingTop) {
// if so, ad the fixed class
if (basicElementWidth == '') {
var widthOfContainer = $('.essb_displayed_float').width();
basicElementWidth = widthOfContainer;
$('.essb_displayed_float').width(widthOfContainer);
}
$('.essb_displayed_float').addClass('essb_fixed');
} else {
// otherwise remove it
$('.essb_displayed_float').removeClass('essb_fixed');
if (basicElementWidth != '') {
$('.essb_displayed_float').width(basicElementWidth);
}
}
if (hide_float_active) {
if (percentage >= hide_float_percent && !$('.essb_displayed_float').hasClass('hidden-float')) {
$('.essb_displayed_float').addClass('hidden-float');
$('.essb_displayed_float').fadeOut(100);
return;
}
if (percentage < hide_float_percent && $('.essb_displayed_float').hasClass('hidden-float')) {
$('.essb_displayed_float').removeClass('hidden-float');
$('.essb_displayed_float').fadeIn(100);
return;
}
}
} // end: essbFloatingButtons
if (essb.responsiveEventsCanRun($('.essb_displayed_float')))
$(window).on('scroll', debounce(essbFloatingButtons, 1));
}
/**
* Display Methods: Sidebar
*/
// Sidebar animation reveal on load
if ($('.essb_sidebar_transition').length) {
$('.essb_sidebar_transition').each(function() {
if (!essb.responsiveEventsCanRun($(this))) return;
if ($(this).hasClass('essb_sidebar_transition_slide'))
$(this).toggleClass('essb_sidebar_transition_slide');
if ($(this).hasClass('essb_sidebar_transition_fade'))
$(this).toggleClass('essb_sidebar_transition_fade');
});
}
/**
* Reposition sidebar at the middle of page
*/
if ($('.essb_sidebar_location_middle').length) {
var essbSidebarRepositionMiddle = function() {
var heightOfSidebar = $('.essb_sidebar_location_middle').outerHeight(),
winHeight = $(window).height(), top = 0;
if (heightOfSidebar > winHeight) top = 0;
else {
top = Math.round((winHeight - heightOfSidebar) / 2);
}
$('.essb_sidebar_location_middle').css({'top': top + 'px', 'opacity': '1'});
};
essbSidebarRepositionMiddle();
$(window).on('resize', debounce(essbSidebarRepositionMiddle, 1));
}
// Sidebar close button
$(".essb_link_sidebar-close a").each(function() {
$(this).on('click', function(event) {
event.preventDefault();
var links_list = $(this).parent().parent().get(0);
if (!$(links_list).length) return;
$(links_list).find(".essb_item").each(function(){
if (!$(this).hasClass("essb_link_sidebar-close"))
$(this).toggleClass("essb-sidebar-closed-item");
else
$(this).toggleClass("essb-sidebar-closed-clicked");
});
});
});
var essb_sidebar_onscroll = function () {
var current_pos = $(window).scrollTop();
var height = $(document).height()-$(window).height();
var percentage = current_pos/height*100;
var element;
if ($(".essb_displayed_sidebar").length)
element = $(".essb_displayed_sidebar");
if ($(".essb_displayed_sidebar_right").length)
element = $(".essb_displayed_sidebar_right");
if (!element || typeof(element) == "undefined") return;
var value_disappear = essb_int_value($(element).data('sidebar-disappear-pos') || '');
var value_appear = essb_int_value($(element).data('sidebar-appear-pos') || '');
var value_appear_unit = $(element).data('sidebar-appear-unit') || '';
var value_contenthidden = $(element).data('sidebar-contenthidden') || '';
if (value_appear_unit == 'px') percentage = current_pos;
// Hiding share buttons when content is visible
if (value_contenthidden == 'yes' && ($('.essb_displayed_top').length || $('.essb_displayed_bottom').length)) {
if (($('.essb_displayed_top').length && isVisibleSelector($('.essb_displayed_top'))) ||
($('.essb_displayed_bottom').length && isVisibleSelector($('.essb_displayed_bottom'))))
element.fadeOut(100);
else
element.fadeIn(100);
}
if (value_appear > 0 && value_disappear == 0) {
if (percentage >= value_appear && !element.hasClass("active-sidebar")) {
element.fadeIn(100);
element.addClass("active-sidebar");
return;
}
if (percentage < value_appear && element.hasClass("active-sidebar")) {
element.fadeOut(100);
element.removeClass("active-sidebar");
return;
}
}
if (value_disappear > 0 && value_appear == 0) {
if (percentage >= value_disappear && !element.hasClass("hidden-sidebar")) {
element.fadeOut(100);
element.addClass("hidden-sidebar");
return;
}
if (percentage < value_disappear && element.hasClass("hidden-sidebar")) {
element.fadeIn(100);
element.removeClass("hidden-sidebar");
return;
}
}
if (value_appear > 0 && value_disappear > 0) {
if (percentage >= value_appear && percentage < value_disappear && !element.hasClass("active-sidebar")) {
element.fadeIn(100);
element.addClass("active-sidebar");
return;
}
if ((percentage < value_appear || percentage >= value_disappear) && element.hasClass("active-sidebar")) {
element.fadeOut(100);
element.removeClass("active-sidebar");
return;
}
}
};
if (essb.responsiveEventsCanRun($('.essb_displayed_sidebar'))) {
var essbSidebarContentHidden = $('.essb_displayed_sidebar').data('sidebar-contenthidden') || '',
essbSidebarAppearPos = $('.essb_displayed_sidebar').data('sidebar-appear-pos') || '',
essbSidebarDisappearPos = $('.essb_displayed_sidebar').data('sidebar-disappear-pos') || '';
if (essbSidebarAppearPos != '' || essbSidebarDisappearPos != '' || essbSidebarContentHidden == 'yes') {
if ($( window ).width() > 800) {
$(window).on('scroll', debounce(essb_sidebar_onscroll, 1));
essb_sidebar_onscroll();
}
}
}
/**
* Display Method: Post Bar
*/
if ($('.essb-postbar').length) {
// Define Variables
var ttr_start = $(".essb_postbar_start"),
ttr_end = $(".essb_postbar_end");
if (ttr_start.length) {
var docOffset = ttr_start.offset().top,
docEndOffset = ttr_end.offset().top,
elmHeight = docEndOffset - docOffset,
progressBar = $('.essb-postbar-progress-bar'),
winHeight = $(window).height(),
docScroll,viewedPortion;
$(".essb-postbar-prev-post a").on('mouseenter touchstart', function(){
$(this).next('div').css("top","-162px");
});
$(".essb-postbar-close-prev").on('click', function(){
$(".essb-postbar-prev-post a").next('div').css("top","46px");
});
$(".essb-postbar-next-post a").on('mouseenter touchstart', function(){
$(this).next('div').css("top","-162px");
});
$(".essb-postbar-close-next").on('click', function(){
$(".essb-postbar-next-post a").next('div').css("top","46px");
});
$(window).on('load', function(){
docOffset = ttr_start.offset().top,
docEndOffset = ttr_end.offset().top,
elmHeight = docEndOffset - docOffset;
});
$(window).on('scroll', function() {
docScroll = $(window).scrollTop(),
viewedPortion = winHeight + docScroll - docOffset;
if(viewedPortion < 0) {
viewedPortion = 0;
}
if(viewedPortion > elmHeight) {
viewedPortion = elmHeight;
}
var viewedPercentage = (viewedPortion / elmHeight) * 100;
progressBar.css({ width: viewedPercentage + '%' });
});
$(window).on('resize', function() {
docOffset = ttr_start.offset().top;
docEndOffset = ttr_end.offset().top;
elmHeight = docEndOffset - docOffset;
winHeight = $(window).height();
$(window).trigger('scroll');
});
$(window).trigger('scroll');
}
};
/**
* Display Method: Post Vertical Float
*/
if ($('.essb_displayed_postfloat').length) {
var top = $('.essb_displayed_postfloat').offset().top - parseFloat($('.essb_displayed_postfloat').css('marginTop').replace(/auto/, 0));
var postfloat_always_onscreen = ($('.essb_displayed_postfloat').data('postfloat-stay') || '').toString() == 'true' ? true : false;
var postfloat_fix_bottom = ($('.essb_displayed_postfloat').data('postfloat-fixbottom') || '').toString() == 'true' ? true : false;
var custom_user_top = $('.essb_displayed_postfloat').data('postfloat-top') || '';
var postFloatVisibleSelectors = $('.essb_displayed_postfloat').data('postfloat-selectors') || '',
postFloatViewportCheck = [],
postFloatPercentAppear = $('.essb_displayed_postfloat').data('postfloat-percent') || '';
if (!Number(postFloatPercentAppear) || Number(postFloatPercentAppear) == 0) {
postFloatPercentAppear = '';
$('.essb_displayed_postfloat').attr('data-postfloat-percent', '');
}
if (postFloatVisibleSelectors != '') {
postFloatViewportCheck = postFloatVisibleSelectors.split(',');
for (var i=0;i= Number(postFloatPercentAppear) : percentage >= Number(postFloatPercentAppear);
if (shouldBeVisible) {
$('.essb_displayed_postfloat').css({'opacity' : '1'});
$('.essb_displayed_postfloat').css({'transform' : 'translateY(0)'});
}
else {
$('.essb_displayed_postfloat').css({'opacity' : '0'});
$('.essb_displayed_postfloat').css({'transform' : 'translateY(50px)'});
}
}
if (y >= top) {
$('.essb_displayed_postfloat').addClass('essb_postfloat_fixed');
var element_position = $('.essb_displayed_postfloat').offset();
var element_height = $('.essb_displayed_postfloat').outerHeight();
var element_top = parseInt(element_position.top) + parseInt(element_height);
if (!postfloat_always_onscreen) {
if (element_top > break_top) {
if (!$('.essb_displayed_postfloat').hasClass("essb_postfloat_breakscroll")) {
$('.essb_displayed_postfloat').addClass("essb_postfloat_breakscroll");
}
}
else {
if ($('.essb_displayed_postfloat').hasClass("essb_postfloat_breakscroll")) {
$('.essb_displayed_postfloat').removeClass("essb_postfloat_breakscroll");
}
}
}
else {
var isOneVisible = false;
$('.essb-postfloat-monitor').each(function() {
if (isVisibleSelector($(this)))
isOneVisible = true;
});
if (!isOneVisible) {
if ($('.essb_displayed_postfloat').hasClass("essb_postfloat_breakscroll")) {
$('.essb_displayed_postfloat').removeClass("essb_postfloat_breakscroll");
}
/**
* Fix the postfloat at the bottom of content
*/
if (postfloat_fix_bottom) {
if (element_top > break_top) {
if (!$('.essb_displayed_postfloat').hasClass('essb_postfloat_absolute')) {
$('.essb_displayed_postfloat').removeClass('essb_postfloat_fixed');
$('.essb_displayed_postfloat').attr('data-unfixed', element_top);
$('.essb_displayed_postfloat').addClass('essb_postfloat_absolute');
$('.essb_displayed_postfloat').css({ 'position': 'absolute', 'top': ($('.essb_break_scroll').position().top - element_height - 100) + 'px'});
}
}
else {
if ($('.essb_displayed_postfloat').hasClass('essb_postfloat_absolute')) {
$('.essb_displayed_postfloat').removeClass('essb_postfloat_absolute');
$('.essb_displayed_postfloat').removeAttr('data-unfixed');
$('.essb_displayed_postfloat').css({ 'position': '', 'top': '' });
$('.essb_displayed_postfloat').addClass('essb_postfloat_fixed');
}
}
}
}
else {
if (!$('.essb_displayed_postfloat').hasClass("essb_postfloat_breakscroll")) {
$('.essb_displayed_postfloat').addClass("essb_postfloat_breakscroll");
}
}
}
}
else
// otherwise remove it
$('.essb_displayed_postfloat').removeClass('essb_postfloat_fixed');
}
if (essb.responsiveEventsCanRun($('.essb_displayed_postfloat')))
$(window).on('scroll', debounce(essbPostVerticalFloatScroll, 1));
}
/**
* Display Method: Fly In
*/
if ($('.essb-flyin').length) {
var flyinDisplayed = false;
var essb_flyin_onscroll = function() {
if (flyinTriggeredOnScroll) return;
var current_pos = $(window).scrollTop();
var height = $(document).height()-$(window).height();
var percentage = current_pos/height*100;
if (!flyinTriggerEnd) {
if (percentage > flyinTriggerPercent && flyinTriggerPercent > 0) {
flyinTriggeredOnScroll = true;
essb_flyin_show();
}
}
else {
var element = $('.essb_break_scroll');
if (!element.length) { return; }
var top = $('.essb_break_scroll').offset().top - parseFloat($('.essb_break_scroll').css('marginTop').replace(/auto/, 0));
if (current_pos >= top) {
flyinTriggeredOnScroll = true;
essb_flyin_show();
}
}
}
var essb_flyin_manual_show = window.essb_flyin_manual_show = function() {
if (!$('.essb-flyin').length) return;
var element = $('.essb-flyin'),
popWidth = $(element).attr('data-width') || '',
winWidth = $( window ).width(),
baseWidth = 400;
if (Number(popWidth) && Number(popWidth) > 0) baseWidth = Number(popWidth);
if (winWidth < baseWidth) baseWidth = winWidth - 60;
$(".essb-flyin").css( { width: baseWidth+'px'});
$(".essb-flyin").fadeIn(400);
}
var essb_flyin_show = window.essb_flyin_show = function() {
if (flyinDisplayed) return;
var element = $('.essb-flyin');
if (!element.length) return;
var popWidth = $(element).attr("data-width") || "";
var popHideOnClose = $(element).attr("data-close-hide") || "";
var popHideOnCloseAll = $(element).attr("data-close-hide-all") || "";
var popPostId = $(element).attr("data-postid") || "";
var popAutoCloseAfter = $(element).attr("data-close-after") || "";
if (popHideOnClose == "1" || popHideOnCloseAll == "1") {
var cookie_name = "";
var base_cookie_name = "essb_flyin_";
if (popHideOnClose == "1") {
cookie_name = base_cookie_name + popPostId;
var cookieSet = essb.getCookie(cookie_name);
if (cookieSet == "yes") return;
essb.setCookie(cookie_name, "yes", 7);
}
if (popHideOnCloseAll == "1") {
cookie_name = base_cookie_name + "all";
var cookieSet = essb.getCookie(cookie_name);
if (cookieSet == "yes") return;
essb.setCookie(cookie_name, "yes", 7);
}
}
var win_width = $( window ).width();
var doc_height = $('document').height();
var base_width = 400;
var userwidth = popWidth;
if (Number(userwidth) && Number(userwidth) > 0)
base_width = userwidth;
if (win_width < base_width) base_width = win_width - 60;
// automatically close
if (Number(popAutoCloseAfter) && Number(popAutoCloseAfter) > 0) {
var optin_time = parseFloat(popAutoCloseAfter);
optin_time = optin_time * 1000;
setTimeout(function(){
$(".essb-flyin").fadeOut(200);
}, optin_time);
}
$(".essb-flyin").css( { width: base_width+'px'});
$(".essb-flyin").fadeIn(400);
flyinDisplayed = true;
}
var flyinTriggeredOnScroll = false;
var flyinTriggerPercent = -1;
var flyinTriggerEnd = false;
if (essb.responsiveEventsCanRun($('.essb-flyin'))) {
var element = $('.essb-flyin');
if (essb.is_after_comment() && element.hasClass("essb-flyin-oncomment")) {
essb_flyin_show();
return;
}
var popOnPercent = $(element).attr("data-load-percent") || "";
var popAfter = $(element).attr("data-load-time") || "";
var popOnEnd = $(element).attr("data-load-end") || "";
var popManual = $(element).attr("data-load-manual") || "";
if (popManual == '1') return;
if (popOnPercent != '' || popOnEnd == "1") {
flyinTriggerPercent = Number(popOnPercent);
flyinTriggeredOnScroll = false;
flyinTriggerEnd = (popOnEnd == "1") ? true : false;
$(window).on('scroll', debounce(essb_flyin_onscroll, 1));
}
if (popAfter && typeof(popAfter) != "undefined") {
if (popAfter != '' && Number(popAfter)) {
setTimeout(function() {
essb_flyin_show();
}, (Number(popAfter) * 1000));
}
else
essb_flyin_show();
}
else {
if (popOnPercent == '' && popOnEnd != '1')
essb_flyin_show();
}
}
}
/**
* Display Method: Pop up
*/
if ($('.essb-popup').length) {
var popupTriggeredOnScroll = false;
var popupTriggerPercent = -1;
var popupTriggerEnd = false;
var popupTriggerExit = false;
var popupShown = false;
var essb_popup_exit = function(event) {
if (popupTriggerExit) return;
var e = event || window.event;
var from = e.relatedTarget || e.toElement;
// Reliable, works on mouse exiting window and user switching active program
if(!from || from.nodeName === "HTML") {
popupTriggerExit = true;
essb_popup_show();
}
};
var essb_popup_onscroll = function() {
if (popupTriggeredOnScroll) return;
var current_pos = $(window).scrollTop();
var height = $(document).height() - $(window).height();
var percentage = current_pos/height*100;
if (!popupTriggerEnd) {
if (percentage > popupTriggerPercent && popupTriggerPercent > 0) {
popupTriggeredOnScroll = true;
essb_popup_show();
}
}
else {
var element = $('.essb_break_scroll');
if (!element.length) {
var userTriggerPercent = 90;
if (percentage > userTriggerPercent && userTriggerPercent > 0) {
popupTriggeredOnScroll = true;
essb_popup_show();
}
}
else {
var top = $('.essb_break_scroll').offset().top - parseFloat($('.essb_break_scroll').css('marginTop').replace(/auto/, 0));
if (current_pos >= top) {
popupTriggeredOnScroll = true;
essb_popup_show();
}
}
}
};
var essb_popup_show = window.essb_popup_show = function() {
if (popupShown) return;
var element = $('.essb-popup');
if (!element.length) return;
var popWidth = $(element).attr("data-width") || "";
var popHideOnClose = $(element).attr("data-close-hide") || "";
var popHideOnCloseAll = $(element).attr("data-close-hide-all") || "";
var popPostId = $(element).attr("data-postid") || "";
var popAutoCloseAfter = $(element).attr("data-close-after") || "";
if (popHideOnClose == "1" || popHideOnCloseAll == "1") {
var cookie_name = "";
var base_cookie_name = "essb_popup_";
if (popHideOnClose == "1") {
cookie_name = base_cookie_name + popPostId;
var cookieSet = essb.getCookie(cookie_name);
if (cookieSet == "yes") return;
essb.setCookie(cookie_name, "yes", 7);
}
if (popHideOnCloseAll == "1") {
cookie_name = base_cookie_name + "all";
var cookieSet = essb.getCookie(cookie_name);
if (cookieSet == "yes") return;
essb.setCookie(cookie_name, "yes", 7);
}
}
var win_width = $( window ).width();
var doc_height = $('document').height();
var base_width = 800;
var userwidth = popWidth;
if (Number(userwidth) && Number(userwidth) > 0) {
base_width = userwidth;
}
if (win_width < base_width) { base_width = win_width - 60; }
// automatically close
if (Number(popAutoCloseAfter) && Number(popAutoCloseAfter) > 0) {
optin_time = Number(popAutoCloseAfter) * 1000;
setTimeout(function(){
essb.popup_close();
}, optin_time);
}
$(".essb-popup").css( { width: base_width+'px'});
$(".essb-popup").center();
$(".essb-popup").fadeIn(400);
$(".essb-popup-shadow").fadeIn(200);
popupShown = true;
};
if (essb.responsiveEventsCanRun($('.essb-popup'))) {
var element = $('.essb-popup');
if (essb.is_after_comment()) {
if (element.hasClass("essb-popup-oncomment")) {
essb_popup_show();
return;
}
}
var popOnPercent = $(element).attr("data-load-percent") || "";
var popAfter = $(element).attr("data-load-time") || "";
var popOnEnd = $(element).attr("data-load-end") || "";
var popManual = $(element).attr("data-load-manual") || "";
var popExit = $(element).attr("data-exit-intent") || "";
if (popManual == '1') {
popOnPercent = '';
popAfter = '-1';
popOnEnd = '';
popExit = '';
}
if (popOnPercent != '' || popOnEnd == "1") {
popupTriggerPercent = Number(popOnPercent);
popupTriggeredOnScroll = false;
popupTriggerEnd = (popOnEnd == "1") ? true : false;
$(window).on('scroll', essb_popup_onscroll);
}
if (popExit == '1') {
function addEvent(obj, evt, fn) {
if (obj.addEventListener) {
obj.addEventListener(evt, fn, false);
} else if (obj.attachEvent) {
obj.attachEvent("on" + evt, fn);
}
}
// Exit intent trigger
addEvent(document, 'mouseout', function(evt) {
evt = evt ? evt : window.event;
// If this is an autocomplete element.
if(evt.target.tagName.toLowerCase() == "input")
return;
// Get the current viewport width.
var vpWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
// If the current mouse X position is within 50px of the right edge
// of the viewport, return.
if(evt.clientX >= (vpWidth - 50))
return;
// If the current mouse Y position is not within 50px of the top
// edge of the viewport, return.
// 7.7.3 - replace 50 -> 0
if(evt.clientY >= 0)
return;
if (evt.toElement === null && evt.relatedTarget === null) {
essb_popup_exit();
}
});
}
if (popAfter && typeof(popAfter) != "undefined" && popAfter != '-1') {
if (popAfter != '' && Number(popAfter)) {
setTimeout(function() {
essb_popup_show();
}, (Number(popAfter) * 1000));
}
else {
essb_popup_show();
}
}
else {
if (popOnPercent == '' && popOnEnd != '1' && popExit != '1' && popAfter != '-1') {
essb_popup_show();
}
}
}
}
/**
* Display Method: Bottom Bar
*/
function essb_bottombar_onscroll() {
var current_pos = $(window).scrollTop();
var height = $(document).height()-$(window).height();
var percentage = current_pos/height*100;
var element;
if ($(".essb_bottombar").length)
element = $(".essb_bottombar");
if (!element || typeof(element) == "undefined") return;
var value_appear = essb_int_value($(element).find('.essb_links').data('bottombar-appear') || '');
var value_disappear = essb_int_value($(element).find('.essb_links').data('bottombar-disappear') || '');
if (value_appear > 0 ) {
if (percentage >= value_appear && !element.hasClass("essb_active_bottombar")) {
element.addClass("essb_active_bottombar");
return;
}
if (percentage < value_appear && element.hasClass("essb_active_bottombar")) {
element.removeClass("essb_active_bottombar");
return;
}
}
if (value_disappear > 0) {
if (percentage >= value_disappear && !element.hasClass("hidden-float")) {
element.addClass("hidden-float");
element.css( {"opacity": "0"});
return;
}
if (percentage < value_disappear && element.hasClass("hidden-float")) {
element.removeClass("hidden-float");
element.css( {"opacity": "1"});
return;
}
}
}
if ($(".essb_bottombar").length)
if (essb.responsiveEventsCanRun($('.essb_bottombar'))) {
var element = $('.essb_bottombar');
if (($(element).find('.essb_links').data('bottombar-appear') || '') != '' || ($(element).find('.essb_links').data('bottombar-disappear') || '') != '')
$(window).on('scroll', debounce(essb_bottombar_onscroll, 1));
}
//TODO: From here to add responsive events class
/**
* Display Method: Top Bar
*/
function essb_topbar_onscroll() {
var current_pos = $(window).scrollTop();
var height = $(document).height()-$(window).height();
var percentage = current_pos/height*100;
var element;
if ($(".essb_topbar").length)
element = $(".essb_topbar");
if (!element || typeof(element) == "undefined") return;
var value_appear = essb_int_value($(element).find('.essb_links').data('topbar-appear') || '');
var value_disappear = essb_int_value($(element).find('.essb_links').data('topbar-disappear') || '');
if (value_appear > 0 ) {
if (percentage >= value_appear && !element.hasClass("essb_active_topbar")) {
element.addClass("essb_active_topbar");
return;
}
if (percentage < value_appear && element.hasClass("essb_active_topbar")) {
element.removeClass("essb_active_topbar");
return;
}
}
if (value_disappear > 0) {
if (percentage >= value_disappear && !element.hasClass("hidden-float")) {
element.addClass("hidden-float");
element.css( {"opacity": "0"});
return;
}
if (percentage < value_disappear && element.hasClass("hidden-float")) {
element.removeClass("hidden-float");
element.css( {"opacity": "1"});
return;
}
}
}
if (essb.responsiveEventsCanRun($('.essb_topbar'))) {
if ($(".essb_topbar").length) {
var element = $(".essb_topbar");
if (($(element).find('.essb_links').data('topbar-appear') || '') != '' || ($(element).find('.essb_links').data('topbar-disappear') || '') != '')
$(window).on('scroll', debounce(essb_topbar_onscroll, 1));
}
}
/**
* Display Method: Post Vertical Float
*/
function essb_postfloat_onscroll() {
var current_pos = $(window).scrollTop();
var height = $(document).height()-$(window).height();
var percentage = current_pos/height*100;
var element;
if ($(".essb_displayed_postfloat").length)
element = $(".essb_displayed_postfloat");
if (!element || typeof(element) == "undefined") { return; }
var value_appear = essb_int_value($(element).data('postfloat-percent') || '');
if (value_appear > 0 ) {
if (percentage >= value_appear && !element.hasClass("essb_active_postfloat")) {
element.addClass("essb_active_postfloat");
return;
}
if (percentage < value_appear && element.hasClass("essb_active_postfloat")) {
element.removeClass("essb_active_postfloat");
return;
}
}
}
if (essb.responsiveEventsCanRun($('.essb_displayed_postfloat'))) {
if ((essb_settings.postfloat_percent || '') != '' && $(".essb_displayed_postfloat").length)
$(window).on('scroll', debounce(essb_postfloat_onscroll, 1));
}
/**
* Animated Counters Code
*/
$(".essb_counters .essb_animated").each(function() {
var current_counter = $(this).attr("data-cnt") || "";
var current_counter_result = $(this).attr("data-cnt-short") || "";
if ($(this).hasClass("essb_counter_hidden")) return;
$(this).countTo({
from: 1,
to: current_counter,
speed: 500,
onComplete: function (value) {
$(this).html(current_counter_result);
}
});
});
/**
* Display Method: Follow Me
*/
if ($('.essb-followme').length) {
if ($('.essb-followme .essb_links').length) $('.essb-followme .essb_links').removeClass('essb_displayed_followme');
var dataPosition = $('.essb-followme').attr('data-position') || '',
dataCustomTop = $('.essb-followme').attr('data-top') || '',
dataBackground = $('.essb-followme').attr('data-background') || '',
dataFull = $('.essb-followme').attr('data-full') || '',
dataAvoidLeftMargin = $('.essb-followme').attr('data-avoid-left') || '',
dataFollowmeHide = $('.essb-followme').attr('data-hide') || '';
if (dataPosition == 'top' && dataCustomTop != '')
$('.essb-followme').css({'top': dataCustomTop+'px'});
if (dataBackground != '')
$('.essb-followme').css({ 'background-color': dataBackground});
if (dataFull != '1' && dataPosition != 'left') {
var basicWidth = $('.essb_displayed_followme').width();
var leftPosition = $('.essb_displayed_followme').position().left;
if (dataAvoidLeftMargin != 'true')
$('.essb-followme .essb_links').attr('style', 'width:'+ basicWidth+'px; margin-left:'+leftPosition+'px !important;');
else
$('.essb-followme .essb_links').attr('style', 'width:'+ basicWidth+'px;');
}
function essb_followme_scroll() {
var isOneVisible = false,
dataFollowmeShowAfter = $('.essb-followme').attr('data-showafter') || '';
if (dataFollowmeShowAfter != '' && !Number(dataFollowmeShowAfter)) dataFollowmeShowAfter = '';
$('.essb_displayed_followme').each(function() {
if (isElementInViewport($(this)))
isOneVisible = true;
});
var current_pos = $(window).scrollTop();
var height = $(document).height() - $(window).height();
var percentage = current_pos / height * 100;
if (Number(dataFollowmeShowAfter) > 0 && Number(dataFollowmeShowAfter) > current_pos) isOneVisible = true;
if (!isOneVisible) {
if (!$('.essb-followme').hasClass('active')) $('.essb-followme').addClass('active');
}
else {
if ($('.essb-followme').hasClass('active')) $('.essb-followme').removeClass('active');
}
if (dataFollowmeHide != '') {
if (percentage > 95) {
if (!$('.essb-followme').hasClass('essb-followme-hiddenend')) {
$('.essb-followme').addClass('essb-followme-hiddenend');
$('.essb-followme').slideUp(100);
}
}
else {
if ($('.essb-followme').hasClass('essb-followme-hiddenend')) {
$('.essb-followme').removeClass('essb-followme-hiddenend');
$('.essb-followme').slideDown(100);
}
}
}
}
$(window).on('scroll', debounce(essb_followme_scroll, 1));
// execute one time after load
essb_followme_scroll();
}
if ($('.essb-point').length) {
var essb_point_triggered = false;
var essb_point_trigger_mode = "";
var essb_point_trigger_open_onscroll = function() {
var current_pos = $(window).scrollTop() + $(window).height() - 200;
var top = $('.essb_break_scroll').offset().top - parseFloat($('.essb_break_scroll').css('marginTop').replace(/auto/, 0));
if (essb_point_trigger_mode == 'end') {
if (current_pos >= top && !essb_point_triggered) {
if (!$('.essb-point-share-buttons').hasClass('essb-point-share-buttons-active')) {
$('.essb-point-share-buttons').addClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').toggleClass('essb-point-open');
essb_point_triggered = true;
if (essb_point_autoclose > 0) {
setTimeout(function() {
$('.essb-point-share-buttons').removeClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').removeClass('essb-point-open');
}, essb_point_autoclose * 1000)
}
}
}
}
if (essb_point_trigger_mode == 'middle') {
var percentage = current_pos * 100 / top;
if (percentage > 49 && !essb_point_triggered) {
if (!$('.essb-point-share-buttons').hasClass('essb-point-share-buttons-active')) {
$('.essb-point-share-buttons').addClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').toggleClass('essb-point-open');
essb_point_triggered = true;
if (essb_point_autoclose > 0) {
setTimeout(function() {
$('.essb-point-share-buttons').removeClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').removeClass('essb-point-open');
}, essb_point_autoclose * 1000)
}
}
}
}
}
var essb_point_onscroll = $('.essb-point').attr('data-trigger-scroll') || "";
var essb_point_mode = $('.essb-point').attr('data-point-type') || "simple";
var essb_point_autoclose = Number($('.essb-point').attr('data-autoclose') || 0) || 0;
if (essb.responsiveEventsCanRun($('.essb-point'))) {
if (essb_point_onscroll == 'end' || essb_point_onscroll == 'middle') {
essb_point_trigger_mode = essb_point_onscroll;
$(window).on('scroll', essb_point_trigger_open_onscroll);
}
}
$(".essb-point").on('click', function(){
$('.essb-point-share-buttons').toggleClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').toggleClass('essb-point-open');
if (essb_point_autoclose > 0) {
setTimeout(function() {
$('.essb-point-share-buttons').removeClass('essb-point-share-buttons-active');
if (essb_point_mode != 'simple') $('.essb-point').removeClass('essb-point-open');
}, essb_point_autoclose * 1000)
}
});
}
/**
* Display Method: Corner Bar
*/
if ($('.essb-cornerbar').length) {
if ($('.essb-cornerbar .essb_links').length) $('.essb-cornerbar .essb_links').removeClass('essb_displayed_cornerbar');
var dataCornerBarShow = $('.essb-cornerbar').attr('data-show') || '',
dataCornerBarHide = $('.essb-cornerbar').attr('data-hide') || '';
function essb_cornerbar_scroll() {
var current_pos = $(window).scrollTop();
var height = $(document).height() - $(window).height();
var percentage = current_pos / height * 100,
breakPercent = dataCornerBarShow == 'onscroll' ? 5 : 45;
if (dataCornerBarShow == 'onscroll' || dataCornerBarShow == 'onscroll50') {
if (percentage > breakPercent) {
if ($('.essb-cornerbar').hasClass('essb-cornerbar-hidden')) $('.essb-cornerbar').removeClass('essb-cornerbar-hidden');
}
else {
if (!$('.essb-cornerbar').hasClass('essb-cornerbar-hidden')) $('.essb-cornerbar').addClass('essb-cornerbar-hidden');
}
}
if (dataCornerBarShow == 'content') {
var isOneVisible = false;
$('.essb_displayed_top').each(function() {
if (isElementInViewport($(this)))
isOneVisible = true;
});
$('.essb_displayed_bottom').each(function() {
if (isElementInViewport($(this)))
isOneVisible = true;
});
if (!isOneVisible) {
if ($('.essb-cornerbar').hasClass('essb-cornerbar-hidden')) $('.essb-cornerbar').removeClass('essb-cornerbar-hidden');
}
else {
if (!$('.essb-cornerbar').hasClass('essb-cornerbar-hidden')) $('.essb-cornerbar').addClass('essb-cornerbar-hidden');
}
}
if (dataCornerBarHide != '') {
if (percentage > 90) {
if (!$('.essb-cornerbar').hasClass('essb-cornerbar-hiddenend')) $('.essb-cornerbar').addClass('essb-cornerbar-hiddenend');
}
else {
if ($('.essb-cornerbar').hasClass('essb-cornerbar-hiddenend')) $('.essb-cornerbar').removeClass('essb-cornerbar-hiddenend');
}
}
}
if (essb.responsiveEventsCanRun($('.essb-cornerbar'))) {
if (dataCornerBarHide != '' || dataCornerBarShow != '')
$(window).on('scroll', debounce(essb_cornerbar_scroll, 1));
if (dataCornerBarShow == 'content') essb_cornerbar_scroll();
}
}
/**
* Display Method: Share Booster
*/
if ($('.essb-sharebooster').length) {
function essb_booster_trigger() {
if (booster_shown) return;
$('.essb-sharebooster').center();
$('.essb-sharebooster').fadeIn(400);
$('.essb-sharebooster-overlay').fadeIn(200);
$('body').addClass('essb-sharebooster-preventscroll');
booster_shown = true;
if (Number(booster_autoclose))
setTimeout(essb_booster_close, Number(booster_autoclose) * 1000);
}
function essb_booster_close() {
$('.essb-sharebooster').fadeOut(200);
$('.essb-sharebooster-overlay').fadeOut(400);
$('body').removeClass('essb-sharebooster-preventscroll');
}
function essb_booster_close_from_action() {
var boosterCookieKey = booster_donotshow == 'all' ? 'essb_booster_all' : 'essb_booster_' + essb_settings.post_id;
essb.setCookie(boosterCookieKey, "yes", Number(booster_hide));
essb_booster_close();
}
window.essb_booster_close_from_action = essb_booster_close_from_action;
function essb_booster_scroll() {
var current_pos = $(window).scrollTop();
var height = $(document).height() - $(window).height();
var percentage = current_pos / height * 100,
breakPercent = booster_scroll;
if (percentage > breakPercent)
essb_booster_trigger();
}
var booster_trigger = $('.essb-sharebooster').attr('data-trigger') || '',
booster_time = $('.essb-sharebooster').attr('data-trigger-time') || '',
booster_scroll = $('.essb-sharebooster').attr('data-trigger-scroll') || '',
booster_hide = $('.essb-sharebooster').attr('data-donotshow') || '',
booster_donotshow = $('.essb-sharebooster').attr('data-donotshowon') || '',
booster_autoclose = $('.essb-sharebooster').attr('data-autoclose') || '',
booster_shown = false;
if (!Number(booster_hide)) booster_hide = 7;
var boosterCookieKey = booster_donotshow == 'all' ? 'essb_booster_all' : 'essb_booster_' + essb_settings.post_id;
var cookie_set = essb.getCookie(boosterCookieKey);
// booster is already triggered
if (cookie_set) booster_trigger = 'disabled';
if (essb.responsiveEventsCanRun($('.essb-sharebooster'))) {
if (booster_trigger == '')
essb_booster_trigger();
if (booster_trigger == 'time')
setTimeout(essb_booster_trigger, Number(booster_time) * 1000)
if (booster_trigger == 'scroll')
$(window).on('scroll', debounce(essb_booster_scroll, 1));
}
if ($('.essb-sharebooster-close').length) {
$('.essb-sharebooster-close').on('click', function(e){
e.preventDefault();
essb_booster_close();
});
}
}
/**
* Click2Chat
*/
if ($('.essb-click2chat').length) {
$('.essb-click2chat').on('click', function(event) {
event.preventDefault();
$('.essb-click2chat-window').toggleClass('active');
});
if ($('.essb-click2chat-window .chat-close').length) {
$('.essb-click2chat-window .chat-close').on('click', function(event) {
event.preventDefault();
$('.essb-click2chat-window').toggleClass('active');
});
}
$('.essb-click2chat-window .operator').each(function() {
$(this).on('click', function(event) {
event.preventDefault();
var app = $(this).attr('data-app') || '',
number = $(this).attr('data-number') || '',
message = $(this).attr('data-message') || '',
cmd = '';
var instance_mobile = false;
if( (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent) ) {
instance_mobile = true;
}
if (app == 'whatsapp') {
cmd = 'https://api.whatsapp.com/send?phone='+number+'&text=' + message;
}
if (app == 'viber') {
cmd = 'viber://chat?number='+number+'&text=' + message;
}
if (app == 'email') {
cmd = 'mailto:'+number+'&body=' + message;
}
if (app == 'phone') {
cmd = 'tel:'+number;
}
if (instance_mobile) window.location.href = cmd;
else {
window.open(cmd, '_blank');
}
});
});
}
/**
* Applying additional Pinterest optimizations for images
*/
if (essb_settings.force_pin_description && essb_settings.pin_description) {
$('img').each(function() {
if (!$(this).data('pin-description')) $(this).attr('data-pin-description', essb_settings.pin_description);
});
}
if (essb_settings.pin_pinid_active && essb_settings.pin_pinid) {
$('img').each(function() {
var hasPinID = $(this).data('pin-id') || '';
if (!hasPinID || hasPinID == '') $(this).attr('data-pin-id', essb_settings.pin_pinid);
});
}
if (essb_settings.pin_force_active && essb_settings.pin_force_image) {
$('img').each(function() {
$(this).attr('data-pin-media', essb_settings.pin_force_image);
/**
* Forcing all custom parameters too
*/
if (!$(this).data('pin-description')) {
var pinDescription = '';
if ($(this).attr('title')) pinDescription = $(this).attr('title');
else if ($(this).attr('alt')) pinDescription = $(this).attr('alt');
// give always priority of the custom description if set
if (essbPinImages.force_custompin && !essbPinImages.custompin) essbPinImages.custompin = document.title;
if (essbPinImages.custompin) pinDescription = essbPinImages.custompin;
// if title is not genenrated it will use the Document Title
if (pinDescription == '') pinDescription = document.title;
$(this).attr('data-pin-description', pinDescription);
}
if (!$(this).data('pin-url')) $(this).attr('data-pin-url', encodeURI(document.URL));
});
}
/**
* Pinterest Pro Gutenberg images integration
*/
$('.essb-block-image').each(function() {
var pinID = $(this).data('essb-pin-id') || '',
pinDesc = $(this).data('essb-pin-description') || '',
pinAvoid = $(this).data('essb-pin-nopin') || '';
if (pinAvoid.toString() == 'true') {
$(this).find('img').attr('data-pin-nopin', 'true');
$(this).find('img').addClass('no_pin');
return;
}
if (pinID != '') $(this).find('img').attr('data-pin-id', pinID);
if (pinDesc != '') $(this).find('img').attr('data-pin-description', pinDesc);
});
/**
* Pinterest responsive thumbnail correction
*/
if (essb_settings.force_pin_thumbs) {
// setting up a map of parsing images on site
var essbReposiveImagesMap = window.essbReposiveImagesMap = {};
// getting actual size of a single image
var essbDetectAndLocateImageSize = window.essbDetectAndLocateImageSize = function(url, element, isResponsive) {
if (isResponsive) {
essbReposiveImagesMap[element].responsive[url] = {};
}
$("", {
load: function() {
if (essbReposiveImagesMap[element]) {
if (!isResponsive) {
essbReposiveImagesMap[element].originalSize = { 'w': this.width, 'h': this.height, 'done': true };
essbCompileTheDataPinImage(element);
} else {
essbReposiveImagesMap[element].responsive[url] = { 'w': this.width, 'h': this.height, 'done': true };
essbCompileTheDataPinImage(element);
}
}
},
src: url
});
};
var essbCompileTheDataPinImage = window.essbCompileTheDataPinImage = function(element) {
var totalImages = 0,
processImages = 0,
currentMaxW = 0,
imageURL = '';
for (var rImageURL in essbReposiveImagesMap[element].responsive) {
var dataObj = essbReposiveImagesMap[element].responsive[rImageURL] || {};
totalImages++;
if (!dataObj.done) continue;
processImages++;
if (currentMaxW == 0 || currentMaxW < dataObj.w) {
currentMaxW = dataObj.w;
imageURL = rImageURL;
}
}
if (totalImages == processImages && essbReposiveImagesMap[element].original != imageURL) {
if (essbReposiveImagesMap[element].originalSize.done) {
if (currentMaxW > essbReposiveImagesMap[element].originalSize.w) {
$('[data-pinpro-key="' + element + '"]').attr('data-pin-media', imageURL);
$('[data-pinpro-key="' + element + '"]').attr('data-media', imageURL);
$('[data-pinpro-key="' + element + '"]').attr('data-pin-url', window.location.href);
$('[data-pinpro-key="' + element + '"]').removeClass('pin-process');
$('[data-pinpro-key="' + element + '"]').each(essbPinImagesGenerateButtons);
}
}
}
}
$('img').each(function() {
var responsiveImages = $(this).attr('srcset') || '',
uniqueID = Math.random().toString(36).substr(2, 9),
element = uniqueID;
if (!responsiveImages || responsiveImages == '') return;
$(this).attr('data-pinpro-key', uniqueID);
$(this).addClass('pin-process');
var responsiveSet = responsiveImages.split(', '),
originalImage = $(this).attr('src') || '',
foundReponsiveImage = '',
foundReponsiveSize = 0;
essbReposiveImagesMap[element] = {
source: element,
original: originalImage,
originalSize: {},
responsive: {}
};
essbDetectAndLocateImageSize(originalImage, element);
for (var i = 0; i < responsiveSet.length; i++) {
if (!responsiveSet[i]) continue;
var imageData = responsiveSet[i].split(' '),
imageURL = imageData[0] || '',
imageSize = (imageData[1] || '').replace('w', '');
if (!imageURL || !Number(imageSize)) continue;
essbDetectAndLocateImageSize(imageURL, element, true);
}
});
} // end forcing generation of responsive images
/**
* Pinterest Images
*/
var essbPinImagesGenerateButtons = function() {
var image = $(this);
// the option to avoid button over images with links
if (essbPinImages.nolinks && $(image).parents().filter("a").length) return;
// avoid buttons on images that has lower size that setup
if (image.outerWidth() < Number(essbPinImages.min_width || 0) || image.outerHeight() < Number(essbPinImages.min_height || 0)) return;
// ignore the non Pinable images
if (image.hasClass('no_pin') || image.hasClass('no-pin') || image.data('pin-nopin') || image.hasClass('pin-generated') || image.hasClass('pin-process') || image.hasClass('zoomImg') || image.hasClass('lazy-hidden')) return;
var pinSrc = $(image).prop('src') || '',
pinDescription = '', shareBtnCode = [],
buttonStyleClasses = '', buttonSizeClasses = '',
pinID = $(image).data('pin-id') || '';
// additional check for the autoptimize svg placeholder preventing images from load
// Pinterest also does not accept SVG images
if (pinSrc.indexOf('data:image/svg+xml') > -1 || pinSrc.indexOf('data:image/gif') > -1) return;
if (image.data('media')) pinSrc = image.data('media');
if (image.data('lazy-src')) pinSrc = image.data('lazy-src');
if (image.data('pin-media')) pinSrc = image.data('pin-media');
if (image.data("pin-description")) pinDescription = image.data("pin-description");
else if (image.attr('title')) pinDescription = image.attr('title');
else if (image.attr('alt')) pinDescription = image.attr('alt');
// give always priority of the custom description if set
if (essbPinImages.force_custompin && !essbPinImages.custompin) essbPinImages.custompin = document.title;
if (essbPinImages.custompin) pinDescription = essbPinImages.custompin;
// if title is not genenrated it will use the Document Title
if (pinDescription == '') pinDescription = document.title;
var shareCmd = 'https://pinterest.com/pin/create/button/?url=' + encodeURI(document.URL) + '&is_video=false' + '&media=' + encodeURI(pinSrc) + '&description=' + encodeURIComponent(pinDescription);
if (essbPinImages.legacy_share_cmd)
shareCmd = 'https://pinterest.com/pin/create/bookmarklet/?url=' + encodeURI(document.URL) + '&media=' + encodeURI(pinSrc) + '&title=' + encodeURIComponent(pinDescription)+'&description=' + encodeURIComponent(pinDescription) + '&media=' + encodeURI(pinSrc);
if (pinID != '') shareCmd = 'https://www.pinterest.com/pin/'+pinID+'/repin/x/';
var imgClasses = image.attr('class'),
imgStyles = image.attr('style');
if (essbPinImages ['button_style'] == 'icon_hover') {
buttonStyleClasses = ' essb_hide_name';
}
if (essbPinImages ['button_style'] == 'icon') {
buttonStyleClasses = ' essb_force_hide_name essb_force_hide';
}
if (essbPinImages ['button_style'] == 'button_name') {
buttonStyleClasses = ' essb_hide_icon';
}
if (essbPinImages ['button_style'] == 'vertical') {
buttonStyleClasses = ' essb_vertical_name';
}
if (essbPinImages['button_size']) buttonSizeClasses = ' essb_size_' + essbPinImages['button_size'];
if (essbPinImages['animation']) buttonSizeClasses += ' ' + essbPinImages['animation'];
if (essbPinImages['position']) buttonSizeClasses += ' essb_pos_' + essbPinImages['position'];
if (essbPinImages['mobile_position']) buttonSizeClasses += ' essb_mobilepos_' + essbPinImages['mobile_position'];
if (essbPinImages['visibility'] && essbPinImages['visibility'] == 'always') buttonSizeClasses += ' essb_always_visible';
image.removeClass().attr('style', '').wrap('');
if (imgClasses != '') image.parent('.essb-pin').addClass(imgClasses);
if (imgStyles != '') image.parent('.essb-pin').attr('style', imgStyles);
if (essbPinImages.reposition) {
var imgWidth = $(image).width();
if (Number(imgWidth) && !isNaN(imgWidth) && Number(imgWidth) > 0) {
image.parent('.essb-pin').css({'max-width': imgWidth+'px'});
}
}
var uid = (new Date().getTime()).toString(36);
shareBtnCode.push('');
image.after(shareBtnCode.join(''));
image.addClass('pin-generated'); // adding class to avoid generating again the same information
//essb.share_window
//removing the lazyloading class if posted
if (image.parent('.essb-pin').hasClass('lazyloading')) image.parent('.essb-pin').removeClass('lazyloading');
}
if (typeof(essbPinImages) != 'undefined' && $('body').hasClass('tcb-edit-mode')) essbPinImages.active = false;
if (typeof(essbPinImages) != 'undefined' && essbPinImages.active) {
// Begin detection of potential images and assign the pinterest generation
if (!essbPinImages.min_width || !Number(essbPinImages.min_width)) essbPinImages.min_width = 300;
if (!essbPinImages.min_height || !Number(essbPinImages.min_height)) essbPinImages.min_height = 300;
// Integration with the mobile minimal width and height (if set)
if ($(window).width() < 720) {
if (Number(essbPinImages.min_width_mobile)) essbPinImages.min_width = Number(essbPinImages.min_width_mobile);
if (Number(essbPinImages.min_height_mobile)) essbPinImages.min_height = Number(essbPinImages.min_height_mobile);
}
if ($('.essb-pin.tve_image').length) {
$('.essb-pin.tve_image .essb_links').remove();
$('.essb-pin img').removeClass('pin-generated');
}
// WP Rocket Lazy Videos set no-pin class to those images to prevent holding down
$('.rll-youtube-player img').each(function() {
$(this).addClass('no-pin');
});
// Hide on images option
if (essbPinImages.hideon) {
$(essbPinImages.hideon).each(function() {
$(this).addClass('no-pin');
});
}
window.addEventListener('LazyLoad::Initialized', function (e) {
$('.rll-youtube-player img').each(function() {
$(this).addClass('no-pin');
});
});
var essbPinImagesDetect = function() {
// WP Rocket Lazy Videos set no-pin class to those images to prevent holding down
$('.rll-youtube-player img').each(function() {
$(this).addClass('no-pin');
});
if (essbPinImages.selector) {
$(essbPinImages.selector).each(essbPinImagesGenerateButtons);
}
else {
if (!$('.essb-pinterest-images').length) return;
$('.essb-pinterest-images').parent().find('img').each(essbPinImagesGenerateButtons);
}
}
if (essbPinImages.lazyload) $(window).on('scroll', debounce(essbPinImagesDetect, 10));
setTimeout(essbPinImagesDetect, 1);
}
if ((typeof(essbPinImages) != 'undefined' && !essbPinImages.active) || typeof(essbPinImages) == 'undefined') {
if ($('.essb-pin.tve_image').length) {
$('.essb-pin.tve_image .essb_links').remove();
$('.essb-pin img').removeClass('pin-generated');
}
}
/**
* Reveal the social followers counter that comes with a transition effect
*/
if ($('.essbfc-container-sidebar').length) {
$(".essbfc-container-sidebar").each(function() {
if ($(this).hasClass("essbfc-container-sidebar-transition")) {
$(this).removeClass("essbfc-container-sidebar-transition");
}
});
}
/**
* Subscribe reCaptcha
*/
if ($('.essb-subscribe-captcha').length) {
$('.essb-subscribe-captcha').each(function() {
var id = $(this).attr('id') || '';
if (id == '') return;
// Maybe load reCAPTCHA.
if ( typeof(essb_subscribe_recaptcha) != 'undefined' && essb_subscribe_recaptcha && essb_subscribe_recaptcha.recaptchaSitekey ) {
grecaptcha.render( id, {
sitekey: essb_subscribe_recaptcha.recaptchaSitekey
} );
}
});
}
});
} )( jQuery );
// source --> https://roayahstudies.com/wp-includes/js/wp-embed.min.js?ver=5.5.4
/*! This file is auto-generated */
!function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;o https://roayahstudies.com/wp-content/plugins/elementor-pro/assets/lib/smartmenus/jquery.smartmenus.min.js?ver=1.0.1
/*! SmartMenus jQuery Plugin - v1.0.1 - November 1, 2016
* http://www.smartmenus.org/
* Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).unbind(e),mouseDetectionEnabled=!1);else{var i=!0,s=null;$(document).bind(getEventsNS([["mousemove",function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};return $.each(t,function(t,s){i[s[0].split(" ").join(e+" ")+e]=s[1]}),i}var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],i)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],i)),i+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],i)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1;if(s&&!s.is(":visible")){if(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&i)return this.itemActivate(e),this.menuHide(s),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),S=this.getViewportWidth(),b=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+S&&(e=g?f+S-r-y+e:w-r),g||(b>h&&I+h>v+b?i+=v+b-h-I:(h>=b||v>I)&&(i+=v-I)),g&&(I+h>v+b+.49||v>I)||!g&&h>b+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).bind({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var C=".smartmenus_scroll";t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).bind(getEventsNS([["mouseover",function(e){x.menuScrollOver(t,e)}],["mouseout",function(e){x.menuScrollOut(t,e)}],["mousewheel DOMMouseScroll",function(e){x.menuScrollMousewheel(t,e)}]],C)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()&&t.css({"touch-action":"none","-ms-touch-action":"none"}).bind(getEventsNS([[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(e){x.menuScrollTouch(t,e)}]],C))}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m}),this.menuIframeShim(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").css({zIndex:t.css("z-index"),width:r,height:h,marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.add(t.dataSM("ie-shim")).css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0).stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a");if((this.opts.keepHighlighted||this.isCollapsible())&&e.addClass("highlighted"),this.isCollapsible())t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var i=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),i>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").insertBefore(t)}var s=function(){t.css("overflow","")};this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,s):t.show(this.opts.collapsibleShowDuration,s):this.opts.showFunction?this.opts.showFunction.call(this,t,s):t.show(this.opts.showDuration,s),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0).stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e}),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:t,top:e}).insertBefore(this.$root);var i=this,s=function(){i.$root.css("overflow","")};this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}var dataOpts=this.data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}return this.each(function(){new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0},$});
// source --> https://roayahstudies.com/wp-content/plugins/mailchimp-for-wp/assets/js/forms.min.js?ver=4.8.1
!function a(o,s,u){function c(t,e){if(!s[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=s[t]={exports:{}};o[t][0].call(i.exports,function(e){return c(o[t][1][e]||e)},i,i.exports,a,o,s,u)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e https://roayahstudies.com/wp-content/plugins/pixel-caffeine/build/frontend.js?ver=2.1.4
!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=28)}([function(t,n){t.exports=jQuery},function(t,n,e){"use strict";var r=Array.isArray;t.exports=r},function(t,n,e){"use strict";function r(t,n){return o(t)?t:c(t,n)?[t]:i(u(t))}var o=e(1),c=e(35),i=e(40),u=e(69);t.exports=r},function(t,n,e){"use strict";var r=e(13),o=r.Symbol;t.exports=o},function(t,n,e){"use strict";var r=e(15),o=r(Object,"create");t.exports=o},function(t,n,e){"use strict";function r(t,n){for(var e=t.length;e--;)if(o(t[e][0],n))return e;return-1}var o=e(18);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=t.__data__;return o(n)?e["string"==typeof n?"string":"hash"]:e.map}var o=e(65);t.exports=r},,,,,function(t,n,e){"use strict";function r(t){return"symbol"==(void 0===t?"undefined":o(t))||i(t)&&c(t)==u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=e(12),i=e(14),u="[object Symbol]";t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?void 0===t?a:u:s&&s in Object(t)?c(t):i(t)}var o=e(3),c=e(38),i=e(39),u="[object Null]",a="[object Undefined]",s=o?o.toStringTag:void 0;t.exports=r},function(t,n,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(36),c="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,i=o||c||Function("return this")();t.exports=i},function(t,n,e){"use strict";function r(t){return null!=t&&"object"==(void 0===t?"undefined":o(t))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=c(t,n);return o(e)?e:void 0}var o=e(47),c=e(52);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return null!=t&&("object"==n||"function"==n)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t||o(t))return t;var n=t+"";return"0"==n&&1/t==-c?"-0":n}var o=e(11),c=1/0;t.exports=r},function(t,n,e){"use strict";function r(t,n){return t===n||t!==t&&n!==n}t.exports=r},function(t,n,e){"use strict";var r=e(15),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,n,e){"use strict";function r(t,n){var e=void 0===t?"undefined":o(t);return!!(n=null==n?c:n)&&("number"==e||"symbol"!=e&&i.test(t))&&t>-1&&t%1==0&&t-1}var o=e(5);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=this.__data__,r=o(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this}var o=e(5);t.exports=r},function(t,n,e){"use strict";var r=e(15),o=e(13),c=r(o,"Map");t.exports=c},function(t,n,e){"use strict";function r(t){var n=o(this,t).delete(t);return this.size-=n?1:0,n}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).get(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).has(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=o(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?"":o(t)}var o=e(70);t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t)return t;if(i(t))return c(t,r)+"";if(u(t))return f?f.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}var o=e(3),c=e(71),i=e(1),u=e(11),a=1/0,s=o?o.prototype:void 0,f=s?s.toString:void 0;t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=r},function(t,n,e){"use strict";function r(t){return i(c(t,void 0,o),t+"")}var o=e(81),c=e(85),i=e(87);t.exports=r},function(t,n,e){"use strict";function r(t){return(null==t?0:t.length)?o(t,1):[]}var o=e(82);t.exports=r},function(t,n,e){"use strict";function r(t,n,e,i,u){var a=-1,s=t.length;for(e||(e=c),u||(u=[]);++a0&&e(f)?n>1?r(f,n-1,e,i,u):o(u,f):i||(u[u.length]=f)}return u}var o=e(83),c=e(84);t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=n.length,o=t.length;++e0){if(++n>=o)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var o=800,c=16,i=Date.now;t.exports=r}]);
// source --> https://roayahstudies.com/wp-content/plugins/elementor/assets/js/frontend-modules.min.js?ver=3.0.14
/*! elementor - v3.0.14 - 25-11-2020 */
!function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__webpack_require__.d(n,r,function(e){return t[e]}.bind(null,r));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=927)}([function(t,e){t.exports=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){t.exports=n(152)},function(t,e){t.exports=function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(1);function _defineProperties(t,e){for(var n=0;n1?arguments[1]:void 0)}}),n(90)("find")},function(t,e,n){t.exports=n(202)},function(t,e,n){var r=n(116),o=n(186),i=n(189);function _get(e,n,u){return"undefined"!=typeof Reflect&&o?t.exports=_get=o:t.exports=_get=function _get(t,e,n){var o=i(t,e);if(o){var u=r(o,e);return u.get?u.get.call(n):u.value}},_get(e,n,u||e)}t.exports=_get},,function(t,e,n){t.exports=!n(36)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(35);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(51),o=n(106);t.exports=n(28)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(65);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports={}},,function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(112),o=n(74);t.exports=Object.keys||function keys(t){return r(t,o)}},function(t,e,n){var r=n(18),o=n(58),i=n(30),u=n(39),c=n(81),$export=function(t,e,n){var s,a,f,l,p=t&$export.F,v=t&$export.G,d=t&$export.S,h=t&$export.P,g=t&$export.B,y=v?r:d?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),_=m.prototype||(m.prototype={});for(s in v&&(n=e),n)f=((a=!p&&y&&void 0!==y[s])?y:n)[s],l=g&&a?c(f,r):h&&"function"==typeof f?c(Function.call,f):f,y&&u(y,s,f,t&$export.U),m[s]!=f&&i(m,s,l),h&&_[s]!=f&&(_[s]=f)};r.core=o,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,t.exports=$export},function(t,e,n){var r=n(18),o=n(30),i=n(64),u=n(77)("src"),c=n(147),s=(""+c).split("toString");n(58).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,u)||o(n,u,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&this[u]||c.call(this)}))},function(t,e,n){var r=n(51).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(28)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},,function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e){t.exports=function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(60),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),o=n(131),i=n(74),u=n(70)("IE_PROTO"),Empty=function(){},createDict=function(){var t,e=n(88)("iframe"),r=i.length;for(e.style.display="none",n(132).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("