diff --git a/bower.json b/bower.json
index e3866af..49d0020 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
 {
   "name": "pagePiling.js",
-  "version": "1.5",
+  "version": "1.5.1",
   "homepage": "https://github.com/alvarotrigo/pagePiling.js",
   "authors": [
     "Alvaro Trigo https://github.com/alvarotrigo"
diff --git a/jquery.pagepiling.js b/jquery.pagepiling.js
index 0697ad0..0523e7a 100644
--- a/jquery.pagepiling.js
+++ b/jquery.pagepiling.js
@@ -1,5 +1,5 @@
 /* ===========================================================
- * pagepiling.js 1.5
+ * pagepiling.js 1.5.1
  *
  * https://github.com/alvarotrigo/pagePiling.js
  * MIT licensed
@@ -9,13 +9,15 @@
  * ========================================================== */
 
 (function ($, document, window, undefined) {
+    'use strict';
+
     $.fn.pagepiling = function (custom) {
         var PP = $.fn.pagepiling;
         var container = $(this);
         var lastScrolledDestiny;
         var lastAnimation = 0;
         var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));
-        var touchStartY = touchStartX = touchEndY = touchEndX = 0;
+        var touchStartY = 0, touchStartX = 0, touchEndY = 0, touchEndX = 0;
 
         //Defines the delay to take place before being able to scroll to the next section
         //BE CAREFUL! Not recommened to change it under 400 for a good behavior in laptops and
@@ -23,7 +25,7 @@
         var scrollDelay = 600;
 
         // Create some defaults, extending them with any options that were provided
-        options = $.extend(true, {
+        var options = $.extend(true, {
             direction: 'vertical',
             menu: null,
             verticalCentered: true,
@@ -188,7 +190,7 @@
                 $(this).css('background-color', options.sectionsColor[index]);
             }
 
-            if(options.verticalCentered){
+            if(options.verticalCentered && !$(this).hasClass('pp-scrollable')){
                 addTableClass($(this));
             }
 
@@ -314,8 +316,8 @@
 
                 if(v.animated){
                     v.animateSection.animate(
-                        v.scrollOptions
-                    , options.scrollingSpeed, options.easing, function () {
+                        v.scrollOptions,
+                    options.scrollingSpeed, options.easing, function () {
                         readjustSections(v);
                         afterSectionLoads(v);
                     });
@@ -362,15 +364,11 @@
         * Returns the sections to re-adjust in the background after the section loads.
         */
         function readjustSections(v){
-            var readjustSections;
-
             if(v.yMovement === 'up'){
                 v.sectionsToMove.each(function(index){
                     $(this).css(getScrollProp(v.scrolling));
                 });
             }
-
-            return readjustSections;
         }
 
         /**
@@ -417,10 +415,10 @@
             text = text.replace('#','');
 
             //removing previous anchor classes
-            $("body")[0].className = $("body")[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g, '');
+            $('body')[0].className = $('body')[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g, '');
 
             //adding the current anchor
-            $("body").addClass("pp-viewing-" + text);
+            $('body').addClass('pp-viewing-' + text);
         }
 
         //TO DO
@@ -460,17 +458,16 @@
             var sectionAnchor = value[0];
 
             if(sectionAnchor.length){
-                //when moving to a slide in the first section for the first time (first time to add an anchor to the URL)
-                var isFirstMove =  (typeof lastScrolledDestiny === 'undefined');
-
                 /*in order to call scrollpage() only once for each destination at a time
                 It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange`
                 event is fired on every scroll too.*/
                 if (sectionAnchor && sectionAnchor !== lastScrolledDestiny)  {
+                    var section;
+
                     if(isNaN(sectionAnchor)){
-                        var section = $('[data-anchor="'+sectionAnchor+'"]');
+                        section = $('[data-anchor="'+sectionAnchor+'"]');
                     }else{
-                        var section = $('.pp-section').eq( (sectionAnchor -1) );
+                        section = $('.pp-section').eq( (sectionAnchor -1) );
                     }
                     scrollPage(section);
                 }
@@ -592,12 +589,15 @@
         * by 'automatically' scrolling a section or by using the default and normal scrolling.
         */
         function scrolling(type, scrollable){
+            var check;
+            var scrollSection;
+
             if(type == 'down'){
-                var check = 'bottom';
-                var scrollSection = PP.moveSectionDown;
+                check = 'bottom';
+                scrollSection = PP.moveSectionDown;
             }else{
-                var check = 'top';
-                var scrollSection = PP.moveSectionUp;
+                check = 'top';
+                scrollSection = PP.moveSectionUp;
             }
 
             if(scrollable.length > 0 ){
@@ -629,13 +629,9 @@
         * Determines whether the active section or slide is scrollable through and scrolling bar
         */
         function isScrollable(activeSection){
-            scrollable = activeSection.filter('.pp-scrollable');
-
-            return scrollable;
+            return activeSection.filter('.pp-scrollable');
         }
 
-
-
         /**
         * Removes the auto scrolling action fired by the mouse wheel and tackpad.
         * After this function is called, the mousewheel and trackpad movements won't scroll through sections.
@@ -645,7 +641,7 @@
                 container.get(0).removeEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper
                 container.get(0).removeEventListener('wheel', MouseWheelHandler, false); //Firefox
             } else {
-                container.get(0).detachEvent("onmousewheel", MouseWheelHandler); //IE 6/7/8
+                container.get(0).detachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8
             }
         }
 
@@ -655,10 +651,10 @@
         */
         function addMouseWheelHandler(){
             if (container.get(0).addEventListener) {
-                container.get(0).addEventListener("mousewheel", MouseWheelHandler, false); //IE9, Chrome, Safari, Oper
-                container.get(0).addEventListener("wheel", MouseWheelHandler, false); //Firefox
+                container.get(0).addEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper
+                container.get(0).addEventListener('wheel', MouseWheelHandler, false); //Firefox
             } else {
-                container.get(0).attachEvent("onmousewheel", MouseWheelHandler); //IE 6/7/8
+                container.get(0).attachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8
             }
         }
 
@@ -668,7 +664,7 @@
         function addTouchHandler(){
             if(isTouch){
                 //Microsoft pointers
-                MSPointer = getMSPointer();
+                var MSPointer = getMSPointer();
 
                 container.off('touchstart ' +  MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);
                 container.off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);
@@ -681,7 +677,7 @@
         function removeTouchHandler(){
             if(isTouch){
                 //Microsoft pointers
-                MSPointer = getMSPointer();
+                var MSPointer = getMSPointer();
 
                 container.off('touchstart ' + MSPointer.down);
                 container.off('touchmove ' + MSPointer.move);
@@ -697,12 +693,12 @@
 
             //IE >= 11 & rest of browsers
             if(window.PointerEvent){
-                pointer = { down: "pointerdown", move: "pointermove", up: "pointerup"};
+                pointer = { down: 'pointerdown', move: 'pointermove', up: 'pointerup'};
             }
 
             //IE < 11
             else{
-                pointer = { down: "MSPointerDown", move: "MSPointerMove", up: "MSPointerUp"};
+                pointer = { down: 'MSPointerDown', move: 'MSPointerMove', up: 'MSPointerUp'};
             }
 
             return pointer;
@@ -715,8 +711,8 @@
         function getEventsPage(e){
             var events = new Array();
 
-            events['y'] = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);
-            events['x'] = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);
+            events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);
+            events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);
 
             return events;
         }
@@ -738,8 +734,8 @@
 
             if(isReallyTouch(e)){
                 var touchEvents = getEventsPage(e);
-                touchStartY = touchEvents['y'];
-                touchStartX = touchEvents['x'];
+                touchStartY = touchEvents.y;
+                touchStartX = touchEvents.x;
             }
         }
 
@@ -757,8 +753,8 @@
 
                 if (!isMoving()) {
                     var touchEvents = getEventsPage(e);
-                    touchEndY = touchEvents['y'];
-                    touchEndX = touchEvents['x'];
+                    touchEndY = touchEvents.y;
+                    touchEndX = touchEvents.x;
 
                   //$('body').append('<span style="position:fixed; top: 250px; left: 20px; z-index:88; font-size: 25px; color: #000;">touchEndY: ' + touchEndY  + '</div>');
 
@@ -906,14 +902,14 @@
 
             for (var t in transforms) {
                 if (el.style[t] !== undefined) {
-                    el.style[t] = "translate3d(1px,1px,1px)";
+                    el.style[t] = 'translate3d(1px,1px,1px)';
                     has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
                 }
             }
 
             document.body.removeChild(el);
 
-            return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
+            return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');
         }
 
         /**
@@ -928,4 +924,4 @@
         }
 
     };
-}(jQuery, document, window));
\ No newline at end of file
+})(jQuery, document, window);
\ No newline at end of file
diff --git a/jquery.pagepiling.min.js b/jquery.pagepiling.min.js
index cad228e..c1b46c4 100644
--- a/jquery.pagepiling.min.js
+++ b/jquery.pagepiling.min.js
@@ -1,5 +1,5 @@
 /* ===========================================================
- * pagepiling.js 1.5
+ * pagepiling.js 1.5.1
  *
  * https://github.com/alvarotrigo/pagePiling.js
  * MIT licensed
@@ -7,22 +7,21 @@
  * Copyright (C) 2014 alvarotrigo.com - A project by Alvaro Trigo
  *
  * ========================================================== */
-(function(b,g,h,u){b.fn.pagepiling=function(G){function H(a){var d=b(".pp-section.active").index(".pp-section");a=a.index(".pp-section");return d>a?"up":"down"}function k(a,d){var c={destination:a,animated:d,activeSection:b(".pp-section.active"),anchorLink:a.data("anchor"),sectionIndex:a.index(".pp-section"),toMove:a,yMovement:H(a),leavingSection:b(".pp-section.active").index(".pp-section")+1};c.activeSection.is(a)||("undefined"===typeof c.animated&&(c.animated=!0),"undefined"!==typeof c.anchorLink&&
-I(c.anchorLink,c.sectionIndex),c.destination.addClass("active").siblings().removeClass("active"),c.sectionsToMove=J(c),"down"===c.yMovement?(c.translate3d="vertical"!==options.direction?"translate3d(-100%, 0px, 0px)":"translate3d(0px, -100%, 0px)",c.scrolling="-100%",options.css3||c.sectionsToMove.each(function(a){a!=c.activeSection.index(".pp-section")&&b(this).css(p(c.scrolling))}),c.animateSection=c.activeSection):(c.translate3d="translate3d(0px, 0px, 0px)",c.scrolling="0",c.animateSection=a),
-b.isFunction(options.onLeave)&&options.onLeave.call(this,c.leavingSection,c.sectionIndex+1,c.yMovement),K(c),L(c.anchorLink),M(c.anchorLink,c.sectionIndex),v=c.anchorLink,w=(new Date).getTime())}function K(a){options.css3?(x(a.animateSection,a.translate3d,a.animated),a.sectionsToMove.each(function(){x(b(this),a.translate3d,a.animated)}),setTimeout(function(){q(a)},options.scrollingSpeed)):(a.scrollOptions=p(a.scrolling),a.animated?a.animateSection.animate(a.scrollOptions,options.scrollingSpeed,options.easing,
-function(){y(a);q(a)}):(a.animateSection.css(p(a.scrolling)),setTimeout(function(){y(a);q(a)},400)))}function q(a){b.isFunction(options.afterLoad)&&options.afterLoad.call(this,a.anchorLink,a.sectionIndex+1)}function J(a){return"down"===a.yMovement?b(".pp-section").map(function(d){if(d<a.destination.index(".pp-section"))return b(this)}):b(".pp-section").map(function(d){if(d>a.destination.index(".pp-section"))return b(this)})}function y(a){"up"===a.yMovement&&a.sectionsToMove.each(function(d){b(this).css(p(a.scrolling))})}
-function p(a){return"vertical"===options.direction?{top:a}:{left:a}}function I(a,b){options.anchors.length?(location.hash=a,z(location.hash)):z(String(b))}function z(a){a=a.replace("#","");b("body")[0].className=b("body")[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g,"");b("body").addClass("pp-viewing-"+a)}function r(){return(new Date).getTime()-w<600+options.scrollingSpeed?!0:!1}function x(a,b,c){a.toggleClass("pp-easing",c);a.css({"-webkit-transform":b,"-moz-transform":b,"-ms-transform":b,transform:b})}
-function l(a){if(!r()){a=h.event||a;a=Math.max(-1,Math.min(1,a.wheelDelta||-a.deltaY||-a.detail));var d=b(".pp-section.active"),d=A(d);0>a?m("down",d):m("up",d);return!1}}function m(a,b){if("down"==a)var c="bottom",f=e.moveSectionDown;else c="top",f=e.moveSectionUp;if(0<b.length)if(c="top"===c?!b.scrollTop():"bottom"===c?b.scrollTop()+1+b.innerHeight()>=b[0].scrollHeight:void 0,c)f();else return!0;else f()}function A(a){return scrollable=a.filter(".pp-scrollable")}function B(){return h.PointerEvent?
-{down:"pointerdown",move:"pointermove",up:"pointerup"}:{down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp"}}function C(a){var b=[];b.y="undefined"!==typeof a.pageY&&(a.pageY||a.pageX)?a.pageY:a.touches[0].pageY;b.x="undefined"!==typeof a.pageX&&(a.pageY||a.pageX)?a.pageX:a.touches[0].pageX;return b}function D(a){return"undefined"===typeof a.pointerType||"mouse"!=a.pointerType}function N(a){a=a.originalEvent;D(a)&&(a=C(a),n=a.y,touchStartX=a.x)}function O(a){var d=a.originalEvent;!E(a.target)&&
-D(d)&&(a.preventDefault(),a=b(".pp-section.active"),a=A(a),r()||(d=C(d),touchEndY=d.y,touchEndX=d.x,"horizontal"===options.direction&&Math.abs(touchStartX-touchEndX)>Math.abs(n-touchEndY)?Math.abs(touchStartX-touchEndX)>f.width()/100*options.touchSensitivity&&(touchStartX>touchEndX?m("down",a):touchEndX>touchStartX&&m("up",a)):Math.abs(n-touchEndY)>f.height()/100*options.touchSensitivity&&(n>touchEndY?m("down",a):touchEndY>n&&m("up",a))))}function E(a,d){d=d||0;var c=b(a).parent();return d<options.normalScrollElementTouchThreshold&&
-c.is(options.normalScrollElements)?!0:d==options.normalScrollElementTouchThreshold?!1:E(c,++d)}function P(){b("body").append('<div id="pp-nav"><ul></ul></div>');var a=b("#pp-nav");a.css("color",options.navigation.textColor);a.addClass(options.navigation.position);for(var d=0;d<b(".pp-section").length;d++){var c="";options.anchors.length&&(c=options.anchors[d]);if("undefined"!==options.navigation.tooltips){var e=options.navigation.tooltips[d];"undefined"===typeof e&&(e="")}a.find("ul").append('<li data-tooltip="'+
-e+'"><a href="#'+c+'"><span></span></a></li>')}a.find("span").css("border-color",options.navigation.bulletsColor)}function M(a,d){options.navigation&&(b("#pp-nav").find(".active").removeClass("active"),a?b("#pp-nav").find('a[href="#'+a+'"]').addClass("active"):b("#pp-nav").find("li").eq(d).find("a").addClass("active"))}function L(a){options.menu&&(b(options.menu).find(".active").removeClass("active"),b(options.menu).find('[data-menuanchor="'+a+'"]').addClass("active"))}function Q(){var a=g.createElement("p"),
-b,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};g.body.insertBefore(a,null);for(var e in c)a.style[e]!==u&&(a.style[e]="translate3d(1px,1px,1px)",b=h.getComputedStyle(a).getPropertyValue(c[e]));g.body.removeChild(a);return b!==u&&0<b.length&&"none"!==b}var e=b.fn.pagepiling,f=b(this),v,w=0,F="ontouchstart"in h||0<navigator.msMaxTouchPoints||navigator.maxTouchPoints,n=touchStartX=touchEndY=touchEndX=
-0;options=b.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",position:"right",tooltips:[]},normalScrollElements:null,normalScrollElementTouchThreshold:5,touchSensitivity:5,keyboardScrolling:!0,sectionSelector:".section",animateAnchor:!1,afterLoad:null,onLeave:null,afterRender:null},G);b.extend(b.easing,{easeInQuart:function(a,b,c,e,f){return e*
-(b/=f)*b*b*b+c}});e.setScrollingSpeed=function(a){options.scrollingSpeed=a};e.setMouseWheelScrolling=function(a){a?f.get(0).addEventListener?(f.get(0).addEventListener("mousewheel",l,!1),f.get(0).addEventListener("wheel",l,!1)):f.get(0).attachEvent("onmousewheel",l):f.get(0).addEventListener?(f.get(0).removeEventListener("mousewheel",l,!1),f.get(0).removeEventListener("wheel",l,!1)):f.get(0).detachEvent("onmousewheel",l)};e.setAllowScrolling=function(a){a?(e.setMouseWheelScrolling(!0),F&&(MSPointer=
-B(),f.off("touchstart "+MSPointer.down).on("touchstart "+MSPointer.down,N),f.off("touchmove "+MSPointer.move).on("touchmove "+MSPointer.move,O))):(e.setMouseWheelScrolling(!1),F&&(MSPointer=B(),f.off("touchstart "+MSPointer.down),f.off("touchmove "+MSPointer.move)))};e.setKeyboardScrolling=function(a){options.keyboardScrolling=a};e.moveSectionUp=function(){var a=b(".pp-section.active").prev(".pp-section");!a.length&&options.loopTop&&(a=b(".pp-section").last());a.length&&k(a)};e.moveSectionDown=function(){var a=
-b(".pp-section.active").next(".pp-section");!a.length&&options.loopBottom&&(a=b(".pp-section").first());a.length&&k(a)};e.moveTo=function(a){var d="",d=isNaN(a)?b('[data-anchor="'+a+'"]'):b(".pp-section").eq(a-1);0<d.length&&k(d)};b(options.sectionSelector).each(function(){b(this).addClass("pp-section")});options.css3&&(options.css3=Q());b(f).css({overflow:"hidden","-ms-touch-action":"none","touch-action":"none"});e.setAllowScrolling(!0);b.isEmptyObject(options.navigation)||P();var t=b(".pp-section").length;
-b(".pp-section").each(function(a){b(this).data("data-index",a);b(this).css("z-index",t);a||0!==b(".pp-section.active").length||b(this).addClass("active");"undefined"!==typeof options.anchors[a]&&b(this).attr("data-anchor",options.anchors[a]);"undefined"!==typeof options.sectionsColor[a]&&b(this).css("background-color",options.sectionsColor[a]);options.verticalCentered&&b(this).addClass("pp-table").wrapInner('<div class="pp-tableCell" style="height:100%" />');--t}).promise().done(function(){options.navigation&&
-(b("#pp-nav").css("margin-top","-"+b("#pp-nav").height()/2+"px"),b("#pp-nav").find("li").eq(b(".pp-section.active").index(".pp-section")).find("a").addClass("active"));b(h).on("load",function(){var a=h.location.hash.replace("#",""),a=b('.pp-section[data-anchor="'+a+'"]');0<a.length&&k(a,options.animateAnchor)});b.isFunction(options.afterRender)&&options.afterRender.call(this)});b(h).on("hashchange",function(){var a=h.location.hash.replace("#","").split("/")[0];a.length&&a&&a!==v&&(a=isNaN(a)?b('[data-anchor="'+
-a+'"]'):b(".pp-section").eq(a-1),k(a))});b(g).keydown(function(a){if(options.keyboardScrolling&&!r())switch(a.which){case 38:case 33:e.moveSectionUp();break;case 40:case 34:e.moveSectionDown();break;case 36:e.moveTo(1);break;case 35:e.moveTo(b(".pp-section").length);break;case 37:e.moveSectionUp();break;case 39:e.moveSectionDown()}});options.normalScrollElements&&(b(g).on("mouseenter",options.normalScrollElements,function(){e.setMouseWheelScrolling(!1)}),b(g).on("mouseleave",options.normalScrollElements,
-function(){e.setMouseWheelScrolling(!0)}));b(g).on("click touchstart","#pp-nav a",function(a){a.preventDefault();a=b(this).parent().index();k(b(".pp-section").eq(a))});b(g).on({mouseenter:function(){var a=b(this).data("tooltip");b('<div class="pp-tooltip '+options.navigation.position+'">'+a+"</div>").hide().appendTo(b(this)).fadeIn(200)},mouseleave:function(){b(this).find(".pp-tooltip").fadeOut(200,function(){b(this).remove()})}},"#pp-nav li")}})(jQuery,document,window);
\ No newline at end of file
+(function(b,h,k,y){b.fn.pagepiling=function(J){function K(a){var e=b(".pp-section.active").index(".pp-section");a=a.index(".pp-section");return e>a?"up":"down"}function l(a,e){var d={destination:a,animated:e,activeSection:b(".pp-section.active"),anchorLink:a.data("anchor"),sectionIndex:a.index(".pp-section"),toMove:a,yMovement:K(a),leavingSection:b(".pp-section.active").index(".pp-section")+1};d.activeSection.is(a)||("undefined"===typeof d.animated&&(d.animated=!0),"undefined"!==typeof d.anchorLink&&
+L(d.anchorLink,d.sectionIndex),d.destination.addClass("active").siblings().removeClass("active"),d.sectionsToMove=M(d),"down"===d.yMovement?(d.translate3d="vertical"!==c.direction?"translate3d(-100%, 0px, 0px)":"translate3d(0px, -100%, 0px)",d.scrolling="-100%",c.css3||d.sectionsToMove.each(function(a){a!=d.activeSection.index(".pp-section")&&b(this).css(u(d.scrolling))}),d.animateSection=d.activeSection):(d.translate3d="translate3d(0px, 0px, 0px)",d.scrolling="0",d.animateSection=a),b.isFunction(c.onLeave)&&
+c.onLeave.call(this,d.leavingSection,d.sectionIndex+1,d.yMovement),N(d),O(d.anchorLink),P(d.anchorLink,d.sectionIndex),z=d.anchorLink,A=(new Date).getTime())}function N(a){c.css3?(B(a.animateSection,a.translate3d,a.animated),a.sectionsToMove.each(function(){B(b(this),a.translate3d,a.animated)}),setTimeout(function(){v(a)},c.scrollingSpeed)):(a.scrollOptions=u(a.scrolling),a.animated?a.animateSection.animate(a.scrollOptions,c.scrollingSpeed,c.easing,function(){C(a);v(a)}):(a.animateSection.css(u(a.scrolling)),
+setTimeout(function(){C(a);v(a)},400)))}function v(a){b.isFunction(c.afterLoad)&&c.afterLoad.call(this,a.anchorLink,a.sectionIndex+1)}function M(a){return"down"===a.yMovement?b(".pp-section").map(function(e){if(e<a.destination.index(".pp-section"))return b(this)}):b(".pp-section").map(function(e){if(e>a.destination.index(".pp-section"))return b(this)})}function C(a){"up"===a.yMovement&&a.sectionsToMove.each(function(e){b(this).css(u(a.scrolling))})}function u(a){return"vertical"===c.direction?{top:a}:
+{left:a}}function L(a,b){c.anchors.length?(location.hash=a,D(location.hash)):D(String(b))}function D(a){a=a.replace("#","");b("body")[0].className=b("body")[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g,"");b("body").addClass("pp-viewing-"+a)}function w(){return(new Date).getTime()-A<600+c.scrollingSpeed?!0:!1}function B(a,b,c){a.toggleClass("pp-easing",c);a.css({"-webkit-transform":b,"-moz-transform":b,"-ms-transform":b,transform:b})}function m(a){if(!w()){a=k.event||a;a=Math.max(-1,Math.min(1,
+a.wheelDelta||-a.deltaY||-a.detail));var e=b(".pp-section.active").filter(".pp-scrollable");0>a?n("down",e):n("up",e);return!1}}function n(a,b){var c,g;"down"==a?(c="bottom",g=f.moveSectionDown):(c="top",g=f.moveSectionUp);if(0<b.length)if(c="top"===c?!b.scrollTop():"bottom"===c?b.scrollTop()+1+b.innerHeight()>=b[0].scrollHeight:void 0,c)g();else return!0;else g()}function E(){return k.PointerEvent?{down:"pointerdown",move:"pointermove",up:"pointerup"}:{down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp"}}
+function F(a){var b=[];b.y="undefined"!==typeof a.pageY&&(a.pageY||a.pageX)?a.pageY:a.touches[0].pageY;b.x="undefined"!==typeof a.pageX&&(a.pageY||a.pageX)?a.pageX:a.touches[0].pageX;return b}function G(a){return"undefined"===typeof a.pointerType||"mouse"!=a.pointerType}function Q(a){a=a.originalEvent;G(a)&&(a=F(a),p=a.y,q=a.x)}function R(a){var e=a.originalEvent;!H(a.target)&&G(e)&&(a.preventDefault(),a=b(".pp-section.active").filter(".pp-scrollable"),w()||(e=F(e),r=e.y,t=e.x,"horizontal"===c.direction&&
+Math.abs(q-t)>Math.abs(p-r)?Math.abs(q-t)>g.width()/100*c.touchSensitivity&&(q>t?n("down",a):t>q&&n("up",a)):Math.abs(p-r)>g.height()/100*c.touchSensitivity&&(p>r?n("down",a):r>p&&n("up",a))))}function H(a,e){e=e||0;var d=b(a).parent();return e<c.normalScrollElementTouchThreshold&&d.is(c.normalScrollElements)?!0:e==c.normalScrollElementTouchThreshold?!1:H(d,++e)}function S(){b("body").append('<div id="pp-nav"><ul></ul></div>');var a=b("#pp-nav");a.css("color",c.navigation.textColor);a.addClass(c.navigation.position);
+for(var e=0;e<b(".pp-section").length;e++){var d="";c.anchors.length&&(d=c.anchors[e]);if("undefined"!==c.navigation.tooltips){var f=c.navigation.tooltips[e];"undefined"===typeof f&&(f="")}a.find("ul").append('<li data-tooltip="'+f+'"><a href="#'+d+'"><span></span></a></li>')}a.find("span").css("border-color",c.navigation.bulletsColor)}function P(a,e){c.navigation&&(b("#pp-nav").find(".active").removeClass("active"),a?b("#pp-nav").find('a[href="#'+a+'"]').addClass("active"):b("#pp-nav").find("li").eq(e).find("a").addClass("active"))}
+function O(a){c.menu&&(b(c.menu).find(".active").removeClass("active"),b(c.menu).find('[data-menuanchor="'+a+'"]').addClass("active"))}function T(){var a=h.createElement("p"),b,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};h.body.insertBefore(a,null);for(var f in c)a.style[f]!==y&&(a.style[f]="translate3d(1px,1px,1px)",b=k.getComputedStyle(a).getPropertyValue(c[f]));h.body.removeChild(a);return b!==
+y&&0<b.length&&"none"!==b}var f=b.fn.pagepiling,g=b(this),z,A=0,I="ontouchstart"in k||0<navigator.msMaxTouchPoints||navigator.maxTouchPoints,p=0,q=0,r=0,t=0,c=b.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",position:"right",tooltips:[]},normalScrollElements:null,normalScrollElementTouchThreshold:5,touchSensitivity:5,keyboardScrolling:!0,
+sectionSelector:".section",animateAnchor:!1,afterLoad:null,onLeave:null,afterRender:null},J);b.extend(b.easing,{easeInQuart:function(a,b,c,f,g){return f*(b/=g)*b*b*b+c}});f.setScrollingSpeed=function(a){c.scrollingSpeed=a};f.setMouseWheelScrolling=function(a){a?g.get(0).addEventListener?(g.get(0).addEventListener("mousewheel",m,!1),g.get(0).addEventListener("wheel",m,!1)):g.get(0).attachEvent("onmousewheel",m):g.get(0).addEventListener?(g.get(0).removeEventListener("mousewheel",m,!1),g.get(0).removeEventListener("wheel",
+m,!1)):g.get(0).detachEvent("onmousewheel",m)};f.setAllowScrolling=function(a){a?(f.setMouseWheelScrolling(!0),I&&(a=E(),g.off("touchstart "+a.down).on("touchstart "+a.down,Q),g.off("touchmove "+a.move).on("touchmove "+a.move,R))):(f.setMouseWheelScrolling(!1),I&&(a=E(),g.off("touchstart "+a.down),g.off("touchmove "+a.move)))};f.setKeyboardScrolling=function(a){c.keyboardScrolling=a};f.moveSectionUp=function(){var a=b(".pp-section.active").prev(".pp-section");!a.length&&c.loopTop&&(a=b(".pp-section").last());
+a.length&&l(a)};f.moveSectionDown=function(){var a=b(".pp-section.active").next(".pp-section");!a.length&&c.loopBottom&&(a=b(".pp-section").first());a.length&&l(a)};f.moveTo=function(a){var c="",c=isNaN(a)?b('[data-anchor="'+a+'"]'):b(".pp-section").eq(a-1);0<c.length&&l(c)};b(c.sectionSelector).each(function(){b(this).addClass("pp-section")});c.css3&&(c.css3=T());b(g).css({overflow:"hidden","-ms-touch-action":"none","touch-action":"none"});f.setAllowScrolling(!0);b.isEmptyObject(c.navigation)||S();
+var x=b(".pp-section").length;b(".pp-section").each(function(a){b(this).data("data-index",a);b(this).css("z-index",x);a||0!==b(".pp-section.active").length||b(this).addClass("active");"undefined"!==typeof c.anchors[a]&&b(this).attr("data-anchor",c.anchors[a]);"undefined"!==typeof c.sectionsColor[a]&&b(this).css("background-color",c.sectionsColor[a]);c.verticalCentered&&!b(this).hasClass("pp-scrollable")&&b(this).addClass("pp-table").wrapInner('<div class="pp-tableCell" style="height:100%" />');--x}).promise().done(function(){c.navigation&&
+(b("#pp-nav").css("margin-top","-"+b("#pp-nav").height()/2+"px"),b("#pp-nav").find("li").eq(b(".pp-section.active").index(".pp-section")).find("a").addClass("active"));b(k).on("load",function(){var a=k.location.hash.replace("#",""),a=b('.pp-section[data-anchor="'+a+'"]');0<a.length&&l(a,c.animateAnchor)});b.isFunction(c.afterRender)&&c.afterRender.call(this)});b(k).on("hashchange",function(){var a=k.location.hash.replace("#","").split("/")[0];a.length&&a&&a!==z&&(a=isNaN(a)?b('[data-anchor="'+a+'"]'):
+b(".pp-section").eq(a-1),l(a))});b(h).keydown(function(a){if(c.keyboardScrolling&&!w())switch(a.which){case 38:case 33:f.moveSectionUp();break;case 40:case 34:f.moveSectionDown();break;case 36:f.moveTo(1);break;case 35:f.moveTo(b(".pp-section").length);break;case 37:f.moveSectionUp();break;case 39:f.moveSectionDown()}});c.normalScrollElements&&(b(h).on("mouseenter",c.normalScrollElements,function(){f.setMouseWheelScrolling(!1)}),b(h).on("mouseleave",c.normalScrollElements,function(){f.setMouseWheelScrolling(!0)}));
+b(h).on("click touchstart","#pp-nav a",function(a){a.preventDefault();a=b(this).parent().index();l(b(".pp-section").eq(a))});b(h).on({mouseenter:function(){var a=b(this).data("tooltip");b('<div class="pp-tooltip '+c.navigation.position+'">'+a+"</div>").hide().appendTo(b(this)).fadeIn(200)},mouseleave:function(){b(this).find(".pp-tooltip").fadeOut(200,function(){b(this).remove()})}},"#pp-nav li")}})(jQuery,document,window);
\ No newline at end of file
