// source --> https://healthpages.co.nz/wp-content/plugins/sabai/assets/js/bootstrap.min.js +function(b){function a(){var e=document.createElement("bootstrap");var d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in d){if(e.style[c]!==undefined){return{end:d[c]}}}return false}b.fn.emulateTransitionEnd=function(e){var d=false;var c=this;b(this).one("bsTransitionEnd",function(){d=true});var f=function(){if(!d){b(c).trigger(b.support.transition.end)}};setTimeout(f,e);return this};b(function(){b.support.transition=a();if(!b.support.transition){return}b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(c){if(b(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(h){var e=".sabai-dropdown-backdrop";var b='[data-toggle="dropdown"]';var a=function(i){h(i).on("click.bs.sabaidropdown",this.toggle)};a.VERSION="3.2.0";a.prototype.toggle=function(m){var l=h(this);if(l.is(".sabai-disabled, :disabled")){return}var k=f(l);var j=k.hasClass("sabai-open");d();if(!j){if("ontouchstart" in document.documentElement&&!k.closest(".sabai-navbar-nav").length){h('
').insertAfter(h(this)).on("click",d)}var i={relatedTarget:this};k.trigger(m=h.Event("show.bs.sabaidropdown",i));if(m.isDefaultPrevented()){return}l.trigger("focus");k.toggleClass("sabai-open").trigger("shown.bs.sabaidropdown",i)}return false};a.prototype.keydown=function(m){if(!/(38|40|27)/.test(m.keyCode)){return}var l=h(this);m.preventDefault();m.stopPropagation();if(l.is(".sabai-disabled, :disabled")){return}var k=f(l);var j=k.hasClass("sabai-open");if(!j||(j&&m.keyCode==27)){if(m.which==27){k.find(b).trigger("focus")}return l.trigger("click")}var n=" li:not(.sabai-divider):visible a";var o=k.find('[role="menu"]'+n+', [role="listbox"]'+n);if(!o.length){return}var i=o.index(o.filter(":focus"));if(m.keyCode==38&&i>0){i--}if(m.keyCode==40&&i
',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};c.prototype.init=function(l,j,g){this.enabled=true;this.type=l;this.$element=d(j);this.options=this.getOptions(g);this.$viewport=this.options.viewport&&d(this.options.viewport.selector||this.options.viewport);var k=this.options.trigger.split(" ");for(var h=k.length;h--;){var f=k[h];if(f=="click"){this.$element.on("click."+this.type,this.options.selector,d.proxy(this.toggle,this))}else{if(f!="manual"){var m=f=="hover"?"mouseenter":"focusin";var e=f=="hover"?"mouseleave":"focusout";this.$element.on(m+"."+this.type,this.options.selector,d.proxy(this.enter,this));this.$element.on(e+"."+this.type,this.options.selector,d.proxy(this.leave,this))}}}this.options.selector?(this._options=d.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()};c.prototype.getDefaults=function(){return c.DEFAULTS};c.prototype.getOptions=function(e){e=d.extend({},this.getDefaults(),this.$element.data(),e);if(e.delay&&typeof e.delay=="number"){e.delay={show:e.delay,hide:e.delay}}return e};c.prototype.getDelegateOptions=function(){var e={};var f=this.getDefaults();this._options&&d.each(this._options,function(g,h){if(f[g]!=h){e[g]=h}});return e};c.prototype.enter=function(f){var e=f instanceof this.constructor?f:d(f.currentTarget).data("bs."+this.type);if(!e){e=new this.constructor(f.currentTarget,this.getDelegateOptions());d(f.currentTarget).data("bs."+this.type,e)}clearTimeout(e.timeout);e.hoverState="in";if(!e.options.delay||!e.options.delay.show){return e.show()}e.timeout=setTimeout(function(){if(e.hoverState=="in"){e.show()}},e.options.delay.show)};c.prototype.leave=function(f){var e=f instanceof this.constructor?f:d(f.currentTarget).data("bs."+this.type);if(!e){e=new this.constructor(f.currentTarget,this.getDelegateOptions());d(f.currentTarget).data("bs."+this.type,e)}clearTimeout(e.timeout);e.hoverState="out";if(!e.options.delay||!e.options.delay.hide){return e.hide()}e.timeout=setTimeout(function(){if(e.hoverState=="out"){e.hide()}},e.options.delay.hide)};c.prototype.show=function(){var q=d.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(q);var r=d.contains(document.documentElement,this.$element[0]);if(q.isDefaultPrevented()||!r){return}var p=this;var n=this.tip();var h=this.getUID(this.type);this.setContent();n.attr("id",h);this.$element.attr("aria-describedby",h);if(this.options.animation){n.addClass("sabai-fade")}var l=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement;var t=/\s?auto?\s?/i;var u=t.test(l);if(u){l=l.replace(t,"")||"top"}n.detach().css({top:0,left:0,display:"block"}).addClass("sabai-"+l).data("bs."+this.type,this);this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var s=this.getPosition();var f=n[0].offsetWidth;var o=n[0].offsetHeight;if(u){var j=l;var k=this.$element.parent();var m=this.getPosition(k);l=l=="bottom"&&s.top+s.height+o-m.scroll>m.height?"top":l=="top"&&s.top-m.scroll-o<0?"bottom":l=="right"&&s.right+f>m.width?"left":l=="left"&&s.left-fl.top+l.height){m.top=l.top+l.height-i}}}else{var o=k.left-g;var f=k.left+g+e;if(ol.width){m.left=l.left+l.width-f}}}return m};c.prototype.getTitle=function(){var g;var e=this.$element;var f=this.options;g=e.attr("data-original-title")||(typeof f.title=="function"?f.title.call(e[0]):f.title);return g};c.prototype.getUID=function(e){do{e+=~~(Math.random()*1000000)}while(document.getElementById(e));return e};c.prototype.tip=function(){return(this.$tip=this.$tip||d(this.options.template))};c.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".sabai-tooltip-arrow"))};c.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}};c.prototype.enable=function(){this.enabled=true};c.prototype.disable=function(){this.enabled=false};c.prototype.toggleEnabled=function(){this.enabled=!this.enabled};c.prototype.toggle=function(g){var f=this;if(g){f=d(g.currentTarget).data("bs."+this.type);if(!f){f=new this.constructor(g.currentTarget,this.getDelegateOptions());d(g.currentTarget).data("bs."+this.type,f)}}f.tip().hasClass("sabai-in")?f.leave(f):f.enter(f)};c.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};function b(e){return this.each(function(){var h=d(this);var g=h.data("bs.sabaitooltip");var f=typeof e=="object"&&e;if(!g&&e=="destroy"){return}if(!g){h.data("bs.sabaitooltip",(g=new c(this,f)))}if(typeof e=="string"){g[e]()}})}var a=d.fn.sabaitooltip;d.fn.sabaitooltip=b;d.fn.sabaitooltip.Constructor=c;d.fn.sabaitooltip.noConflict=function(){d.fn.sabaitooltip=a;return this}}(jQuery);+function(d){var c=function(f,e){this.init("sabaipopover",f,e)};if(!d.fn.sabaitooltip){throw new Error("Popover requires tooltip.js")}c.VERSION="3.2.0";c.DEFAULTS=d.extend({},d.fn.sabaitooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''});c.prototype=d.extend({},d.fn.sabaitooltip.Constructor.prototype);c.prototype.constructor=c;c.prototype.getDefaults=function(){return c.DEFAULTS};c.prototype.setContent=function(){var g=this.tip();var f=this.getTitle();var e=this.getContent();g.find(".sabai-popover-title")[this.options.html?"html":"text"](f);g.find(".sabai-popover-content").empty()[this.options.html?(typeof e=="string"?"html":"append"):"text"](e);g.removeClass("sabai-fade sabai-top sabai-bottom sabai-left sabai-right sabai-in");if(!g.find(".sabai-popover-title").html()){g.find(".sabai-popover-title").hide()}};c.prototype.hasContent=function(){return this.getTitle()||this.getContent()};c.prototype.getContent=function(){var e=this.$element;var f=this.options;return e.attr("data-content")||(typeof f.content=="function"?f.content.call(e[0]):f.content)};c.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".sabai-arrow"))};c.prototype.tip=function(){if(!this.$tip){this.$tip=d(this.options.template)}return this.$tip};function b(e){return this.each(function(){var h=d(this);var g=h.data("bs.sabaipopover");var f=typeof e=="object"&&e;if(!g&&e=="destroy"){return}if(!g){h.data("bs.sabaipopover",(g=new c(this,f)))}if(typeof e=="string"){g[e]()}})}var a=d.fn.sabaipopover;d.fn.sabaipopover=b;d.fn.sabaipopover.Constructor=c;d.fn.sabaipopover.noConflict=function(){d.fn.sabaipopover=a;return this}}(jQuery);+function(c){var d=function(f,e){this.$element=c(f).on("keydown.bs.sabaicarousel",c.proxy(this.keydown,this));this.$indicators=this.$element.find(".sabai-carousel-indicators");this.options=e;this.paused=this.sliding=this.interval=this.$active=this.$items=null;this.options.pause=="hover"&&this.$element.on("mouseenter.bs.sabaicarousel",c.proxy(this.pause,this)).on("mouseleave.bs.sabaicarousel",c.proxy(this.cycle,this))};d.VERSION="3.2.0";d.DEFAULTS={interval:5000,pause:"hover",wrap:true};d.prototype.keydown=function(f){switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return}f.preventDefault()};d.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(c.proxy(this.next,this),this.options.interval));return this};d.prototype.getItemIndex=function(e){this.$items=e.parent().children(".sabai-item");return this.$items.index(e||this.$active)};d.prototype.to=function(g){var f=this;var e=this.getItemIndex(this.$active=this.$element.find(".sabai-item.sabai-active"));if(g>(this.$items.length-1)||g<0){return}if(this.sliding){return this.$element.one("slid.bs.sabaicarousel",function(){f.to(g)})}if(e==g){return this.pause().cycle()}return this.slide(g>e?"next":"prev",c(this.$items[g]))};d.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".sabai-next, .sabai-prev").length&&c.support.transition){this.$element.trigger(c.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};d.prototype.next=function(){if(this.sliding){return}return this.slide("next")};d.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};d.prototype.slide=function(m,h){var p=this.$element.find(".sabai-item.sabai-active");var f=h||p[m]();var k=this.interval;var n=m=="next"?"left":"right";var i=m=="next"?"first":"last";var j=this;if(!f.length){if(!this.options.wrap){return}f=this.$element.find(".sabai-item")[i]()}if(f.hasClass("sabai-active")){return(this.sliding=false)}var l=f[0];var e=c.Event("slide.bs.sabaicarousel",{relatedTarget:l,direction:n});this.$element.trigger(e);if(e.isDefaultPrevented()){return}this.sliding=true;k&&this.pause();if(this.$indicators.length){this.$indicators.find(".sabai-active").removeClass("sabai-active");var g=c(this.$indicators.children()[this.getItemIndex(f)]);g&&g.addClass("sabai-active")}var o=c.Event("slid.bs.sabaicarousel",{relatedTarget:l,direction:n});if(c.support.transition&&this.$element.hasClass("sabai-slide")){f.addClass("sabai-"+m);f[0].offsetWidth;p.addClass("sabai-"+n);f.addClass("sabai-"+n);p.one("bsTransitionEnd",function(){f.removeClass(["sabai-"+m,"sabai-"+n].join(" ")).addClass("sabai-active");p.removeClass(["sabai-active","sabai-"+n].join(" "));j.sliding=false;setTimeout(function(){j.$element.trigger(o)},0)}).emulateTransitionEnd(p.css("transition-duration").slice(0,-1)*1000)}else{p.removeClass("sabai-active");f.addClass("sabai-active");this.sliding=false;this.$element.trigger(o)}k&&this.cycle();return this};function b(e){return this.each(function(){var i=c(this);var h=i.data("bs.sabaicarousel");var f=c.extend({},d.DEFAULTS,i.data(),typeof e=="object"&&e);var g=typeof e=="string"?e:f.slide;if(!h){i.data("bs.sabaicarousel",(h=new d(this,f)))}if(typeof e=="number"){h.to(e)}else{if(g){h[g]()}else{if(f.interval){h.pause().cycle()}}}})}var a=c.fn.sabaicarousel;c.fn.sabaicarousel=b;c.fn.sabaicarousel.Constructor=d;c.fn.sabaicarousel.noConflict=function(){c.fn.sabaicarousel=a;return this};c(document).on("click.bs.sabaicarousel.data-api","[data-slide], [data-slide-to]",function(k){var g;var j=c(this);var f=c(j.attr("data-target")||(g=j.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,""));if(!f.hasClass("sabai-carousel")){return}var h=c.extend({},f.data(),j.data());var i=j.attr("data-slide-to");if(i){h.interval=false}b.call(f,h);if(i){f.data("bs.sabaicarousel").to(i)}k.preventDefault()});c(window).on("load",function(){c('[data-ride="sabaicarousel"]').each(function(){var e=c(this);b.call(e,e.data())})})}(jQuery);+function(e){var d='[data-dismiss="alert"]';var b=function(f){e(f).on("click",d,this.close)};b.VERSION="3.2.0";b.prototype.close=function(j){var i=e(this);var g=i.attr("data-target");if(!g){g=i.attr("href");g=g&&g.replace(/.*(?=#[^\s]*$)/,"")}var h=e(g);if(j){j.preventDefault()}if(!h.length){h=i.hasClass("sabai-alert")?i:i.parent()}h.trigger(j=e.Event("close.bs.sabaialert"));if(j.isDefaultPrevented()){return}h.removeClass("in");function f(){h.detach().trigger("closed.bs.sabaialert").remove()}e.support.transition&&h.hasClass("sabai-fade")?h.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()};function c(f){return this.each(function(){var h=e(this);var g=h.data("bs.sabaialert");if(!g){h.data("bs.sabaialert",(g=new b(this)))}if(typeof f=="string"){g[f].call(h)}})}var a=e.fn.sabaialert;e.fn.sabaialert=c;e.fn.sabaialert.Constructor=b;e.fn.sabaialert.noConflict=function(){e.fn.sabaialert=a;return this};e(document).on("click.bs.sabaialert.data-api",d,b.prototype.close)}(jQuery);+function(d){var b=function(e){this.element=d(e)};b.VERSION="3.2.0";b.prototype.show=function(){var k=this.element;var h=k.closest("ul:not(.sabai-dropdown-menu)");var g=k.data("target");if(!g){g=k.attr("href");g=g&&g.replace(/.*(?=#[^\s]*$)/,"")}if(k.parent("li").hasClass("sabai-active")){return}var i=h.find(".sabai-active:last a")[0];var j=d.Event("show.bs.sabaitab",{relatedTarget:i});k.trigger(j);if(j.isDefaultPrevented()){return}var f=d(g);this.activate(k.closest("li"),h);this.activate(f,f.parent(),function(){k.trigger({type:"shown.bs.sabaitab",relatedTarget:i})})};b.prototype.activate=function(g,f,j){var e=f.find("> .sabai-active");var i=j&&d.support.transition&&e.hasClass("sabai-fade");function h(){e.removeClass("sabai-active").find("> .sabai-dropdown-menu > .sabai-active").removeClass("sabai-active");g.addClass("sabai-active");if(i){g[0].offsetWidth;g.addClass("sabai-in")}else{g.removeClass("sabai-fade")}if(g.parent(".sabai-dropdown-menu")){g.closest("li.sabai-dropdown").addClass("sabai-active")}j&&j()}i?e.one("bsTransitionEnd",h).emulateTransitionEnd(150):h();e.removeClass("sabai-in")};function c(e){return this.each(function(){var g=d(this);var f=g.data("bs.sabaitab");if(!f){g.data("bs.sabaitab",(f=new b(this)))}if(typeof e=="string"){f[e]()}})}var a=d.fn.tab;d.fn.sabaitab=c;d.fn.sabaitab.Constructor=b;d.fn.sabaitab.noConflict=function(){d.fn.sabaitab=a;return this};d(document).on("click.bs.sabaitab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(f){f.preventDefault();c.call(d(this),"show")})}(jQuery); // source --> https://healthpages.co.nz/wp-content/plugins/sabai/assets/js/bootstrap-growl.min.js (function(h,k,m,a){var j="growl",i="plugin_"+j,c={element:"body",type:"info",allow_dismiss:true,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5000,timer:1000,url_target:"_blank",mouse_over:false,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onHide:null,onHidden:null,icon_type:"class",template:''};var l=function(q,p){c=h.extend(true,{},c,p)},f=function(p){if(!p){h('[data-growl="container"]').find('[data-growl="dismiss"]').trigger("click")}else{h('[data-growl="container"][data-growl-position="'+p+'"]').find('[data-growl="dismiss"]').trigger("click")}},n=function(q,r,p){var r={content:{message:typeof r=="object"?r.message:r,title:r.title?r.title:null,icon:r.icon?r.icon:null,url:r.url?r.url:null}};p=h.extend(true,{},r,p);this.settings=h.extend(true,{},c,p);plugin=this;o(p,this.settings,plugin);this.$template=$template},o=function(p,q,r){var s={settings:q,$element:h(q.element),template:q.template};if(typeof q.offset=="number"){q.offset={x:q.offset,y:q.offset}}$template=b(s);g($template,s.settings);e($template,s.settings);d($template,s.settings,r)},b=function(q){var p=h(q.settings.template);p.addClass("sabai-alert-"+q.settings.type);p.attr("data-growl-position",q.settings.placement.from+"-"+q.settings.placement.align);p.find('[data-growl="dismiss"]').css("display","none");if(q.settings.allow_dismiss){p.find('[data-growl="dismiss"]').css("display","inline-block")}return p},g=function(p,q){p.find('[data-growl="dismiss"]').css({"z-index":((q.z_index-1)>=1?(q.z_index-1):1)});if(q.content.icon){if(q.icon_type.toLowerCase()=="class"){p.find('[data-growl="icon"]').addClass(q.content.icon)}else{if(p.find('[data-growl="icon"]').is("img")){p.find('[data-growl="icon"]').attr("src",q.content.icon)}else{p.find('[data-growl="icon"]').append('')}}}if(q.content.title){p.find('[data-growl="title"]').html(q.content.title)}if(q.content.message){p.find('[data-growl="message"]').html(q.content.message).css({"font-size":"14px","line-height":1.5})}if(q.content.url){p.find('[data-growl="url"]').attr("href",q.content.url).attr("target",q.url_target);p.find('[data-growl="url"]').css({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%","z-index":((q.z_index-2)>=1?(q.z_index-2):1)})}},e=function(q,r){var t=r.offset.y,p={position:(r.element==="body"?"fixed":"absolute"),margin:0,"z-index":r.z_index,display:"inline-block"},s=false;h('[data-growl-position="'+r.placement.from+"-"+r.placement.align+'"]').each(function(){return t=Math.max(t,parseInt(h(this).css(r.placement.from))+h(this).outerHeight()+r.spacing)});p[r.placement.from]=t+"px";q.css(p);if(r.onShow){r.onShow(event)}h(r.element).append(q);switch(r.placement.align){case"center":q.css({left:"50%",marginLeft:-(q.outerWidth()/2)+"px"});break;case"left":q.css("left",r.offset.x+"px");break;case"right":q.css("right",r.offset.x+"px");break}q.addClass("growl-animated");q.one("webkitAnimationStart oanimationstart MSAnimationStart animationstart",function(u){s=true});q.one("webkitAnimationEnd oanimationend MSAnimationEnd animationend",function(u){if(r.onShown){r.onShown(u)}});setTimeout(function(){if(!s){if(r.onShown){r.onShown(event)}}},600)},d=function(p,q,r){p.addClass(q.animate.enter);p.find('[data-growl="dismiss"]').on("click",function(){r.close()});p.on("mouseover",function(t){p.addClass("hovering")}).on("mouseout",function(){p.removeClass("hovering")});if(q.delay>=1){p.data("growl-delay",q.delay);var s=setInterval(function(){var t=parseInt(p.data("growl-delay"))-q.timer;if((!p.hasClass("hovering")&&q.mouse_over=="pause")||q.mouse_over!="pause"){p.data("growl-delay",t)}if(t<=0){clearInterval(s);r.close()}},q.timer)}};n.prototype={update:function(p,q){switch(p){case"icon":if(this.settings.icon_type.toLowerCase()=="class"){this.$template.find('[data-growl="icon"]').removeClass(this.settings.content.icon);this.$template.find('[data-growl="icon"]').addClass(q)}else{if(this.$template.find('[data-growl="icon"]').is("img")){this.$template.find('[data-growl="icon"]')}else{this.$template.find('[data-growl="icon"]').find("img").attr().attr("src",q)}}break;case"url":this.$template.find('[data-growl="url"]').attr("href",q);break;case"type":this.$template.removeClass("sabai-alert-"+this.settings.type);this.$template.addClass("sabai-alert-"+q);break;default:this.$template.find('[data-growl="'+p+'"]').html(q)}return this},close:function(){var r=this.$template,p=this.settings,s=r.css(p.placement.from),q=false;if(p.onHide){p.onHide(event)}r.addClass(this.settings.animate.exit);r.nextAll('[data-growl-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]').each(function(){h(this).css(p.placement.from,s);s=(parseInt(s)+(p.spacing))+h(this).outerHeight()});r.one("webkitAnimationStart oanimationstart MSAnimationStart animationstart",function(t){q=true});r.one("webkitAnimationEnd oanimationend MSAnimationEnd animationend",function(t){h(this).remove();if(p.onHidden){p.onHidden(t)}});setTimeout(function(){if(!q){r.remove();if(p.onHidden){p.onHidden(event)}}},100);return this}};h.growl=function(r,p){if(r==false&&p.command=="closeAll"){f(p.position);return false}else{if(r==false){l(this,p);return false}}var q=new n(this,r,p);return q}})(jQuery,window,document); // source --> https://healthpages.co.nz/wp-content/plugins/sabai/assets/js/jquery.scrollTo.min.js /*! * jQuery.scrollTo * Copyright (c) 2007-2015 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com * Licensed under MIT * http://flesler.blogspot.com/2007/10/jqueryscrollto.html * @projectDescription Easy element scrolling using jQuery. * @author Ariel Flesler * @version 2.1.0 */ ;(function(a){a(["jquery"],function(e){var b=e.sabaiScrollTo=function(h,g,f){return e(window).sabaiScrollTo(h,g,f)};b.defaults={axis:"xy",duration:0,limit:true};function c(f){return !f.nodeName||e.inArray(f.nodeName.toLowerCase(),["iframe","#document","html","body"])!==-1}e.fn.sabaiScrollTo=function(i,h,g){if(typeof h==="object"){g=h;h=0}if(typeof g==="function"){g={onAfter:g}}if(i==="max"){i=9000000000}g=e.extend({},b.defaults,g);h=h||g.duration;var f=g.queue&&g.axis.length>1;if(f){h/=2}g.offset=d(g.offset);g.over=d(g.over);return this.each(function(){if(i===null){return}var p=c(this),o=p?this.contentWindow||window:this,m=e(o),n=i,j={},l;switch(typeof n){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(n)){n=d(n);break}n=p?e(n):e(n,o);if(!n.length){return}case"object":if(n.is||n.style){l=(n=e(n)).offset()}}var q=e.isFunction(g.offset)&&g.offset(o,n)||g.offset;e.each(g.axis.split(""),function(t,u){var w=u==="x"?"Left":"Top",y=w.toLowerCase(),s="scroll"+w,v=m[s](),r=b.max(o,u);if(l){j[s]=l[y]+(p?0:v-m.offset()[y]);if(g.margin){j[s]-=parseInt(n.css("margin"+w),10)||0;j[s]-=parseInt(n.css("border"+w+"Width"),10)||0}j[s]+=q[y]||0;if(g.over[y]){j[s]+=n[u==="x"?"width":"height"]()*g.over[y]}}else{var x=n[y];j[s]=x.slice&&x.slice(-1)==="%"?parseFloat(x)/100*r:x}if(g.limit&&/^\d+$/.test(j[s])){j[s]=j[s]<=0?0:Math.min(j[s],r)}if(!t&&g.axis.length>1){if(v===j[s]){j={}}else{if(f){k(g.onAfterFirst);j={}}}}});k(g.onAfter);function k(s){var r=e.extend({},g,{queue:true,duration:h,complete:s&&function(){s.call(o,n,g)}});m.animate(j,r)}})};b.max=function(l,k){var j=k==="x"?"Width":"Height",g="scroll"+j;if(!c(l)){return l[g]-e(l)[j.toLowerCase()]()}var i="client"+j,m=l.ownerDocument||l.document,h=m.documentElement,f=m.body;return Math.max(h[g],f[g])-Math.min(h[i],f[i])};function d(f){return e.isFunction(f)||e.isPlainObject(f)?f:{top:f,left:f}}e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(f){return e(f.elem)[f.prop]()},set:function(f){var h=this.get(f);if(f.options.interrupt&&f._last&&f._last!==h){return e(f.elem).stop()}var g=Math.round(f.now);if(h!==g){e(f.elem)[f.prop](g);f._last=this.get(f)}}};return b})}(typeof define==="function"&&define.amd?define:function(b,a){if(typeof module!=="undefined"&&module.exports){module.exports=a(require("jquery"))}else{a(jQuery)}})); // source --> https://healthpages.co.nz/wp-content/plugins/sabai/assets/js/jquery-ajaxreadystate.min.js /*! * jquery-ajaxreadystate * @version 1.1.0 * @author Alexander O'Mara * @copyright Copyright (c) 2015 Alexander O'Mara * @license MPL 2.0 */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.ajaxreadystate=function(b,c){function d(){p=k.readyState=h.readyState,2>p&&(k.status=0,k.statusText="",k.responseText="");try{k.status=h.status||0}catch(a){}try{k.statusText=h.statusText||""}catch(a){}try{k.responseText=h.responseText||""}catch(a){}"function"==typeof j.readystate&&j.readystate(k,p),n&&4===p&&h.removeEventListener(n,d,!0),l&&l!==d&&l.apply(h,arguments)}function e(){var a=null;try{a=h.getAllResponseHeaders()}catch(b){}return a}var f,g,h,i,j,k,l,m,n,o=null,p=0;if(j="object"==typeof b?b:c||{},i=j.beforeSend,j.beforeSend=function(a,b){j.beforeSend=i,i&&i.apply(c,arguments),k=a,k.getAllResponseHeaders=function(){return p>1&&(o=o||e()),o},k.getResponseHeader=function(a){var b=null,c=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm;if(p>1){if(o=o||e(),o&&!m)for(m={};b=c.exec(o);)m[b[1].toLowerCase()]=b[2];m&&(a=a.toLowerCase(),b=m.hasOwnProperty(a)?m[a]:null)}return b},j=b,g=j.xhr,j.xhr=function(){j.xhr=g,h=g.apply(j,arguments),h.onreadystatechange=d;try{n=h.onreadystatechange!==d}catch(a){n=!0}return n&&(n=h.addEventListener)&&(h.onreadystatechange=null,h.addEventListener(n="readystatechange",d,!0)),h}},f=a.ajax.apply(a,arguments),!n)try{l=h.onreadystatechange,h.onreadystatechange=d}catch(q){}return f}}); // source --> https://healthpages.co.nz/wp-content/plugins/sabai/assets/js/jquery.autosize.min.js /*! Autosize 1.18.18 license: MIT http://www.jacklmoore.com/autosize */ !function(e){var t,o={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},i=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],a=e('