// source --> https://aremi.mx/wp-content/plugins/no-right-click-images-plugin/no-right-click-images.js 
/**********************************************

No Right Click Images plugin
by Keith P. Graham

Plugin URI: http://www.BlogsEye.com/
Description: Uses Javascript to prevent right clicking of images to help keep leaches from copying images
Version: 3.4
Author: Keith P. Graham
Author URI: http://www.BlogsEye.com/

This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


***********************************************/
	document.addEventListener("contextmenu",kpg_nrci_cm, false);
	
	if (nrci_opts['drag']=='Y') {
		document.addEventListener("dragstart",kpg_nrci_cm, false);
		document.addEventListener("touchmove",kpg_nrci_cm, false); /* same as drag? */
	}
	if (nrci_opts['touch']=='Y') {
		document.addEventListener("touchstart",kpg_nrci_cm, false);
	}
	if (nrci_opts['gesture']=='Y') {
		document.addEventListener("gesturestart",kpg_nrci_cm, false);
	}


function kpg_nrci_block(event) {
	event.cancelBubble = true;
	if(event.preventDefault != undefined) {
		event.preventDefault();
	}
	if(event.stopPropagation != undefined) {
		event.stopPropagation();
	}
	return false;
}
function kpg_nrci_cm(event) {
	try {
		if (event.target.tagName == "IMG") {
			//alert("in IMG");
			event.cancelBubble = true;
			if(event.preventDefault != undefined) {
				event.preventDefault();
			}
			if(event.stopPropagation != undefined) {
				event.stopPropagation();
			}
			//console.log('in img tag');
			return false;
		} 
	} catch(error) {
		console.log("NRI error:"+error);
	}

	try {
		if(event.target.getAttribute("style")==null || 
			event.target.getAttribute("style")=="") {
				return true;
		}
		if  (event.target.style.backgroundImage != null 
			&& event.target.style.backgroundImage != 'none' 
			&& event.target.style.backgroundImage != '') {
				event.cancelBubble = true;
				if(event.preventDefault != undefined) {
					event.preventDefault();
				}
				if(event.stopPropagation != undefined) {
					event.stopPropagation();
				}
				return false;
		}
	} catch(error) {
		console.log("NRI error:"+error);
	}
	return true;
	
};
// source --> https://aremi.mx/wp-content/plugins/armember-membership/js/jquery.bpopup.min.js?ver=3.4.6 
(function(c){c.fn.bPopup=function(A,E){function L(){a.contentContainer=c(a.contentContainer||b);switch(a.content){case "iframe":var d=c('<iframe class="b-iframe" '+a.iframeAttr+"></iframe>");d.appendTo(a.contentContainer);t=b.outerHeight(!0);u=b.outerWidth(!0);B();d.attr("src",a.loadUrl);l(a.loadCallback);break;case "image":B();c("<img />").load(function(){l(a.loadCallback);F(c(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:B(),c('<div class="b-ajax-wrapper"></div>').load(a.loadUrl,a.loadData,function(d,b,e){l(a.loadCallback,b);F(c(this))}).hide().appendTo(a.contentContainer)}}function B(){a.modal&&c('<div class="b-modal '+e+'"></div>').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+v}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);C();b.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?f.scrollLeft()+w:-1*(x+u):m(!(!a.follow[0]&&n||g)),position:a.positionStyle||"absolute",top:"slideDown"==a.transition||"slideUp"==a.transition?"slideUp"==a.transition?f.scrollTop()+y:z+-1*t:p(!(!a.follow[1]&&q||g)),"z-index":a.zIndex+v+1}).each(function(){a.appending&&c(this).appendTo(a.appendTo)});G(!0)}function r(){a.modal&&c(".b-modal."+b.data("id")).fadeTo(a.speed,0,function(){c(this).remove()});a.scrollBar||c("html").css("overflow","auto");c(".b-modal."+e).unbind("click");f.unbind("keydown."+e);k.unbind("."+e).data("bPopup",0<k.data("bPopup")-1?k.data("bPopup")-1:null);b.undelegate(".bClose, ."+a.closeClass,"click."+e,r).data("bPopup",null);clearTimeout(H);G();return!1}function I(d){y=k.height();w=k.width();h=D();if(h.x||h.y)clearTimeout(J),J=setTimeout(function(){C();d=d||a.followSpeed;var e={};h.x&&(e.left=a.follow[0]?m(!0):"auto");h.y&&(e.top=a.follow[1]?p(!0):"auto");b.dequeue().each(function(){g?c(this).css({left:x,top:z}):c(this).animate(e,d,a.followEasing)})},50)}function F(d){var c=d.width(),e=d.height(),f={};a.contentContainer.css({height:e,width:c});e>=b.height()&&(f.height=b.height());c>=b.width()&&(f.width=b.width());t=b.outerHeight(!0);u=b.outerWidth(!0);C();a.contentContainer.css({height:"auto",width:"auto"});f.left=m(!(!a.follow[0]&&n||g));f.top=p(!(!a.follow[1]&&q||g));b.animate(f,250,function(){d.show();h=D()})}function M(){k.data("bPopup",v);b.delegate(".bClose, ."+a.closeClass,"click."+e,r);a.modalClose&&c(".b-modal."+e).css("cursor","pointer").bind("click",r);N||!a.follow[0]&&!a.follow[1]||k.bind("scroll."+e,function(){if(h.x||h.y){var d={};h.x&&(d.left=a.follow[0]?m(!g):"auto");h.y&&(d.top=a.follow[1]?p(!g):"auto");b.dequeue().animate(d,a.followSpeed,a.followEasing)}}).bind("resize."+e,function(){I()});a.escClose&&f.bind("keydown."+e,function(a){27==a.which&&r()})}function G(d){function c(e){b.css({display:"block",opacity:1}).animate(e,a.speed,a.easing,function(){K(d)})}switch(d?a.transition:a.transitionClose||a.transition){case "slideIn":c({left:d?m(!(!a.follow[0]&&n||g)):f.scrollLeft()-(u||b.outerWidth(!0))-200});break;case "slideBack":c({left:d?m(!(!a.follow[0]&&n||g)):f.scrollLeft()+w+200});break;case "slideDown":c({top:d?p(!(!a.follow[1]&&q||g)):f.scrollTop()-(t||b.outerHeight(!0))-200});break;case "slideUp":c({top:d?p(!(!a.follow[1]&&q||g)):f.scrollTop()+y+200});break;default:b.stop().fadeTo(a.speed,d?1:0,function(){K(d)})}}function K(d){d?(M(),l(E),a.autoClose&&(H=setTimeout(r,a.autoClose))):(b.hide(),l(a.onClose),a.loadUrl&&(a.contentContainer.empty(),b.css({height:"auto",width:"auto"})))}function m(a){return a?x+f.scrollLeft():x}function p(a){return a?z+f.scrollTop():z}function l(a,e){c.isFunction(a)&&a.call(b,e)}function C(){z=q?a.position[1]:Math.max(0,(y-b.outerHeight(!0))/2-a.amsl);x=n?a.position[0]:(w-b.outerWidth(!0))/2;h=D()}function D(){return{x:w>b.outerWidth(!0),y:y>b.outerHeight(!0)}}c.isFunction(A)&&(E=A,A=null);var a=c.extend({},c.fn.bPopup.defaults,A);a.scrollBar||c("html").css("overflow","hidden");var b=this,f=c(document),k=c(window),y=k.height(),w=k.width(),N=/OS 6(_\d)+/i.test(navigator.userAgent),v=0,e,h,q,n,g,z,x,t,u,J,H;b.close=function(){r()};b.reposition=function(a){I(a)};return b.each(function(){c(this).data("bPopup")||(l(a.onOpen),v=(k.data("bPopup")||0)+1,e="__b-popup"+v+"__",q="auto"!==a.position[1],n="auto"!==a.position[0],g="fixed"===a.positionStyle,t=b.outerHeight(!0),u=b.outerWidth(!0),a.loadUrl?L():B())})};c.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",autoClose:!1,closeClass:"b-close",content:"ajax",contentContainer:!1,easing:"swing",escClose:!0,follow:[!0,!0],followEasing:"swing",followSpeed:500,iframeAttr:'scrolling="no" frameborder="0"',loadCallback:!1,loadData:!1,loadUrl:!1,modal:!0,modalClose:!0,modalColor:"#000",onClose:!1,onOpen:!1,opacity:.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,speed:250,transition:"fadeIn",transitionClose:!1,zIndex:9997}})(jQuery);
// source --> https://aremi.mx/wp-content/plugins/armember-membership/bootstrap/js/bootstrap.min.js?ver=3.4.6 
!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="arm_modal"]',"click.dismiss.arm_modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".arm_modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.arm_modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.arm_modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.arm_modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.arm_modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="arm_modal-backdrop '+d+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.arm_modal;a.fn.arm_modal=function(c){return this.each(function(){var d=a(this),e=d.data("arm_modal"),f=a.extend({},a.fn.arm_modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("arm_modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.arm_modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.arm_modal.Constructor=b,a.fn.arm_modal.noConflict=function(){return a.fn.arm_modal=c,this},a(document).on("click.arm_modal.data-api",'[data-toggle="arm_modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("arm_modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.arm_modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function d(){a(".dropdown-backdrop").remove(),a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=c&&a(c);if(!d||!d.length)d=b.parent();return d}var b="[data-toggle=arm_dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",d),f.toggleClass("open")),c.focus(),!1},keydown:function(c){var d,f,g,h,i,j;if(!/(38|40|27)/.test(c.keyCode))return;d=a(this),c.preventDefault(),c.stopPropagation();if(d.is(".disabled, :disabled"))return;h=e(d),i=h.hasClass("open");if(!i||i&&c.keyCode==27)return c.which==27&&h.find(b).focus(),d.click();f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length)return;j=f.index(f.filter(":focus")),c.keyCode==38&&j>0&&j--,c.keyCode==40&&j<f.length-1&&j++,~j||(j=0),f.eq(j).focus()}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",d).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle).on("keydown.dropdown.data-api",b+", [role=menu]",c.prototype.keydown)}(window.jQuery),!function(a){var b=function(a,b){this.init("armtooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" ");for(i=g.length;i--;)h=g[i],h=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):h!="manual"&&(e=h=="hover"?"mouseenter":"focus",f=h=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a.fn[this.type].defaults,d={},e;this._options&&a.each(this._options,function(a,b){c[a]!=b&&(d[a]=b)},this),e=a(b.currentTarget)[this.type](d).data(this.type);if(!e.options.delay||!e.options.delay.show)return e.show();clearTimeout(this.timeout),e.hoverState="in",this.timeout=setTimeout(function(){e.hoverState=="in"&&e.show()},e.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented())return;b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;switch(f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f,g,h,i;c.offset(a).addClass(b).addClass("in"),f=c[0].offsetWidth,g=c[0].offsetHeight,b=="top"&&g!=e&&(a.top=a.top+e-g,i=!0),b=="bottom"||b=="top"?(h=0,a.left<0&&(h=a.left*-2,a.left=0,c.offset(a),f=c[0].offsetWidth,g=c[0].offsetHeight),this.replaceArrow(h-d+f,f,"left")):this.replaceArrow(g-e,g,"top"),i&&c.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".armtooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function e(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?e():c.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".armtooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.armtooltip;a.fn.armtooltip=function(c){return this.each(function(){var d=a(this),e=d.data("armtooltip"),f=typeof c=="object"&&c;e||d.data("armtooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.armtooltip.Constructor=b,a.fn.armtooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="armtooltip"><div class="armtooltip-arrow"></div><div class="armtooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.armtooltip.noConflict=function(){return a.fn.armtooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" ");for(i=g.length;i--;)h=g[i],h=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):h!="manual"&&(e=h=="hover"?"mouseenter":"focus",f=h=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a.fn[this.type].defaults,d={},e;this._options&&a.each(this._options,function(a,b){c[a]!=b&&(d[a]=b)},this),e=a(b.currentTarget)[this.type](d).data(this.type);if(!e.options.delay||!e.options.delay.show)return e.show();clearTimeout(this.timeout),e.hoverState="in",this.timeout=setTimeout(function(){e.hoverState=="in"&&e.show()},e.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented())return;b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;switch(f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f,g,h,i;c.offset(a).addClass(b).addClass("in"),f=c[0].offsetWidth,g=c[0].offsetHeight,b=="top"&&g!=e&&(a.top=a.top+e-g,i=!0),b=="bottom"||b=="top"?(h=0,a.left<0&&(h=a.left*-2,a.left=0,c.offset(a),f=c[0].offsetWidth,g=c[0].offsetHeight),this.replaceArrow(h-d+f,f,"left")):this.replaceArrow(g-e,g,"top"),i&&c.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function e(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?e():c.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.armtooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=(typeof c.content=="function"?c.content.call(b[0]):c.content)||b.attr("data-content"),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.armtooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery);
// source --> https://aremi.mx/wp-content/plugins/armember-membership/js/arm_common.js?ver=3.4.6 
function armToast(e,r,a,t){""!=t&&void 0!==t||(t=!1),""!=a&&void 0!==a||(a=2500);var n="arm_error_message";"success"==r?n="arm_success_message":"error"!=r&&"info"!=r||(n="arm_error_message");e='<div class="arm_toast arm_message '+n+'" id="'+n+'"><div class="arm_message_text">'+e+"</div></div>";0<jQuery(".arm_toast_container .arm_toast").length&&jQuery(".arm_toast_container .arm_toast").remove(),jQuery(e).appendTo(".arm_toast_container").show("slow").addClass("arm_toast_open").delay(a).queue(function(){var e;"error"!=r&&"buddypress_error"!=r?(e=jQuery(this),jQuery(".arm_already_clicked").removeClass("arm_already_clicked").removeAttr("disabled"),e.addClass("arm_toast_close"),!0===t&&location.reload()):(e=jQuery(this)).addClass("arm_toast_close"),setTimeout(function(){e.remove()},1e3)})}function armCopyToClipboard(e){var r=document.createElement("textarea");r.id="armCopyTextarea",r.style.position="fixed",r.style.top=0,r.style.left=0,r.style.width="2em",r.style.height="2em",r.style.padding=0,r.style.border="none",r.style.outline="none",r.style.boxShadow="none",r.style.background="transparent",r.value=e,document.body.appendChild(r),r.select(),document.getElementById("armCopyTextarea").select();var e=!1;try{e=document.execCommand("copy")}catch(e){}return document.body.removeChild(r),e}function arm_reset_form_popup(e){var r;0<jQuery("."+e).find("form").length&&(r=jQuery("."+e).find("form").attr("id"),(e=angular.element(document.getElementById(r)).scope()).resetForm(e.arm_form,r),e.$apply())}function arm_adjust_form_popup(){jQuery(".arm_popup_member_form").each(function(){var e=jQuery(this).attr("data-width"),r=jQuery(window).height(),a=jQuery(window).width();a<e?(jQuery(this).css({top:"0"}),jQuery(this).addClass("popup_wrapper_responsive"),jQuery(this).find(".popup_content_text").css({height:r-65+"px"})):(r=jQuery(this).height()>r?jQuery(window).scrollTop()+50:jQuery(window).scrollTop()+(r-jQuery(this).height())/2,jQuery(this).css({top:r+"px"}),jQuery(this).removeClass("popup_wrapper_responsive"),r=jQuery(this).find(".popup_content_text").attr("data-height"),jQuery(this).find(".popup_content_text").css({height:r}));e=(a-e)/2;jQuery(this).css({left:e+"px"})}),jQuery(".arm_popup_member_setup_form").each(function(){var e=jQuery(this).attr("data-width"),r=jQuery(window).height(),a=jQuery(window).width();a<e?(jQuery(this).css({top:"0px"}),jQuery(this).addClass("popup_wrapper_responsive"),jQuery(this).find(".popup_content_text").css({height:r-65+"px"})):(r=jQuery(this).height()>r?jQuery(window).scrollTop()+50:jQuery(window).scrollTop()+(r-jQuery(this).height())/2,jQuery(this).css({top:r+"px"}),jQuery(this).removeClass("popup_wrapper_responsive"),r=jQuery(this).find(".popup_content_text").attr("data-height"),jQuery(this).find(".popup_content_text").css({height:r}));e=(a-e)/2;jQuery(this).css({left:e+"px"})})}function armSetupHideShowSections(e){var r,a=jQuery(e).find('[data-id="arm_front_gateway_skin_type"]').val(),t=(jQuery(e).find('[data-id="arm_front_plan_skin_type"]').val(),jQuery(e).find("input.arm_module_plan_input:checked")),n=t.val(),i=t.attr("data-type"),_=t.attr("data-cycle"),o=jQuery(e).find('[data-id="arm_user_selected_payment_mode_'+n+'"]').val(),s=jQuery(e).find('[data-id="arm_user_old_plan"]').val();r=null!=s&&s.search(",")?s.split(","):[];var m=jQuery(e).find('[data-id="arm_user_old_plan_total_cycle_'+n+'"]').val(),u=jQuery(e).find('[data-id="arm_user_last_payment_status_'+n+'"]').val(),c=jQuery(e).find('[data-id="arm_user_done_payment_'+n+'"]').val(),d=jQuery(e).find('[data-id="arm_user_selected_payment_cycle_'+n+'"]').val();"radio"==a?(l=jQuery(e).find(".arm_module_gateway_input:checked"),jQuery(e).find(".arm_module_gateway_input:checked").val()):(s=jQuery(e).find(".arm_module_gateway_input").attr("aria-owns"),l=jQuery("#"+s).find("md-option:selected"),jQuery("#"+s).find("md-option:selected").attr("value"));var l=l.attr("data-payment_mode");jQuery(e).find(".arm_module_plans_ul").find(".arm_setup_column_item").removeClass("arm_active"),jQuery(t).parents(".arm_setup_column_item").addClass("arm_active"),jQuery(e).find('input[name="arm_plan_type"]').val(i).trigger("change"),"free"==i?(jQuery(e).find(".arm_setup_gatewaybox_wrapper").hide("slow"),jQuery(e).find(".arm_payment_mode_wrapper").hide("slow"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")):("recurring"!=i||-1==jQuery.inArray(n,r)||m==c&&"infinite"!=m||"manual_subscription"!=o?("recurring"==i?"failed"==u?(jQuery(e).find(".arm_payment_mode_wrapper").hide(),jQuery(e).find('input:radio[name="payment_cycle_'+n+'"]').filter('[value="'+d+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")):(jQuery(e).find(".arm_module_payment_cycle_container").not(".arm_payment_cycle_box_"+n).slideUp("slow").addClass("arm_hide"),jQuery(e).find(".arm_payment_cycle_box_"+n).slideDown("slow").removeClass("arm_hide"),1<_?(jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideDown("slow").removeClass("arm_hide"),jQuery(e).find(".arm_setup_payment_cycle_title_wrapper").slideDown("slow").removeClass("arm_hide")):(jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide"),jQuery(e).find(".arm_setup_payment_cycle_title_wrapper").slideUp("slow").addClass("arm_hide")),_=jQuery(e).find('[data-id="arm_payment_cycle_plan_'+n+'"]').val(),jQuery(e).find(".arm_payment_cycle_box_"+n).find(".arm_module_cycle_input:radio").filter('[value="'+_+'"]').trigger("change")):jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide"),"both"==l&&"recurring"==i?(jQuery(e).find('input:radio[name="arm_selected_payment_mode"]').filter('[value="auto_debit_subscription"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_payment_mode_wrapper").show()):(jQuery(e).find('input:radio[name="arm_selected_payment_mode"]').filter('[value="'+l+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_payment_mode_wrapper").hide())):(jQuery(e).find(".arm_payment_mode_wrapper").hide(),jQuery(e).find('input:radio[name="payment_cycle_'+n+'"]').filter('[value="'+d+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")),jQuery(e).find(".arm_setup_gatewaybox_wrapper").show("slow")),armUpdateOrderAmount(e,0),"radio"==a&&(a=jQuery(e).find(".arm_module_gateway_input:radio:first").val(),angular.element("[data-ng-controller=ARMCtrl]").scope().arm_form.payment_gateway=a,jQuery(e).find(".arm_module_gateway_input:radio:first").trigger("change"))}function armSetupHideShowSections1(e,r){var a,t=jQuery(e).find('[data-id="arm_front_gateway_skin_type"]').val(),n=(jQuery(e).find('[data-id="arm_front_plan_skin_type"]').val(),r.attr("value")),i=r.attr("data-cycle"),_=jQuery(e).find('[data-id="arm_user_selected_payment_mode_'+n+'"]').val(),o=jQuery(e).find('[data-id="arm_user_old_plan"]').val();a=null!=o&&o.search(",")?o.split(","):[];var s=r.attr("data-type"),m=jQuery(e).find('[data-id="arm_user_old_plan_total_cycle_'+n+'"]').val(),u=jQuery(e).find('[data-id="arm_user_done_payment_'+n+'"]').val(),c=jQuery(e).find('[data-id="arm_user_selected_payment_cycle_'+n+'"]').val(),d=jQuery(e).find('[data-id="arm_user_last_payment_status_'+n+'"]').val();"radio"==t?(l=jQuery(e).find(".arm_module_gateway_input:checked"),jQuery(e).find(".arm_module_gateway_input:checked").val()):(o=jQuery(e).find(".arm_module_gateway_input").attr("aria-owns"),l=jQuery("#"+o).find("md-option:selected"),jQuery("#"+o).find("md-option:selected").attr("value"));var l=l.attr("data-payment_mode");jQuery(e).find('input[name="arm_plan_type"]').val(s).trigger("change"),"free"==s?(jQuery(e).find(".arm_setup_gatewaybox_wrapper").hide("slow"),jQuery(e).find(".arm_payment_mode_wrapper").hide("slow"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")):("recurring"!=s||-1==jQuery.inArray(n,a)||m==u&&"infinite"!=m||"manual_subscription"!=_?("recurring"==s?"failed"==d?(jQuery(e).find(".arm_payment_mode_wrapper").hide(),jQuery(e).find('input:radio[name="payment_cycle_'+n+'"]').filter('[value="'+c+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")):(jQuery(e).find(".arm_module_payment_cycle_container").not(".arm_payment_cycle_box_"+n).slideUp("slow").addClass("arm_hide"),jQuery(e).find(".arm_payment_cycle_box_"+n).slideDown("slow").removeClass("arm_hide"),1<i?(jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideDown("slow").removeClass("arm_hide"),jQuery(e).find(".arm_setup_payment_cycle_title_wrapper").slideDown("slow").removeClass("arm_hide")):(jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide"),jQuery(e).find(".arm_setup_payment_cycle_title_wrapper").slideUp("slow").addClass("arm_hide")),i=jQuery(e).find('[data-id="arm_payment_cycle_plan_'+n+'"]').val(),jQuery(e).find(".arm_payment_cycle_box_"+n).find(".arm_module_cycle_input:radio:[value="+i+"]").trigger("change")):jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide"),"both"==l&&"recurring"==s?(jQuery(e).find('input:radio[name="arm_selected_payment_mode"]').filter('[value="auto_debit_subscription"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_payment_mode_wrapper").show()):(jQuery(e).find('input:radio[name="arm_selected_payment_mode"]').filter('[value="'+l+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_payment_mode_wrapper").hide())):(jQuery(e).find(".arm_payment_mode_wrapper").hide(),jQuery(e).find('input:radio[name="payment_cycle_'+n+'"]').filter('[value="'+c+'"]').prop("checked",!0).trigger("change"),jQuery(e).find(".arm_setup_paymentcyclebox_wrapper").slideUp("slow").addClass("arm_hide")),jQuery(e).find(".arm_setup_gatewaybox_wrapper").show("slow")),armUpdateOrderAmount1(r,e,0),"radio"==t&&(t=jQuery(e).find(".arm_module_gateway_input:radio:first").val(),angular.element("[data-ng-controller=ARMCtrl]").scope().arm_form.payment_gateway=t,jQuery(e).find(".arm_module_gateway_input:radio:first").trigger("change"))}function armUpdateOrderAmount(e,r,a){angular.element("[data-ng-controller=ARMCtrl]").scope(),jQuery(e).find('[data-id="arm_front_plan_skin_type"]').val();var t=jQuery(e).find("input.arm_module_plan_input:checked"),n=0;0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()&&(n=1);var i="undefined"==(i=jQuery(e).find(".arm_global_currency").val())?"":i;jQuery(e).find(".arm_order_currency").text(i);var _=t.attr("data-plan_name"),o=t.attr("data-amt");jQuery(e).find(".arm_plan_name_text").text(_),1==n?(s=arm_get_amount_currency_wise_separator(o),jQuery(e).find(".arm_plan_amount_text").text(s)):jQuery(e).find(".arm_plan_amount_text").text(o);i=t.attr("data-is_trial"),_=jQuery(e).find('[data-id="arm_user_old_plan"]').val();0!=_&&""!=_&&(i="0");var s,_=t.attr("data-trial_amt");void 0!==_&&""!=_||(_="0.00"),null!=i&&"1"==i&&(o=_=t.attr("data-trial_amt")),1==n?(s=arm_get_amount_currency_wise_separator(_),jQuery(e).find(".arm_trial_amount_text").text(s)):jQuery(e).find(".arm_trial_amount_text").text(_),""!=a&&null!=a||(a=o),0!=r&&null!=r||(a=o),r=0==r||""==r||null==r?jQuery('[data-id="arm_zero_amount_discount"]').val():"-"+r;o="";"subscription"==t.attr("data-recurring")&&(o=jQuery(e).find("[name=arm_selected_payment_mode]:checked").val()),a<=0&&"auto_debit_subscription"!=o&&jQuery(e).find(".arm_module_gateway_fields").slideUp("slow").addClass("arm_hide"),jQuery(e).find(".arm_discount_amount_text").text(r),1==n?(s=arm_get_amount_currency_wise_separator(a),jQuery(e).find(".arm_payable_amount_text").text(s)):jQuery(e).find(".arm_payable_amount_text").text(a),jQuery(e).find('[data-id="arm_total_payable_amount"]').val(a)}function armUpdateOrderAmount1(e,r,a,t){var e=e,n="undefined"==(n=jQuery(r).find(".arm_global_currency").val())?"":n;jQuery(r).find(".arm_order_currency").text(n);var i=e.attr("data-plan_name"),_=e.attr("data-amt");jQuery(r).find(".arm_plan_name_text").text(i);var o=0;1==(o=0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()?1:o)?(m=arm_get_amount_currency_wise_separator(arm_discount_on_plan),jQuery(r).find(".arm_plan_amount_text").text(m)):jQuery(r).find(".arm_plan_amount_text").text(_);var s=e.attr("data-is_trial"),n=e.attr("data-trial_amt");void 0!==n&&""!=n||(n="0.00");i=jQuery(r).find('[data-id="arm_user_old_plan"]').val();null!=(s=0!=i&&""!=i?"0":s)&&"1"==s&&(_=n=e.attr("data-trial_amt")),1==o?(m=arm_get_amount_currency_wise_separator(n),jQuery(r).find(".arm_trial_amount_text").text(m)):jQuery(r).find(".arm_trial_amount_text").text(n),""!=t&&null!=t||(t=_),0!=a&&null!=a||(t=_),a=0==a||""==a||null==a?jQuery('[data-id="arm_zero_amount_discount"]').val():"-"+a;var m,_="";"subscription"==e.attr("data-recurring")&&(_=jQuery(r).find("[name=arm_selected_payment_mode]:checked").val()),t<=0&&"auto_debit_subscription"!=_&&jQuery(r).find(".arm_module_gateway_fields").hide("slow"),jQuery(r).find(".arm_discount_amount_text").text(a),1==o?(m=arm_get_amount_currency_wise_separator(t),jQuery(r).find(".arm_payable_amount_text").text(m)):jQuery(r).find(".arm_payable_amount_text").text(t),jQuery(r).find('[data-id="arm_total_payable_amount"]').val(t)}function armAnimateCounter(r){var e=jQuery(r).text(),a=0;0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()&&(a=1);var t=e=1==a?arm_get_amount_standard_separator(e):e;"string"==typeof e&&(e=e.replace(/,/g,""),e=(e=parseFloat(e)).toFixed(2)),jQuery(r).prop("Counter",0).animate({Counter:e},{duration:500,easing:"swing",step:function(e){jQuery(r).text(e.toFixed(2))},complete:function(){jQuery(r).text(e),setTimeout(function(){jQuery(r).text(t)},1)}})}function arm_tooltip_init(){jQuery.isFunction(jQuery().tipso)&&(jQuery(".armhelptip").each(function(){jQuery(this).tipso({position:"top",size:"small",background:"#939393",color:"#ffffff",width:!1,maxWidth:400,useTitle:!0})}),jQuery(".arm_helptip_icon").each(function(){jQuery(this).tipso({position:"top",size:"small",tooltipHover:!0,background:"#939393",color:"#ffffff",width:!1,maxWidth:400,useTitle:!0})}),jQuery(".arm_helptip_icon_ui").each(function(){jQuery.isFunction(jQuery().tooltip)&&jQuery(this).tooltip({tooltipClass:"arm_helptip_ui_content",position:{my:"center bottom-20",at:"center top",using:function(e,r){jQuery(this).css(e),jQuery("<div>").addClass("arm_arrow").addClass(r.vertical).addClass(r.horizontal).appendTo(this)}},content:function(){return jQuery(this).prop("title")},show:{duration:0},hide:{duration:0}})}),jQuery(".arm_email_helptip_icon").each(function(){jQuery(this).tipso({position:"left",size:"small",tooltipHover:!0,background:"#939393",color:"#ffffff",width:!1,maxWidth:400,useTitle:!0})}),jQuery(".armhelptip_front").each(function(){jQuery(this).tipso({position:"top",size:"small",background:"#939393",color:"#ffffff",width:!1,maxWidth:400,useTitle:!0})}))}function arm_transaction_init(){jQuery(".arm_transaction_list_header th.arm_sortable_th").each(function(){var r=jQuery(this).parents(".arm_user_transaction_list_table"),e=jQuery(this),a=e.index(),t=!1;e.click(function(){r.find("th").removeClass("armAsc").removeClass("armDesc"),r.find("td").filter(function(){return jQuery(this).index()===a}).armSortElements(function(e,r){return jQuery.text([e])>jQuery.text([r])?t?-1:1:t?1:-1},function(){return this.parentNode});var e=t?"armDesc":"armAsc";jQuery(this).addClass(e),t=!t})})}function arm_current_membership_init(){jQuery(".arm_current_membership_list_header th.arm_sortable_th").each(function(){var r=jQuery(this).parents(".arm_user_current_membership_list_table"),e=jQuery(this),a=e.index(),t=!1;e.click(function(){r.find("th").removeClass("armAsc").removeClass("armDesc"),r.find("td").filter(function(){return jQuery(this).index()===a}).armSortElements(function(e,r){return jQuery.text([e])>jQuery.text([r])?t?-1:1:t?1:-1},function(){return this.parentNode});var e=t?"armDesc":"armAsc";jQuery(this).addClass(e),t=!t})})}function arm_get_directory_list(r){var a,e;return void 0!==r&&(a=r.attr("data-temp"),e=r.serialize(),r.find("#arm_loader_img").show(),jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_directory_paging_action&"+e,beforeSend:function(){r.find(".arm_template_container").css("opacity","0.5")},success:function(e){return r.find(".arm_template_container").css("opacity","1"),r.find("#arm_loader_img").hide(),"infinite"==jQuery(".arm_template_wrapper_"+a).find(".arm_temp_field_pagination").val()?(jQuery(".arm_template_wrapper_"+a).find(".arm_user_block, .arm_directory_paging_container").remove(),jQuery(".arm_template_wrapper_"+a).find(".arm_template_container").prepend(e)):(jQuery(".arm_template_wrapper_"+a).replaceWith(e),0==jQuery(".arm_template_wrapper_"+a).parents(".arm_template_preview_popup").length&&jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(".arm_template_wrapper_"+a).offset().top-10},1e3)),arm_tooltip_init(),setTimeout(function(){armAdjustDirectoryTemplateBox()},100),!1}})),!1}function arm_hide_show_section(e,r){""!=r&&"checkbox"==jQuery(e).attr("type")&&(jQuery(e).is(":checked")?jQuery(r).show():jQuery(r).hide())}function arm_form_ajax_action(r){var a=jQuery(r).attr("data-random-id");jQuery(r).find('input[name="ARM_FILTER_INPUT"]');jQuery(r).find('input[name="ARM_FILTER_INPUT"]').remove(),jQuery(r).prepend('<input type="hidden" name="form_random_key" value="'+a+'" />');var e=jQuery(r).serialize();jQuery(r).find('input[name="form_random_key"]').remove();var t,n,i=window.location.href;e=0<=i.indexOf("key")&&0<=i.indexOf("login")&&0<=i.indexOf("action")?(i=(i=i.split("?")[1].split("&"))[0].match(/^(page_id)+.*$/)?(t=i[1].split("="),n=i[2].split("="),i[3].split("=")):(t=i[0].split("="),n=i[1].split("="),i[2].split("=")),"action=arm_shortcode_form_ajax_action&"+e+"&action2="+t[1]+"&key2="+n[1]+"&login2="+i[1]):"action=arm_shortcode_form_ajax_action&"+e,jQuery(".arm_form_message_container").html(""),jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:e,beforeSend:function(){jQuery(r).find("input[type='submit'], button[type='submit']").attr("disabled","disabled").addClass("active")},success:function(e){"success"==e.status?("rp"==e.is_action?(jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container").html(e.message).show(),jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container1").hide(),jQuery(r).hide()):(void 0!==e.script&&""!==e.script&&jQuery("body").append(e.script),"redirect"!=e.type?jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container").html(e.message).show().delay(5e3).fadeOut(2e3):window.location.href=e.message),jQuery(r).hasClass("arm_form_edit_profile")||"function"==typeof armResetFileUploader&&armResetFileUploader(r),jQuery(r).hasClass("arm_form_edit_profile")||"redirect"==e.type||jQuery(r).trigger("reset"),"redirect"!=e.type&&arm_reinit_session_var(r,__ARMAJAXURL,a)):(jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container").html(e.message).show().delay(5e3).fadeOut(2e3),jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container i.armfa-times").click(function(){jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container .arm_error_msg").delay(100).fadeOut(2e3)}),arm_reinit_session_var(r,__ARMAJAXURL,a)),"redirect"!=e.type&&(jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container").offset().top-50},1e3),jQuery(r).parent(".arm_member_form_container").find(".arm_form_message_container").html(e.message).show().delay(5e3).fadeOut(2e3)),jQuery(r).find("input[type='submit'], button[type='submit']").removeAttr("disabled").removeClass("active")}})}function arm_setup_form_ajax_action(a){var t=jQuery(a).attr("data-random-id");jQuery(a).find('input[name="ARM_FILTER_INPUT"]');jQuery(a).find('input[name="ARM_FILTER_INPUT"]').remove(),jQuery(a).prepend('<input type="hidden" name="form_random_key" value="'+t+'" />');var n=jQuery(a).parents(".arm_setup_form_container"),e=jQuery(a).serialize();jQuery('input[name="_wpnonce"]').val();jQuery(a).find('input[name="form_random_key"]').remove(),jQuery(".arm_setup_messages").html(""),jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:"action=arm_membership_setup_form_ajax_action&"+e,beforeSend:function(){jQuery(a).find("input[type='submit'], button[type='submit']").attr("disabled","disabled").addClass("active")},success:function(e){jQuery(a).find("input[type='submit'], button[type='submit']").removeAttr("disabled").removeClass("active");var r=e.message;"success"==e.status?(void 0!==e.script&&""!==e.script&&jQuery("body").append(e.script),n.find(".arm_setup_messages").html(r).show().delay(5e3).fadeOut(2e3),"redirect"!=e.type&&("function"==typeof armResetFileUploader&&armResetFileUploader(a),jQuery(a).find(".arm_module_gateway_input").trigger("change"),jQuery(a).find(".arm_module_plan_input").trigger("change")),"redirect"!=e.type&&(jQuery(a).trigger("reset"),arm_reinit_session_var(a,__ARMAJAXURL,t))):(n.find(".arm_setup_messages").html(r).show(),arm_reinit_session_var(a,__ARMAJAXURL,t)),"redirect"!=e.type&&(jQuery(window.opera?"html":"html, body").animate({scrollTop:n.find(".arm_setup_messages").offset().top-50},1e3),n.find(".arm_setup_messages").html(r).show().delay(5e3).fadeOut(2e3))}})}function armResetFileUploader(e){jQuery(e).find(".armFileUploadWrapper").each(function(){var e=jQuery(this).find(".armFileUploadProgressBar");e.hide(),e.find(".armbar").css("width","0%"),jQuery(this).find(".armFileUploadContainer").show(),jQuery(this).find(".armFileRemoveContainer").hide(),jQuery(this).find(".armFileUploadProgressInfo").html(""),jQuery(this).find("input").val(""),jQuery(this).find(".armFileMessages").html(""),jQuery(this).find(".arm_old_file").remove()})}function IsEmail(e){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)}function FacebookInit(e){var r,a,t;""!=e&&(window.fbAsyncInit=function(){FB.init({appId:e,status:!0,cookie:!0,xfbml:!0,version:"v2.4"})},r=document,a="facebook-jssdk",t=r.getElementsByTagName("script")[0],r.getElementById(a)||((r=r.createElement("script")).id=a,r.src="//connect.facebook.net/en_US/sdk.js",t.parentNode.insertBefore(r,t)))}function FacebookLoginInit(){var t=jQuery("#arm_social_login_redirect_to").val(),e=(jQuery(this),["public_profile","email"].join(",")),n=["id","name","first_name","last_name","email","gender","picture"].join(",");"undefined"!=typeof FB&&FB.login(function(e){var r,a;e.authResponse&&(r=e.authResponse.userID,a=e.authResponse.accessToken,FB.api("/me",{fields:n},function(e){e.token=a,e.redirect_to=t,e.userId=r,jQuery(".arm_social_login_main_container").hide(),jQuery(".arm_social_facebook_container").parent(".arm_social_login_main_container").next(".arm_social_connect_loader").show(),FacebookLoginCallBack(e)}))},{scope:e})}function FacebookLoginCallBack(e){return e=void 0===e.picture?{action:"arm_social_login_callback",action_type:"facebook",id:e.id,token:e.token,user_email:e.email,first_name:e.first_name,last_name:e.last_name,display_name:e.name,birthday:e.birthday,gender:e.gender,picture:"",redirect_to:e.redirect_to,user_profile_picture:"https://graph.facebook.com/"+e.userId+"/picture?type=normal",userId:e.userId}:{action:"arm_social_login_callback",action_type:"facebook",id:e.id,token:e.token,user_email:e.email,first_name:e.first_name,last_name:e.last_name,display_name:e.name,birthday:e.birthday,gender:e.gender,picture:e.picture.data.url,redirect_to:e.redirect_to,user_profile_picture:"https://graph.facebook.com/"+e.userId+"/picture?type=normal",userId:e.userId},jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:e,success:function(e){return"redirect"==e.type?location.href=e.message:("success"!=e.status&&alert(e.message),jQuery(".arm_social_connect_loader").hide()),!1}}),!1}function LinkedInLoginInit(){"undefined"!=typeof IN&&(IN.UI.Authorize().place(),IN.Event.on(IN,"auth",function(){jQuery(".arm_social_login_main_container").fadeOut(),jQuery(".arm_social_linkedin_container").parent(".arm_social_login_main_container").next(".arm_social_connect_loader").show(),IN.API.Profile("me").fields("id","firstName","lastName","email-address","picture-url","headline").result(LinkedInLoginCallBack)}))}function LinkedInLoginCallBack(e){var r=e.values[0],e=jQuery("#arm_social_login_redirect_to").val(),r={action:"arm_social_login_callback",action_type:"linkedin",id:r.id,user_email:r.emailAddress,first_name:r.firstName,last_name:r.lastName,display_name:r.firstName+r.lastName,picture:r.pictureUrl,redirect_to:e,user_profile_picture:r.pictureUrl};return jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:r,success:function(e){return"redirect"==e.type?location.href=e.message:("success"!=e.status&&alert(e.message),jQuery(".arm_social_connect_loader").hide()),!1}}),!1}function GoogleHandleAuthResult(e){var r=document.getElementById("authorize-button");e&&!e.error?GoogleLoginCallBack():(r.style.visibility="",r.onclick=GoogleHandleAuthClick)}function GoogleLoginCallBack(){return"undefined"!=typeof gapi&&gapi.client.load("plus","v1").then(function(){jQuery(".arm_social_login_main_container").hide(),jQuery(".arm_social_googleplush_container").parent(".arm_social_login_main_container").next(".arm_social_connect_loader").show(),gapi.client.plus.people.get({userId:"me"}).then(function(e){var r=e.result,a=jQuery("#arm_social_login_redirect_to").val(),e=r.image.url;r.image.isDefault&&(e="");r={action:"arm_social_login_callback",action_type:"googleplush",id:r.id,user_email:r.emails[0].value,first_name:r.name.givenName,last_name:r.name.familyName,display_name:r.displayName,gender:r.gender,picture:e,user_profile_picture:e,redirect_to:a,userId:r.id};jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:r,success:function(e){return"redirect"==e.type?location.href=e.message:("success"!=e.status&&alert(e.message),jQuery(".arm_social_connect_loader").hide()),!1}})},function(e){})}),!1}function PinterestInit(e){var r,a,t;""!=e&&(window.pAsyncInit=function(){PDK.init({appId:e,cookie:!0})},r=document,a="pinterest-jssdk",t=r.getElementsByTagName("script")[0],r.getElementById(a)||((r=r.createElement("script")).id=a,r.src="//assets.pinterest.com/sdk/sdk.js",t.parentNode.insertBefore(r,t)))}function PinterestLoginInit(){PDK.login({scope:"read_public"},function(e){e?PDK.me(function(e){e&&!e.error||alert(pinterestError)}):alert(pinterestPermissionError)})}function setCookie(e,r,a,t,n,i){i.cookie=e+"="+escape(r)+"; path=/"+(t?"; domain="+t:"")+(n?"; secure":"")}function arm_VKAuthCallBack(){var e=jQuery.parseJSON(jQuery("#arm_vk_user_data").val()),r=jQuery("#arm_social_login_redirect_to").val();jQuery(".arm_social_login_main_container").hide(),jQuery(".arm_social_vk_container").parent(".arm_social_login_main_container").next(".arm_social_connect_loader").show();e={action:"arm_social_login_callback",action_type:"vk",id:e.userId,first_name:e.first_name,last_name:e.last_name,user_email:e.user_email,display_name:e.nickname,redirect_to:r,user_profile_picture:e.user_profile_picture,userId:e.userId,user_login:e.user_login};jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:e,success:function(e){return"redirect"==e.type?location.href=e.message:("success"!=e.status&&alert(e.message),jQuery(".arm_social_connect_loader").hide()),!1}})}function armAdjustAccountTabs(){jQuery(".arm_account_tabs_wrapper").each(function(){var e=jQuery(this).find(".arm_account_link_tab_active"),r=e.position(),a=e.outerWidth(!0),e=e.outerHeight();jQuery(this).find(".arm_account_slider").css({width:a+"px",left:r.left+"px",top:r.top+e+"px"})})}function arm_form_close_account_action(r){var e=jQuery(r).attr("data-random-id");jQuery(r).find('input[name="ARM_FILTER_INPUT"]').remove(),jQuery(r).find(".arm_close_account_btn").addClass("active"),jQuery(r).prepend('<input type="hidden" name="form_random_key" value="'+e+'" />');e=jQuery(r).serialize();return jQuery(r).find('input[name="form_random_key"]').remove(),jQuery.ajax({url:__ARMAJAXURL,type:"POST",dataType:"json",data:"action=arm_close_account_form_submit_action&"+e,success:function(e){"success"==e.type?location.href=e.url:(e=""!=e.msg?e.msg:closeAccountError,e+='<i class="armfa armfa-times"></i>',jQuery(".arm_close_account_form_container").find("#arm_message_text.arm_error_msg").html(e),jQuery(".arm_close_account_form_container").find(".arm_form_message_container").show().delay(1e4).fadeOut(2e3),jQuery(".arm_close_account_form_container").find(".arm_form_message_container .arm_error_msg").show().delay(1e4).fadeOut(2e3),jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(".arm_close_account_form_container").find(".arm_form_message_container").offset().top-50},"slow")),jQuery(r).find(".arm_close_account_btn").removeClass("active")}}),!1}function armvalidatenumber(e){var r,a,t=navigator.userAgent,n=navigator.appName;parseFloat(navigator.appVersion),parseInt(navigator.appVersion,10);-1!=(a=t.indexOf("OPR/"))||-1!=(a=t.indexOf("Opera"))?n="Opera":-1!=(a=t.indexOf("MSIE"))?(n="Netscape",t.substring(a+5)):-1!=(a=t.indexOf("Chrome"))?n="Chrome":-1!=(a=t.indexOf("Safari"))?n="Safari":-1!=(a=t.indexOf("Firefox"))?n="Firefox":(r=t.lastIndexOf(" ")+1)<(a=t.lastIndexOf("/"))&&(n=t.substring(r,a)).toLowerCase()==n.toUpperCase()&&(n=navigator.appName),"Chrome"!=n&&"Safari"!=n&&"Opera"!=n&&"Firefox"!=n&&("Microsoft Internet Explorer"==n||"Netscape"==n)?-1!==jQuery.inArray(e.keyCode,[8,9,27,46,13,116])||173==e.keyCode&&0==e.shiftKey||65==e.keyCode&&!0===e.ctrlKey||67==e.keyCode&&!0===e.ctrlKey||88==e.keyCode&&!0===e.ctrlKey||35<=e.keyCode&&e.keyCode<=39||(e.shiftKey||(e.keyCode<48||57<e.keyCode)&&(e.keyCode<96||105<e.keyCode))&&(e.preventDefault?e.preventDefault():e.returnValue=!1):-1!==jQuery.inArray(e.keyCode,[8,9,27,46,13,116])||173==e.keyCode&&0==e.shiftKey||65==e.keyCode&&!0===e.ctrlKey||67==e.keyCode&&!0===e.ctrlKey||88==e.keyCode&&!0===e.ctrlKey||35<=e.keyCode&&e.keyCode<=39||(e.shiftKey||(e.keyCode<48||57<e.keyCode)&&(e.keyCode<96||105<e.keyCode))&&e.preventDefault()}function arm_equal_hight_setup_plan(){jQuery(window).outerWidth()<=500?jQuery(".arm_membership_setup_form").find(".arm_module_plans_ul").each(function(){jQuery(this).find(".arm_module_plan_option").css("height",""),jQuery(this).find(".arm_module_plan_name").css("height","")}):jQuery(".arm_membership_setup_form").each(function(){var e=jQuery(".arm_membership_setup_form");0<e.find(".arm_module_plans_main_container").length&&0<e.find(".arm_module_plans_ul li").length&&e.find(".arm_module_plans_ul").each(function(){jQuery(this).find("li").each(function(){jQuery(this).find(".arm_module_plan_option").css("height","auto"),jQuery(this).find(".arm_module_plan_name").css("height","auto")});var a=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_plan_name").height();r&&a<r&&(a=r)}),0<a&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_plan_name").height(a)});var t=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_plan_option").outerHeight();r&&t<r&&(t=r)}),0<t&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_plan_option").parent().attr("style","height:"+t+"px !important;"),jQuery(this).find(".arm_module_plan_option").attr("style","height:"+t+"px !important;")})}),0<e.find(".arm_setup_paymentcyclebox_main_wrapper").length&&0<e.find(".arm_setup_paymentcyclebox_wrapper .arm_module_payment_cycle_container").length&&jQuery(".arm_membership_setup_form").find(".arm_module_payment_cycle_container").each(function(){0<jQuery(".arm_membership_setup_form").find(".arm_module_payment_cycle_ul li").length&&jQuery(".arm_membership_setup_form").find(".arm_module_payment_cycle_ul").each(function(){jQuery(this).find("li").each(function(){jQuery(this).find(".arm_module_payment_cycle_option").css("height","auto"),jQuery(this).find(".arm_module_payment_cycle_name").css("height","auto")});var a=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_payment_cycle_name").height();r&&a<r&&(a=r)}),0<a&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_payment_cycle_name").height(a),jQuery(this).find(".arm_module_payment_cycle_name").css("line-height",a+"px")});var t=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_payment_cycle_option").outerHeight();r&&t<r&&(t=r)}),0<t&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_payment_cycle_option").parent().attr("style","height:"+t+"px !important;"),jQuery(this).find(".arm_module_payment_cycle_option").attr("style","height:"+t+"px !important;")})})}),0<e.find(".arm_setup_gatewaybox_main_wrapper").length&&0<e.find(".arm_module_gateways_ul li").length&&jQuery(".arm_membership_setup_form").find(".arm_module_gateways_ul").each(function(){jQuery(this).find("li").each(function(){jQuery(this).find(".arm_module_gateway_option").css("height","auto"),jQuery(this).find(".arm_module_gateway_name").css("height","auto")});var a=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_gateway_name").height();r&&a<r&&(a=r)}),0<a&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_gateway_name").height(a),jQuery(this).find(".arm_module_gateway_name").css("line-height",a+"px")});var t=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_gateway_option").outerHeight();r&&t<r&&(t=r)}),0<t&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_gateway_option").parent().attr("style","height:"+t+"px !important;"),jQuery(this).find(".arm_module_gateway_option").attr("style","height:"+t+"px !important;")})})})}function armAdjustDirectoryTemplateBox(){jQuery(".arm_template_wrapper_directorytemplate1, .arm_template_wrapper_directorytemplate3").each(function(){var a;0<jQuery(this).find(".arm_directory_container .arm_user_block").length&&(jQuery(this).find(".arm_directory_container .arm_user_block").css("height","auto"),a=0,jQuery(this).find(".arm_directory_container .arm_user_block").each(function(e){var r=jQuery(this).height();r&&a<r&&(a=r)}),jQuery(this).find(".arm_directory_container .arm_user_block").height(a),jQuery(this).find(".arm_directory_container .arm_user_block").css("min-height","350px"))}),arm_set_directory_template_style()}function arm_set_plan_width(){0<jQuery(".arm_membership_setup_form").length&&(jQuery(".arm_plan_separator").remove(),jQuery(".arm_membership_setup_form").each(function(){var e=jQuery(this),r=e.find(".arm_module_plans_ul").hasClass("arm_column_2"),a=e.find(".arm_module_plans_ul").hasClass("arm_column_3"),t=e.find(".arm_module_plans_ul").hasClass("arm_column_4");r&&e.find("ul.arm_module_plans_ul > li").each(function(e){(e+1)%2==0&&jQuery(this).after("<li class='arm_plan_separator'></li>")}),a&&e.find("ul.arm_module_plans_ul > li").each(function(e){(e+1)%3==0&&jQuery(this).after("<li class='arm_plan_separator'></li>")}),t&&e.find("ul.arm_module_plans_ul > li").each(function(e){(e+1)%4==0&&jQuery(this).after("<li class='arm_plan_separator'></li>")})}))}function arm_set_directory_template_style(){var e,r,i=jQuery(window).width();jQuery(".arm_user_block").removeClass("remove_bottom_border"),jQuery(".arm_user_block").removeClass("remove_bottom_border_preview"),0<jQuery(".arm_template_wrapper").length&&jQuery(".arm_template_wrapper").each(function(){var r,a,t=jQuery(this),n=i<=768&&500<i?2:3;jQuery(".arm_directorytemplate1_seperator").remove(),!t.hasClass("arm_template_wrapper_directorytemplate1")||0<(r=t.find(".arm_user_block").length)&&(a=1,jQuery(".arm_user_block").removeClass("arm_directorytemplate1_last_field"),jQuery(".arm_user_block").removeClass("arm_first_user_block"),t.find(".arm_user_block").each(function(e){$this_=jQuery(this),0==e||a%n==0?$this_.addClass("arm_first_user_block"):e%n==0&&$this_.addClass("arm_directorytemplate1_last_field"),a==r&&t.prev(2).hasClass("arm_directorytemplate1_last_field"),r==a&&$this_.hasClass("arm_first_user_block")&&$this_.addClass("arm_last_row_first_user_block"),a%n==0&&a!=r&&$this_.after('<div class="arm_user_block arm_directorytemplate1_seperator"></div>'),a++}))}),(i<=500||jQuery(".arm_template_preview_popup").hasClass("arm_mobile_wrapper"))&&(e=jQuery(".arm_directory_paging_container").prev().attr("class"),r=jQuery(".arm_template_preview_popup").hasClass("arm_mobile_wrapper")?"remove_bottom_border_preview":"remove_bottom_border",/arm_user_block/gi.test(e)&&jQuery(".arm_directory_paging_container").prev().addClass(r))}function arm_slider_widget_init(){jQuery.isFunction(jQuery().carouFredSel)&&jQuery(".arm_widget_slider_wrapper_container").each(function(){var e=jQuery(this).attr("data-effect"),e={circular:!0,items:1,responsive:!0,width:"100%",auto:{items:1,play:!0,fx:void 0!==e&&""!=e?e:"slide",easing:!1,duration:1e3}};jQuery(this).carouFredSel(e)})}function arm_do_bootstrap_angular(){var a=[];if(jQuery(".arm_member_form_container").each(function(e){var r=jQuery(this).find("form").attr("id");void 0!==r&&a.push(r)}),jQuery(".arm_setup_form_container").each(function(){var e=jQuery(this).find("form").attr("id");void 0!==e&&a.push(e)}),jQuery(".arm_close_account_container").each(function(){var e=jQuery(this).find("form").attr("id");void 0!==e&&a.push(e)}),void 0!==a&&0<a.length)for(var e in a)if(void 0!==a[e]){var r,t=jQuery("#"+a[e]);if("undefined"!=typeof angular)try{angular.bootstrap(t,["ARMApp"])}catch(e){}arm_spam_filter_keypress_check(t.find('[data-id="arm_nonce_start_time"]').val(),t.find('[data-id="arm_nonce_keyboard_press"]').val()),void 0!==t.attr("data-submission-key")&&(r=t.attr("data-submission-key"),(e=document.createElement("input")).setAttribute("type","text"),e.setAttribute("style","visibility:hidden !important;display:none !important;opacity:0 !important;"),e.setAttribute("name",r),t.removeAttr("data-submission-key"),t.append(e))}}function arm_spam_filter_keypress_check(t,i){var _=0;!function(){function e(e){var r=new Array,a=0,t=document.getElementsByTagName("input");for(n=0;n<t.length;n++)t[n].className==e&&(r[a]=t[n],a++);return r}for(var r=e("stime"),n=0;n<r.length;n++)r[n].setAttribute("name",t);var a=e("kpress");document.onkeydown=function(){_++;for(var e=0;e<a.length;e++)a[e].setAttribute("name",i),a[e].value=_},document.addEventListener("click",function(e){if("submit"==((e=e||window.event).target||e.srcElement).type){_++;for(var r=0;r<a.length;r++)a[r].setAttribute("name",i),a[r].value=_}},!1)}()}function arm_reinit_session_var(a,e,r){jQuery.ajax({type:"POST",url:e,dataType:"json",data:"action=arm_reinit_session&form_key="+r,success:function(e){var r=e.new_var,e=jQuery(a).find("input").last();e[0].setAttribute("name",r),e.before("<input type='text' name='ARM_FILTER_INPUT' value='' style='opacity:0 !important;display:none !important;visibility:hidden !important;' />")}})}function arm_create_script_node(e,r,a,t){var n=e.getElementsByTagName(r)[0];e.getElementById(a)||((r=e.createElement(r)).id=a,r.src=t,n.parentNode.insertBefore(r,n))}function arm_create_link_node(e,r,a,t){var n=e.getElementsByTagName(r)[0];e.getElementById(a)||((r=e.createElement(r)).id=a,r.href=t,r.rel="stylesheet",n.parentNode.insertBefore(r,n))}function arm_set_plan_height(e){0<e.find(".arm_setup_gatewaybox_main_wrapper").length&&0<e.find(".arm_module_gateways_ul li").length&&jQuery(".arm_membership_setup_form").find(".arm_module_gateways_ul").each(function(){jQuery(this).find("li").each(function(){jQuery(this).find(".arm_module_gateway_option").css("height","auto"),jQuery(this).find(".arm_module_gateway_name").css("height","auto")});var a=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_gateway_name").height();r&&a<r&&(a=r)}),0<a&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_gateway_name").height(a),jQuery(this).find(".arm_module_gateway_name").css("line-height",a+"px")});var t=0;jQuery(this).find("li.arm_setup_column_item").each(function(e){var r=jQuery(this).find(".arm_module_gateway_option").outerHeight();r&&t<r&&(t=r)}),0<t&&jQuery(this).find("li.arm_setup_column_item").each(function(){jQuery(this).find(".arm_module_gateway_option").parent().attr("style","height:"+t+"px !important;"),jQuery(this).find(".arm_module_gateway_option").attr("style","height:"+t+"px !important;")})})}function armGetLastScrollableElement(e){for(var r=jQuery(e).parentsUntil("body"),a=r.length,t=0,n=[],i=0;t<a;){var _=r[t];void 0!==_&&jQuery(_).hasScrollBar()&&(n[i]=jQuery(_),i++),t++}return n[n.length-1]}function arm_get_amount_currency_wise_separator(e){var r;return 0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()&&void 0!==e&&""!=e?(r=jQuery.parseJSON(jQuery(".arm_global_currency_separators").val()),e=(e=(e=(e=e.toString().replace(".","DECIMAL")).toString().replace(",","THOUSAND")).toString().replace("DECIMAL",r.decimal)).toString().replace("THOUSAND",r.thousand)):e}function arm_get_amount_standard_separator(e){var r;return 0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()&&void 0!==e&&""!=e?(r=jQuery.parseJSON(jQuery(".arm_global_currency_separators").val()),e=(e=(e=(e=e.toString().replace(r.decimal,"DECIMAL")).toString().replace(r.thousand,"THOUSAND")).toString().replace("DECIMAL",".")).toString().replace("THOUSAND",",")):e}var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var r,a,t,n,i,_,o="",s=0;for(e=Base64._utf8_encode(e);s<e.length;)t=(_=e.charCodeAt(s++))>>2,n=(3&_)<<4|(r=e.charCodeAt(s++))>>4,i=(15&r)<<2|(a=e.charCodeAt(s++))>>6,_=63&a,isNaN(r)?i=_=64:isNaN(a)&&(_=64),o=o+this._keyStr.charAt(t)+this._keyStr.charAt(n)+this._keyStr.charAt(i)+this._keyStr.charAt(_);return o},decode:function(e){var r,a,t,n,i,_,o="",s=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");s<e.length;)t=this._keyStr.indexOf(e.charAt(s++)),r=(15&(n=this._keyStr.indexOf(e.charAt(s++))))<<4|(i=this._keyStr.indexOf(e.charAt(s++)))>>2,a=(3&i)<<6|(_=this._keyStr.indexOf(e.charAt(s++))),o+=String.fromCharCode(t<<2|n>>4),64!=i&&(o+=String.fromCharCode(r)),64!=_&&(o+=String.fromCharCode(a));return o=Base64._utf8_decode(o)},_utf8_encode:function(e){e=e.replace(/rn/g,"n");for(var r="",a=0;a<e.length;a++){var t=e.charCodeAt(a);t<128?r+=String.fromCharCode(t):(127<t&&t<2048?r+=String.fromCharCode(t>>6|192):(r+=String.fromCharCode(t>>12|224),r+=String.fromCharCode(t>>6&63|128)),r+=String.fromCharCode(63&t|128))}return r},_utf8_decode:function(e){var r,a="",t=0;for(c1=c2=0;t<e.length;)(r=e.charCodeAt(t))<128?(a+=String.fromCharCode(r),t++):191<r&&r<224?(c2=e.charCodeAt(t+1),a+=String.fromCharCode((31&r)<<6|63&c2),t+=2):(c2=e.charCodeAt(t+1),c3=e.charCodeAt(t+2),a+=String.fromCharCode((15&r)<<12|(63&c2)<<6|63&c3),t+=3);return a}};jQuery(document).ready(function(e){jQuery.isFunction(jQuery().datetimepicker)&&jQuery(".arm_datepicker").each(function(){var e=jQuery(this),r=(new Date,e.attr("data-cal_localization")),a=(e.attr("data-date_field"),e.attr("data-dateformat")),t=e.attr("data-show_timepicker");""!=a&&void 0!==a||(a="MM/DD/YYYY"),""!=t&&void 0!==t&&1==t&&(a+=" hh:mm A"),e.datetimepicker({useCurrent:!1,format:a,locale:r}).on("dp.change",function(e){jQuery(this).trigger("input")})}),jQuery("input.armRepeatPasswordInput").each(function(){var e=jQuery(this).parents(".armRepeatPasswordInput").find('input[name="user_pass"]').attr("ng-model");jQuery(this).attr("compare",e)}),jQuery(document).ready(function(){jQuery("input.arm_module_plan_input:checked").each(function(){armSetupHideShowSections(jQuery(this).parents(".arm_membership_setup_form"))})}),jQuery(document).on("change","input.arm_module_plan_input",function(){jQuery('input:radio[name="arm_selected_payment_mode"]').length&&jQuery('input:radio[name="arm_selected_payment_mode"]').filter('[value="auto_debit_subscription"]').prop("checked",!0).trigger("change"),armSetupHideShowSections(jQuery(this).parents(".arm_membership_setup_form"))}),jQuery(document).on("click",".arm_login_popup_form_links",function(){var e=jQuery(this).attr("data-form_id");jQuery("."+e).trigger("click")}),jQuery.isFunction(jQuery().bPopup)&&(jQuery(document).on("click",".arm_form_popup_link",function(e){var r=jQuery(this).attr("data-form_id"),a=""!=(a=jQuery(this).attr("data-overlay"))?a:.5,t=""!=(t=jQuery(this).attr("data-modal_bg"))?t:"#000000";jQuery(".popup_close_btn").trigger("click"),jQuery(".arm_popup_member_form_"+r).bPopup({opacity:a,modalColor:t,closeClass:"popup_close_btn",zIndex:99999,follow:[!1,!1],onClose:function(){arm_adjust_form_popup(),arm_reset_form_popup("arm_popup_member_form_"+r),0<jQuery(".md-select-backdrop").length&&jQuery(".md-select-backdrop").trigger("click")},onOpen:function(){1<jQuery(".arm_popup_member_form_"+r).length&&jQuery(".arm_popup_wrapper.arm_popup_member_form_"+r).each(function(e){$this=jQuery(this),1<e+1&&setTimeout(function(){$this.css("display","none")},10)})}}),setTimeout(function(){arm_adjust_form_popup()},10)}),jQuery(document).on("click",".arm_modal_forgot_form_link",function(){var e=jQuery(this).attr("data-form_id");jQuery(".arm_modal_forgot_form_"+e).bPopup({opacity:.5,closeClass:"popup_close_btn",follow:[!1,!1],onOpen:function(){1<jQuery(".arm_modal_forgot_form_"+e).length&&jQuery(".arm_popup_wrapper.arm_modal_forgot_form_"+e).each(function(e){$this=jQuery(this),1<e+1&&setTimeout(function(){$this.css("display","none")},10)})},onClose:function(){0<jQuery(".md-select-backdrop").length&&jQuery(".md-select-backdrop").trigger("click")}})}),jQuery(document).on("click",".arm_setup_form_popup_link",function(){var e=jQuery(this).attr("data-form_id"),r=""!=(r=jQuery(this).attr("data-overlay"))?r:.5,a=""!=(a=jQuery(this).attr("data-modal_bg"))?a:"#000000";jQuery(".popup_close_btn").trigger("click"),jQuery(".arm_popup_member_setup_form_"+e).bPopup({opacity:r,modalColor:a,closeClass:"popup_close_btn",zIndex:99999,follow:[!1,!1],onClose:function(){arm_adjust_form_popup(),arm_reset_form_popup("arm_popup_member_setup_form_"+e),0<jQuery(".md-select-backdrop").length&&jQuery(".md-select-backdrop").trigger("click")},onOpen:function(){1<jQuery(".arm_popup_member_setup_form_"+e).length&&jQuery(".arm_popup_wrapper.arm_popup_member_setup_form_"+e).each(function(e){$this=jQuery(this),1<e+1&&setTimeout(function(){$this.css("display","none")},10)})}}),setTimeout(function(){arm_adjust_form_popup(),arm_equal_hight_setup_plan()},10)})),arm_current_membership_init(),arm_transaction_init(),arm_tooltip_init(),arm_set_plan_width(),arm_set_directory_template_style(),arm_do_bootstrap_angular()}),jQuery(window).on("load",function(){setTimeout(function(){arm_equal_hight_setup_plan()},500),armAdjustAccountTabs(),armAdjustDirectoryTemplateBox(),setTimeout(function(){jQuery(".arm_setup_form_container").show()},100)}),jQuery(window).on("resize",function(){arm_adjust_form_popup(),arm_equal_hight_setup_plan(),armAdjustAccountTabs(),armAdjustDirectoryTemplateBox()}),jQuery(document).on("click",".arm_paging_wrapper_transaction .arm_page_numbers",function(){var e,r=jQuery(this).closest("form"),a=jQuery(this).attr("data-page");return jQuery(this).hasClass("current")||(e=r.serialize(),jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_transaction_paging_action&current_page="+a+"&"+e,beforeSend:function(){r.find(".arm_transactions_wrapper").css("opacity","0.5")},success:function(e){return r.find(".arm_transactions_wrapper").css("opacity","1"),r.parents(".arm_transactions_container").replaceWith(e),arm_transaction_init(),!1}})),!1}),jQuery(document).on("click",".arm_membership_history_wrapper .arm_page_numbers",function(){var r=jQuery(this).parents(".arm_membership_history_wrapper"),e=r.attr("data-user_id"),a=jQuery(this).attr("data-page"),t=jQuery(this).attr("data-per_page");return jQuery(this).hasClass("current")||jQuery(this).hasClass("dots")||jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_membership_history_paging_action&user_id="+e+"&page="+a+"&per_page="+t,beforeSend:function(){r.css("opacity","0.4")},success:function(e){return r.css("opacity","1"),r.replaceWith(e),arm_tooltip_init(),!1}}),!1}),jQuery(document).on("click",".arm_user_transaction_wrapper .arm_page_numbers",function(){var r=jQuery(this).parents(".arm_user_transaction_wrapper"),e=r.attr("data-user_id"),a=jQuery(this).attr("data-page"),t=jQuery(this).attr("data-per_page"),n=jQuery('input[name="_wpnonce"]').val();return jQuery(this).hasClass("current")||jQuery(this).hasClass("dots")||jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_get_user_transactions_paging_action&user_id="+e+"&page="+a+"&per_page="+t+"&_wpnonce="+n,beforeSend:function(){r.css("opacity","0.4")},success:function(e){return r.css("opacity","1"),r.replaceWith(e),arm_tooltip_init(),!1}}),!1}),jQuery(document).on("change",".arm_directory_listof_input",function(){jQuery(this).parents(".arm_directory_list_of_filters").find("label").removeClass("arm_active"),jQuery(this).parent("label").addClass("arm_active"),arm_get_directory_list(jQuery(this).parents(".arm_directory_form_container"))}),jQuery(document).on("change",".arm_directory_listby_select",function(){jQuery(this);arm_get_directory_list(jQuery(this).parents(".arm_directory_form_container"))}),jQuery(document).on("click",".arm_directory_search_btn",function(){jQuery(".arm_directory_search_box").val();arm_get_directory_list(jQuery(this).parents(".arm_directory_form_container"))}),jQuery(document).on("click",".arm_directory_form_container .arm_directory_load_more_btn",function(){var e=jQuery(this).parents(".arm_directory_form_container");jQuery(this).hide(),e.find(".arm_directory_paging_container .arm_load_more_loader").show();var r=e.attr("data-temp"),a=jQuery(this).attr("data-page"),e=e.serialize();jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_directory_paging_action&current_page="+a+"&"+e,beforeSend:function(){},success:function(e){return jQuery(".arm_template_wrapper_"+r+" .arm_directory_paging_container").replaceWith(e),arm_tooltip_init(),setTimeout(function(){armAdjustDirectoryTemplateBox()},100),!1}})}),jQuery(document).on("click",".arm_directory_form_container .arm_page_numbers",function(){var e,r=jQuery(this).parents(".arm_directory_form_container"),a=r.attr("data-temp"),t=jQuery(this).attr("data-page");return jQuery(this).hasClass("current")||jQuery(this).hasClass("dots")||(e=r.serialize(),r.find(".arm_template_loading").show(),jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_directory_paging_action&current_page="+t+"&"+e,beforeSend:function(){r.find(".arm_template_container").css("opacity","0.5")},success:function(e){return r.find(".arm_template_container").css("opacity","1"),r.find(".arm_template_loading").hide(),jQuery(".arm_template_wrapper_"+a).replaceWith(e),0==jQuery(".arm_template_wrapper_"+a).parents(".arm_template_preview_popup").length&&jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(".arm_template_wrapper_"+a).offset().top-10},1e3),arm_tooltip_init(),setTimeout(function(){armAdjustDirectoryTemplateBox()},100),!1}})),!1}),jQuery(document).on("click",".arm_switch_label",function(){var e=jQuery(this).attr("data-value");jQuery(this).parent(".arm_switch").find(".arm_switch_radio").val(e),jQuery(this).parent(".arm_switch").find(".arm_switch_label").removeClass("active"),jQuery(this).addClass("active")}),jQuery(document).on("change","input.arm_module_plan_input",function(e){jQuery(this).parents(".arm_module_payment_cycle_ul").find(".arm_setup_column_item").removeClass("arm_active"),jQuery(this).parents(".arm_setup_column_item").addClass("arm_active");var r=jQuery(this).parents("form:first"),a=(angular.element("[data-ng-controller=ARMCtrl]").scope(),jQuery(this).attr("data-amt")),t=(jQuery(r).find('[data-id="arm_front_plan_skin_type"]').val(),0);0<jQuery(".arm_global_currency_separators").length&&""!=jQuery(".arm_global_currency_separators").val()&&(t=1);var n=jQuery(r).find("input.arm_module_plan_input:checked");1==t?(t=arm_get_amount_currency_wise_separator(a),n.parents(".arm_setup_column_item").find(".arm_module_plan_cycle_price").html(t)):n.parents(".arm_setup_column_item").find(".arm_module_plan_cycle_price").html(a),n.attr("data-amt",a),armUpdateOrderAmount(r),e.stopPropagation()}),jQuery(document).on("change","input.arm_module_gateway_input",function(e){jQuery(this).parents(".arm_module_gateways_ul").find(".arm_setup_column_item").removeClass("arm_active"),jQuery(this).parents(".arm_setup_column_item").addClass("arm_active");var r=jQuery(this).val(),a=jQuery(this).parents("form:first"),t=a.attr("id"),n=jQuery(a).find("[name=arm_selected_payment_mode]:checked").val(),i=jQuery(a).find('[data-id="arm_total_payable_amount"]').val();("0.00"==i||"0"==i)&&"auto_debit_subscription"!=n?jQuery("#"+t+" .arm_module_gateway_fields").slideUp("slow").addClass("arm_hide"):(jQuery("#"+t+" .arm_module_gateway_fields").not(".arm_module_gateway_fields_"+r).slideUp("slow").addClass("arm_hide"),jQuery("#"+t+" .arm_module_gateway_fields_"+r).slideDown("slow").removeClass("arm_hide"));jQuery(a).find('[data-id="arm_front_plan_skin_type"]').val();var _=jQuery(this).attr("data-payment_mode"),o=(angular.element("[data-ng-controller=ARMCtrl]").scope(),jQuery("#"+t+' [data-id="arm_user_old_plan"]').val().split(",")),s=jQuery("#"+t+" .arm_module_plan_input:checked"),m=jQuery("#"+t+' [data-id="arm_user_selected_payment_mode_'+s.attr("value")+'"]').val(),i=jQuery("#"+t+' [data-id="arm_user_old_plan_total_cycle_'+s.attr("value")+'"]').val(),n=jQuery("#"+t+' [data-id="arm_user_done_payment_'+s.attr("value")+'"]').val(),r=s.attr("data-type");"recurring"!=r||-1==jQuery.inArray(s.attr("value"),o)||i==n&&"infinite"!=i||"manual_subscription"!=m?"recurring"==r&&"both"==_?(jQuery("#"+t+' input:radio[name="arm_selected_payment_mode"]').filter('[value="auto_debit_subscription"]').prop("checked",!0).trigger("change"),jQuery("#"+t+" .arm_payment_mode_wrapper").show("slow")):(jQuery("#"+t+' input:radio[name="arm_selected_payment_mode"]').filter('[value="'+_+'"]').prop("checked",!0).trigger("change"),jQuery("#"+t+" .arm_payment_mode_wrapper").hide("slow")):jQuery("#"+t+" .arm_payment_mode_wrapper").hide("slow"),armUpdateOrderAmount(a,0),e.stopPropagation()}),jQuery(document).on("click",'.arm_shortcode_form [type="submit"], .arm_shortcode_form [type="button"], .arm_membership_setup_form [type="submit"], .arm_membership_setup_form [type="button"]',function(){var e=jQuery.Event("keydown");e.which=9,jQuery("body").trigger(e)}),jQuery(document).on("click",".arm_cancel_membership_link",function(){var e=confirm(confirmCancelSubscription),r=jQuery(this).attr("data-plan_id"),a=jQuery("#arm_total_current_membership_columns").val(),t=jQuery("#arm_cancel_subscription_message").val();return 1!=e||(jQuery(".arm_form_message_container").html(""),jQuery("#arm_cancel_subscription_link_"+r).hide(),jQuery("#arm_field_loader_img_"+r).show(),jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:"action=arm_cancel_membership&type=front&plan_id="+r+"&cancel_message="+t,success:function(e){"success"==e.type?(e='<td colspan="'+a+'" class="arm_current_membership_cancelled_row">'+e.msg+"</td>",jQuery("#arm_current_membership_tr_"+r).html(e)):(alert(errorPerformingAction),jQuery("#arm_cancel_subscription_link_"+r).show())}})),!1}),jQuery(document).on("click",".arm_cancel_membership_btn",function(){var e=confirm(confirmCancelSubscription),t=jQuery(this).attr("data-plan_id");return 1!=e||(jQuery(".arm_form_message_container").html(""),jQuery(".arm_cancel_membership_plan_"+t).show(),jQuery.ajax({type:"POST",url:__ARMAJAXURL,dataType:"json",data:"action=arm_cancel_membership&type=front&plan_id="+t,success:function(e){var r,a;"success"==e.type?(a='<div class="arm_success_msg">'+(r=""!=e.msg?e.msg:userSubscriptionCancel)+"</div>",jQuery(".arm_cancel_membership_form_container").find(".arm_cancel_membership_message_container_"+t).html(a).show().delay(1e4),jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(".arm_cancel_membership_message_container_"+t).offset().top-50},1e3),jQuery(".arm_cancel_membership_button_link_"+t).hide()):(r=""!=e.msg?e.msg:errorPerformingAction,a='<div class="arm_error_msg">'+(r+='<i class="armfa armfa-times"></i>')+"</div>",jQuery(".arm_cancel_membership_form_container").find(".arm_cancel_membership_message_container_"+t).html(a).show().delay(1e4).fadeOut(2e3),jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(".arm_cancel_membership_message_container_"+t).offset().top-50},1e3),jQuery(".arm_cancel_membership_form_container").find(".arm_cancel_membership_message_container_"+t+" i.armfa-times").click(function(){jQuery(".arm_cancel_membership_form_container").find(".arm_cancel_membership_message_container_"+t+" .arm_error_msg").delay(100)})),jQuery(".arm_cancel_membership_plan_"+t).hide()}})),!1}),jQuery(document).on("click",".arm_social_link_twitter",function(e){e.preventDefault(),twitter_auth=window.open(jQuery(this).attr("data-url"),"popupWindow","width=700,height=400,scrollbars=yes");var r=setInterval(function(){twitter_auth.closed&&clearInterval(r)},500)}),jQuery(document).on("click",".arm_profile_tab_link",function(){var e=jQuery(this).attr("data-tab"),r=jQuery(this).parents(".arm_profile_tabs_container");return r.find(".arm_profile_tab_link").removeClass("arm_profile_tab_link_active"),jQuery(this).addClass(" arm_profile_tab_link_active"),"following"===e&&jQuery(this).addClass("following_count"),r.find(".arm_profile_tab_detail").css("display","none"),jQuery(".arm_profile_tab_detail[data-tab="+e+"]").css("display","block"),!1}),jQuery(document).on("click",".arm_account_link_tab",function(e){var r=jQuery(this).attr("data-tab"),a=jQuery(this).parents(".arm_account_tabs_wrapper"),t=a.find(".arm_account_content_active").attr("data-tab");if(!jQuery(this).hasClass("arm_account_slider")&&r!=t)return a.find(".arm_account_link_tab").removeClass("arm_account_link_tab_active"),a.find(".arm_account_btn_tab").removeClass("arm_account_btn_tab_active"),a.find(".arm_account_detail_tab").removeClass("arm_account_content_active arm_account_content_left arm_account_content_right"),jQuery(this).addClass("arm_account_link_tab_active"),a.find(".arm_account_btn_tab[data-tab="+r+"]").addClass("arm_account_btn_tab_active"),a.find(".arm_account_detail_tab[data-tab="+r+"]").addClass("arm_account_content_active"),a.find(".arm_account_detail_tab[data-tab="+r+"]").nextAll(".arm_account_detail_tab").addClass("arm_account_content_right"),a.find(".arm_account_detail_tab[data-tab="+r+"]").prevAll(".arm_account_detail_tab").addClass("arm_account_content_left"),armAdjustAccountTabs(),!1}),jQuery(document).on("click",".arm_account_btn_tab",function(e){var r=jQuery(this).attr("data-tab"),a=jQuery(this).parents(".arm_account_tabs_wrapper"),t=a.find(".arm_account_content_active").attr("data-tab");if(!jQuery(this).hasClass("arm_account_slider")&&r!=t)return a.find(".arm_account_btn_tab").removeClass("arm_account_btn_tab_active"),jQuery(this).addClass("arm_account_btn_tab_active"),a.find(".arm_account_link_tab").removeClass("arm_account_link_tab_active"),a.find(".arm_account_link_tab[data-tab="+r+"]").addClass("arm_account_link_tab_active"),a.find(".arm_account_detail_tab").removeClass("arm_account_content_active arm_account_content_left arm_account_content_right"),a.find(".arm_account_btn_tab[data-tab="+r+"]").addClass("arm_account_btn_tab_active"),a.find(".arm_account_detail_tab[data-tab="+r+"]").addClass("arm_account_content_active"),a.find(".arm_account_detail_tab[data-tab="+r+"]").nextAll(".arm_account_detail_tab").addClass("arm_account_content_right"),a.find(".arm_account_detail_tab[data-tab="+r+"]").prevAll(".arm_account_detail_tab").addClass("arm_account_content_left"),jQuery(window.opera?"html":"html, body").animate({scrollTop:jQuery(this).offset().top-10},"slow"),!1}),jQuery.fn.armSortElements=function(){var a=[].sort;return function(e,t){t=t||function(){return this};var r=this.map(function(){var e=t.call(this),r=e.parentNode,a=r.insertBefore(document.createTextNode(""),e.nextSibling);return function(){if(r===this)throw new Error("You can't sort elements if any one is a descendant of another.");r.insertBefore(this,a),r.removeChild(a)}});return a.call(this,e).each(function(e){r[e].call(t.call(this))})}}(),jQuery(document).on("change",".arm_selected_payment_mode",function(){var e,r,a,t,n;armUpdateOrderAmount(void 0,0),jQuery(this).is(":checked")&&(r="#"+(e=jQuery(this).parents("form:first")).attr("id")+" ",jQuery(e).find('[data-id="arm_total_payable_amount"]').val(),t=jQuery(e).find('[data-id="arm_front_gateway_skin_type"]').val(),a=jQuery(e).find('[data-id="arm_front_plan_skin_type"]').val(),jQuery(this).val(),"skin5"==a&&(a=jQuery(e).find(".arm_module_plan_input").attr("aria-owns"),jQuery("#"+a).find("md-option:selected")),"radio"==t?(n=jQuery(e).find("input[name=payment_gateway]:checked").attr("value"),jQuery(e).find(".arm_module_gateway_fields").not(".arm_module_gateway_fields_"+n).slideUp("slow").addClass("arm_hide")):(t=jQuery(e).find(".arm_module_gateway_input").attr("aria-owns"),n=jQuery("#"+t).find("md-option:selected").attr("value"),jQuery(r+".arm_module_gateway_fields").not(".arm_module_gateway_fields_"+n).slideUp("slow").addClass("arm_hide")),jQuery(r+".arm_module_gateway_fields_"+n).slideDown("slow").removeClass("arm_hide"),armUpdateOrderAmount(e,0))}),jQuery(document).on("click",".arm_renew_subscription_button",function(){var e=jQuery(this).attr("data-plan_id"),r=jQuery(this).closest("form").find("#loader_img").val(),a=jQuery(this).closest("form").find("#setup_id").val(),o=jQuery(this).closest("form").find("#arm_form_style_css").val(),t=jQuery('input[name="_wpnonce"]').val(),s=jQuery(this).closest("form").find("#arm_font_awsome").val();jQuery(".arm_current_membership_container").html(""),jQuery(".arm_current_membership_container_loader_img").html('<div class="arm_loading_grid"><img src="'+r+'" alt="'+ARM_Loding+'"></div>'),jQuery.ajax({type:"POST",url:__ARMAJAXURL,data:"action=arm_renew_plan_action&plan_id="+e+"&setup_id="+a+"&_wpnonce="+t,dataType:"html",success:function(e){for(var r=document.getElementsByTagName("script"),a=document.getElementsByTagName("link"),t=(r.length,a.length),n=!1,i=!1;t--;)void 0!==a[t].href&&a[t].href==o&&(n=!0),void 0!==a[t].href&&a[t].href==s&&(i=!0);n||arm_create_link_node(document,"link","arm_form_style_css",o),i||arm_create_link_node(document,"link","arm-font-awesome-css",s),jQuery(".arm_current_membership_container").html(e),arm_do_bootstrap_angular();var _=setInterval(function(){armSetupHideShowSections(jQuery(".arm_membership_setup_form")),setTimeout(function(){jQuery(".arm_current_membership_container_loader_img").remove(),jQuery(".arm_current_membership_container .arm_setup_form_container").css("display","block")},1e3),clearInterval(_)},1e3)}})}),jQuery(document).ready(function(){jQuery(".arm_current_membership_container").length&&jQuery(".arm_current_membership_container").outerWidth()<=768&&(jQuery(".arm_current_membership_container").css("overflow-x","auto"),jQuery(".arm_current_membership_list_header th#arm_cm_plan_action_btn").css("min-width","100px"),jQuery(".arm_cm_renew_btn_div").css("width","100%"),jQuery(".arm_cm_cancel_btn_div").css("width","100%"),jQuery(".arm_cm_cancel_btn_div").css("margin-top","10px"))}),jQuery(document).on("click",'[data-id="arm_setup_two_step_next"]',function(){var e=jQuery(this).parents("form");e.find(".arm_module_forms_main_container").removeClass("arm_hide"),e.find(".arm_setup_gatewaybox_main_wrapper").removeClass("arm_hide"),e.find(".arm_payment_mode_main_wrapper").removeClass("arm_hide"),e.find(".arm_setup_summary_text_main_container").removeClass("arm_hide"),e.find(".arm_setup_summary_text_container").removeClass("arm_hide"),e.find(".arm_setup_submit_btn_main_wrapper").removeClass("arm_hide"),e.find(".arm_setup_paymentcyclebox_main_wrapper").slideUp(),e.find(".arm_module_plans_main_container").slideUp(),e.find(".arm_setup_two_step_next_wrapper").slideUp(),e.find(".arm_setup_two_step_previous_wrapper").slideDown(),arm_set_plan_height(e)}),jQuery(document).on("click",'[data-id="arm_setup_two_step_previous"]',function(){var e=jQuery(this).parents("form");e.find(".arm_module_forms_main_container").addClass("arm_hide"),e.find(".arm_setup_gatewaybox_main_wrapper").addClass("arm_hide"),e.find(".arm_payment_mode_main_wrapper").addClass("arm_hide"),e.find(".arm_setup_summary_text_main_container").removeClass("arm_hide"),e.find(".arm_setup_summary_text_container").addClass("arm_hide"),e.find(".arm_setup_submit_btn_main_wrapper").addClass("arm_hide"),e.find(".arm_setup_paymentcyclebox_main_wrapper").slideDown(),e.find(".arm_module_plans_main_container").slideDown(),e.find(".arm_setup_two_step_next_wrapper").slideDown(),e.find(".arm_setup_two_step_previous_wrapper").slideUp()}),jQuery.fn.hasScrollBar=function(){return this.get(0).scrollHeight>this.height()},jQuery(document).on("mouseup",function(e){var r,a;0<jQuery(".arm_popup_wrapper:visible").length&&(a=(r=jQuery(e.target)).parents(".md-select-menu-container").length,e=r.parents(".popup_content_text").length,(0==a&&1==e||r.hasClass("popup_content_text"))&&jQuery(".md-select-backdrop").trigger("click"))}),jQuery(document).on("click",".arm_visible_password, .arm_visible_password_material",function(){var e=jQuery(this).parents(".arm_form_input_container").find(".arm_form_input_box").attr("type");"text"==e?(jQuery(this).parents(".arm_form_input_container").find(".arm_form_input_box").attr("type","password"),jQuery(this).find("i").removeClass("armfa-eye-slash"),jQuery(this).find("i").addClass("armfa-eye")):"password"==e&&(jQuery(this).parents(".arm_form_input_container").find(".arm_form_input_box").attr("type","text"),jQuery(this).find("i").removeClass("armfa-eye"),jQuery(this).find("i").addClass("armfa-eye-slash"))}),jQuery(document).on("click",".arm_visible_password_admin",function(){var e=jQuery(this).parents("td").find(".arm_member_form_input").attr("type");"text"==e?(jQuery(this).parents("td").find(".arm_member_form_input").attr("type","password"),jQuery(this).find("i").removeClass("armfa-eye-slash"),jQuery(this).find("i").addClass("armfa-eye")):"password"==e&&(jQuery(this).parents("td").find(".arm_member_form_input").attr("type","text"),jQuery(this).find("i").removeClass("armfa-eye"),jQuery(this).find("i").addClass("armfa-eye-slash"))});