/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
archub
/
assets
/
js
/
Upload File
HOME
"use strict"; /*! * MODIFIED BY LIQUID THEMES * * pagepiling.js 1.5.5 * * https://github.com/alvarotrigo/pagePiling.js * @license MIT licensed * * Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo */!function(t,n,e){t.fn.pagepiling=function(o){function i(t){t.addClass("pp-table"),t.children(".pp-tableCell").length||t.wrapInner('<div class="pp-tableCell" style="height:100%"><div class="lqd-stack-section-inner"></div></div>')}function a(n){var e,o;return t(".pp-section.active").index(".pp-section")>n.index(".pp-section")?"up":"down"}function s(n,e){var o={destination:n,animated:e,activeSection:t(".pp-section.active"),anchorLink:n.data("anchor"),sectionIndex:n.index(".pp-section"),toMove:n,yMovement:a(n),leavingSection:t(".pp-section.active").index(".pp-section")+1};if(!o.activeSection.is(n)){if(void 0===o.animated&&(o.animated=!0),void 0!==o.anchorLink&&v(o.anchorLink,o.sectionIndex),o.destination.addClass("active").siblings().removeClass("active"),o.sectionsToMove=l(o),"down"===o.yMovement){if(o.translate3d="",o.destination.is(".pp-auto-height")){var i=-1*o.destination.outerHeight()+"px";o.translate3d="translate3d(0px, ".concat(i,", 0px)"),o.scrolling=i,o.sectionsToMove=o.activeSection}else o.scrolling="-100%";Z.css3||o.sectionsToMove.each((function(n){n!=o.activeSection.index(".pp-section")&&t(this).css(d(o.scrolling))})),o.animateSection=o.activeSection}else o.translate3d="",o.scrolling="0",o.animateSection=n;t.isFunction(Z.onLeave)&&Z.onLeave.call(this,o.leavingSection,o.sectionIndex+1,o.yMovement),c(o),A(o.anchorLink),q(o.anchorLink,o.sectionIndex),B=o.anchorLink;var s=(new Date).getTime();O=s}}function c(n){Z.css3?(w(n.animateSection,n.translate3d),n.sectionsToMove.each((function(){w(t(this),n.translate3d)})),setTimeout((function(){r(n)}),Z.scrollingSpeed)):(n.scrollOptions=d(n.scrolling),n.animated?n.animateSection.animate(n.scrollOptions,Z.scrollingSpeed,Z.easing,(function(){p(n),r(n)})):(n.animateSection.css(d(n.scrolling)),setTimeout((function(){p(n),r(n)}),400)))}function r(n){t.isFunction(Z.afterLoad)&&Z.afterLoad.call(this,n.anchorLink,n.sectionIndex+1)}function l(n){var e;return e="down"===n.yMovement?t(".pp-section").map((function(e){if(e<n.destination.index(".pp-section"))return t(this)})):t(".pp-section").map((function(e){if(e>n.destination.index(".pp-section"))return t(this)}))}function p(n){"up"===n.yMovement&&n.sectionsToMove.each((function(){t(this).css(d(n.scrolling))}))}function d(t){return"vertical"===Z.direction?{top:t}:{left:t}}function v(t,n){Z.anchors.length?(location.hash=t,h(location.hash)):h(String(n))}function h(n){n=n.replace("#",""),t("body")[0].className=t("body")[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g,""),t("body").addClass("pp-viewing-"+n)}function u(){var o,i=e.location.hash.replace("#",""),a=t(n).find('.pp-section[data-anchor="'+i+'"]');a.length>0&&s(a,Z.animateAnchor)}function f(){var t;return(new Date).getTime()-O<V+Z.scrollingSpeed}function m(){var o,i=e.location.hash.replace("#","").split("/")[0],a;i.length&&(i&&i!==B&&s(a=isNaN(i)?t(n).find('[data-anchor="'+i+'"]'):t(".pp-section").eq(i-1)))}function g(t){return{"-webkit-transform":t,"-moz-transform":t,"-ms-transform":t,transform:t}}function w(t,n){t.css(g(n))}function S(n){var o=(new Date).getTime(),i=(n=n||e.event).wheelDelta||-n.deltaY||-n.detail,a=Math.max(-1,Math.min(1,i)),s=void 0!==n.wheelDeltaX||void 0!==n.deltaX,c=Math.abs(n.wheelDeltaX)<Math.abs(n.wheelDelta)||Math.abs(n.deltaX)<Math.abs(n.deltaY)||!s;K.length>149&&K.shift(),K.push(Math.abs(i));var r=o-J;if(J=o,r>200&&(K=[]),!f()){var l,p=y(t(".pp-section.active")),d,v,h;return b(K,10)>=b(K,70)&&c&&(a<0?x("down",p):a>0&&x("up",p)),!1}}function b(t,n){for(var e=0,o=t.slice(Math.max(t.length-n,1)),i=0;i<o.length;i++)e+=o[i];return Math.ceil(e/n)}function x(t,n){var e,o;if("down"==t?(e="bottom",o=W.moveSectionDown):(e="top",o=W.moveSectionUp),n.length>0){if(!M(e,n))return!0;o()}else o()}function M(t,n){return"top"===t?!n.scrollTop():"bottom"===t?n.scrollTop()+1+n.innerHeight()>=n[0].scrollHeight:void 0}function y(t){return t.filter(".pp-scrollable")}function T(){z.get(0).addEventListener?(z.get(0).removeEventListener("mousewheel",S,!1),z.get(0).removeEventListener("wheel",S,!1)):z.get(0).detachEvent("onmousewheel",S)}function C(){z.get(0).addEventListener?(z.get(0).addEventListener("mousewheel",S,!1),z.get(0).addEventListener("wheel",S,!1)):z.get(0).attachEvent("onmousewheel",S)}function k(){if(F){var t=L();z.off("touchstart "+t.down).on("touchstart "+t.down,I),z.off("touchmove "+t.move).on("touchmove "+t.move,P)}}function E(){if(F){var t=L();z.off("touchstart "+t.down),z.off("touchmove "+t.move)}}function L(){var t;return t=e.PointerEvent?{down:"pointerdown",move:"pointermove",up:"pointerup"}:{down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp"}}function D(t){var n=new Array;return n.y=void 0!==t.pageY&&(t.pageY||t.pageX)?t.pageY:t.touches[0].pageY,n.x=void 0!==t.pageX&&(t.pageY||t.pageX)?t.pageX:t.touches[0].pageX,n}function X(t){return void 0===t.pointerType||"mouse"!=t.pointerType}function I(t){var n=t.originalEvent;if(X(n)){var e=D(n);H=e.y,Q=e.x}}function P(n){var e=n.originalEvent;if(!Y(n.target)&&X(e)){var o,i=y(t(".pp-section.active"));if(i.length||n.preventDefault(),!f()){var a=D(e);R=a.y,j=a.x,"horizontal"===Z.direction&&Math.abs(Q-j)>Math.abs(H-R)?Math.abs(Q-j)>z.width()/100*Z.touchSensitivity&&(Q>j?x("down",i):j>Q&&x("up",i)):Math.abs(H-R)>z.height()/100*Z.touchSensitivity&&(H>R?x("down",i):R>H&&x("up",i))}}}function Y(n,e){e=e||0;var o=t(n).parent();return!!(e<Z.normalScrollElementTouchThreshold&&o.is(Z.normalScrollElements))||e!=Z.normalScrollElementTouchThreshold&&Y(o,++e)}function N(){t("body").append('<div id="pp-nav"><div class="pp-nav-inner"><span class="pp-nav-current"><span></span></span><ul class="pp-nav-ul reset-ul"></ul></div></div>');for(var n=t("#pp-nav"),e=t(".pp-section").not(".main-footer").length,o=0;o<e;o++){var i="";if(Z.anchors.length&&(i=Z.anchors[o]),"undefined"!==Z.navigation.tooltips){var a=Z.navigation.tooltips[o];void 0===a&&(a="")}n.find(".pp-nav-current > span").append("<span>".concat(o<10?"0"+(o+1):o+1,"</span>")),n.find("ul").append('<li data-tooltip="'.concat(a,'">\n\t\t\t\t\t\t\t<a href="#').concat(i,'">\n\t\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t\t<svg width="29px" height="29px" viewBox="0 0 29 29" stroke="#000" stroke-width="1" fill="none" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t\t\t\t\t\t\t<path d="M14.5,28 C21.9558441,28 28,21.9558441 28,14.5 C28,7.04415588 21.9558441,1 14.5,1 C7.04415588,1 1,7.04415588 1,14.5 C1,21.9558441 7.04415588,28 14.5,28 Z"></path>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<span class="pp-tooltip">').concat(a,"</span>\n\t\t\t\t\t\t</li>"))}n.children().append('<span class="pp-nav-total">'.concat(e<10?"0"+e:e,"</span>"))}function q(n,e){if(Z.navigation){const o=t("#pp-nav");o.find(".active").removeClass("active"),n?o.find('a[href="#'+n+'"]').parent().addClass("active"):o.find("li").eq(e).addClass("active")}}function A(n){Z.menu&&(t(Z.menu).find(".active").removeClass("active"),t(Z.menu).find('[data-menuanchor="'+n+'"]').addClass("active"))}function U(){var t=n.createElement("p"),o,i={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};for(var a in n.body.insertBefore(t,null),i)void 0!==t.style[a]&&(t.style[a]="translate3d(1px,1px,1px)",o=e.getComputedStyle(t).getPropertyValue(i[a]));return n.body.removeChild(t),void 0!==o&&o.length>0&&"none"!==o}var W=t.fn.pagepiling,z=t(this),B,O=0,F="ontouchstart"in e||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,H=0,Q=0,R=0,j=0,K=[],V=600,Z=t.extend(!0,{direction:"vertical",menu:null,verticalCentered:!0,sectionsColor:[],anchors:[],scrollingSpeed:700,easing:"easeInQuart",loopBottom:!1,loopTop:!1,css3:!0,navigation:{textColor:"#000",bulletsColor:"#000",tooltips:[]},normalScrollElements:null,normalScrollElementTouchThreshold:5,touchSensitivity:5,keyboardScrolling:!0,sectionSelector:".section",animateAnchor:!1,afterLoad:null,onLeave:null,afterRender:null},o);t.extend(t.easing,{easeInQuart:function t(n,e,o,i,a){return i*(e/=a)*e*e*e+o}}),W.setScrollingSpeed=function(t){Z.scrollingSpeed=t},W.setMouseWheelScrolling=function(t){t?C():T()},W.setAllowScrolling=function(t){t?(W.setMouseWheelScrolling(!0),k()):(W.setMouseWheelScrolling(!1),E())},W.setKeyboardScrolling=function(t){Z.keyboardScrolling=t},W.moveSectionUp=function(){var n=t(".pp-section.active").prev(".pp-section");!n.length&&Z.loopTop&&(n=t(".pp-section").last()),n.length&&s(n)},W.moveSectionDown=function(){var n=t(".pp-section.active").next(".pp-section");!n.length&&Z.loopBottom&&(n=t(".pp-section").first()),n.length&&s(n)},W.moveTo=function(e){var o="";(o=isNaN(e)?t(n).find('[data-anchor="'+e+'"]'):t(".pp-section").eq(e-1)).length>0&&s(o)},t(Z.sectionSelector).each((function(){t(this).addClass("pp-section")})),Z.css3&&(Z.css3=U()),t(z).css({overflow:"hidden","-ms-touch-action":"none","touch-action":"none"}),W.setAllowScrolling(!0),t.isEmptyObject(Z.navigation)||N();var G=t(".pp-section").length;t(".pp-section").each((function(n){t(this).data("data-index",n),n||0!==t(".pp-section.active").length||t(this).addClass("active"),void 0!==Z.anchors[n]&&t(this).attr("data-anchor",Z.anchors[n]),void 0!==Z.sectionsColor[n]&&t(this).css("background-color",Z.sectionsColor[n]),Z.verticalCentered&&!t(this).hasClass("pp-scrollable")&&i(t(this)),G-=1})).promise().done((function(){Z.navigation&&t("#pp-nav").find("li").eq(t(".pp-section.active").index(".pp-section")).addClass("active"),t(e).on("load",(function(){u()})),t.isFunction(Z.afterRender)&&Z.afterRender.call(this)})),t(e).on("hashchange",m),t(n).keydown((function(n){if(Z.keyboardScrolling&&!f())switch(n.which){case 38:case 33:W.moveSectionUp();break;case 40:case 34:W.moveSectionDown();break;case 36:W.moveTo(1);break;case 35:W.moveTo(t(".pp-section").length);break;case 37:W.moveSectionUp();break;case 39:W.moveSectionDown();break;default:return}})),Z.normalScrollElements&&(t(n).on("mouseenter",Z.normalScrollElements,(function(){W.setMouseWheelScrolling(!1)})),t(n).on("mouseleave",Z.normalScrollElements,(function(){W.setMouseWheelScrolling(!0)})));var J=(new Date).getTime()}}(jQuery,document,window);