forked from alvarotrigo/fullPage.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.fullpage.min.js.map
1 lines (1 loc) · 139 KB
/
jquery.fullpage.min.js.map
1
{"version":3,"sources":["jquery.fullpage.js"],"names":["global","factory","define","amd","$","document","Math","exports","module","require","jQuery","window","this","undefined","defaultScrollHandler","WRAPPER","WRAPPER_SEL","SCROLLABLE","SCROLLABLE_SEL","SLIMSCROLL_BAR_SEL","SLIMSCROLL_RAIL_SEL","RESPONSIVE","NO_TRANSITION","DESTROYED","ENABLED","VIEWING_PREFIX","ACTIVE","ACTIVE_SEL","SECTION_DEFAULT_SEL","SECTION","SECTION_SEL","SECTION_ACTIVE_SEL","SECTION_FIRST_SEL","SECTION_LAST_SEL","TABLE_CELL","TABLE_CELL_SEL","AUTO_HEIGHT","SECTION_NAV","SECTION_NAV_SEL","SECTION_NAV_TOOLTIP","SHOW_ACTIVE_TOOLTIP","SLIDE_DEFAULT_SEL","SLIDE","SLIDE_SEL","SLIDE_ACTIVE_SEL","SLIDES_WRAPPER","SLIDES_WRAPPER_SEL","SLIDES_CONTAINER","SLIDES_CONTAINER_SEL","TABLE","SLIDES_NAV","SLIDES_NAV_SEL","SLIDES_NAV_LINK_SEL","SLIDES_ARROW","SLIDES_ARROW_SEL","SLIDES_PREV","SLIDES_PREV_SEL","SLIDES_ARROW_PREV","SLIDES_ARROW_PREV_SEL","SLIDES_NEXT","SLIDES_NEXT_SEL","SLIDES_ARROW_NEXT","SLIDES_ARROW_NEXT_SEL","$window","$document","fn","fullpage","options","init","css3","support3d","anchors","length","map","data","toString","get","prepareDom","FP","setAllowScrolling","windowsHeight","height","setAutoScrolling","autoScrolling","activeSlide","find","index","silentLandscapeScroll","responsive","setBodyClass","on","scrollToAnchor","container","css","position","addClass","removeClass","addInternalSelectors","each","section","slides","numSlides","styleSection","styleMenu","styleSlides","verticalCentered","addTableClass","fixedElements","appendTo","$body","navigation","addVerticalNavigation","scrollOverflow","readyState","createSlimScrollingHandler","afterRenderActions","sliderWidth","slideWidth","wrapAll","parent","wrap","controlArrows","createSlideArrows","slidesNavigation","addSlidesNavigation","startingSlide","eq","paddingTop","paddingBottom","sectionsColor","attr","hasClass","activateMenuAndNav","menu","closest","sectionSelector","slideSelector","after","controlArrowColor","loopHorizontal","hide","append","nav","showActiveTooltip","navigationPosition","i","link","li","tooltip","navigationTooltips","createSlimScrolling","scrollOverflowHandler","afterRender","lazyLoad","playMedia","isFunction","afterLoad","call","scrollHandler","currentSection","scrollBar","currentScroll","scrollTop","visibleSectionIndex","initial","abs","querySelectorAll","offsetTop","sections","current","isScrolling","leavingSection","leavingSectionIndex","yMovement","getYmovement","anchorLink","sectionIndex","slideAnchorLink","slideIndex","canScroll","siblings","onLeave","lastScrolledDestiny","setState","clearTimeout","scrollId","setTimeout","fitToSection","scrollId2","is","requestAnimFrame","isResizing","scrollPage","fitToSectionDelay","scrolling","type","scrollable","isScrollAllowed","m","check","scrollSection","moveSectionDown","moveSectionUp","isScrolled","touchMoveHandler","event","e","originalEvent","checkParentForNormalScrollElement","target","isReallyTouch","preventDefault","activeSection","slideMoving","touchEvents","getEventsPage","touchEndY","y","touchEndX","x","touchStartX","touchStartY","width","touchSensitivity","right","moveSlideRight","left","moveSlideLeft","el","hop","normalScrollElementTouchThreshold","normalScrollElements","pointerType","touchStartHandler","$htmlBody","stop","getAverage","elements","number","sum","lastElements","slice","max","ceil","MouseWheelHandler","curTime","Date","getTime","controlPressed","value","wheelDelta","deltaY","detail","delta","min","horizontalDetection","wheelDeltaX","deltaX","isScrollingVertically","scrollings","shift","push","returnValue","timeDiff","prevTime","averageEnd","averageMiddle","isAccelerating","moveSlide","direction","currentSlide","destiny","prev","next","landscapeScroll","keepSlidesPosition","element","callback","isMovementUp","dest","dtop","top","v","localIsResizing","continuousVertical","createInfiniteSections","stopMedia","performMovement","translate3d","transformContainer","scrollingSpeed","afterSectionLoadsId","afterSectionLoads","scrollSettings","getScrollSettings","animate","easing","promise","done","scroll","before","nextAll","prevAll","reverse","silentScroll","wrapAroundElements","continuousVerticalFixSectionOrder","mouseover","slide","removeAttr","load","hasAttribute","play","pause","location","hash","replace","split","animateAnchor","scrollPageAndSlide","silentMoveTo","hashChangeHandler","lockAnchors","isFirstSlideMove","isFirstScrollMove","lastScrolledSlide","keydownHandler","keydownId","activeElement","keyboardScrolling","keyCode","which","keyControls","inArray","ctrlKey","onkeydown","shiftPressed","shiftKey","k","up","down","moveTo","mouseMoveHandler","pageY","oldPageY","destinyPos","slidesNav","slideAnchor","getAnchor","onSlideLeave","prevSlide","prevSlideIndex","xMovement","getXmovement","toggle","afterSlideLoads","afterSlideLoad","round","addAnimation","getTransforms","afterSlideLoadsId","scrollLeft","resizeHandler","isTouchDevice","currentHeight","previousHeight","reBuild","resizeId","widthLimit","responsiveWidth","heightLimit","responsiveHeight","isBreakingPointWidth","isBreakingPointHeight","setResponsive","transition","easingcss3","-webkit-transition","removeAnimation","resizeMe","displayHeight","displayWidth","preferredHeight","preferredWidth","heightPercentage","widthPercentage","percentage","newFontSize","toFixed","activateNavDots","name","activateMenuElement","anchor","fromIndex","toIndex","contentHeight","wrapContent","scrollHeight","parseInt","update","wrapInner","create","remove","getTableHeight","sectionHeight","paddings","animated","getSectionByAnchor","sectionAnchor","getSlideByAnchor","scrollSlider","slidesNavPosition","first","sectionHash","setUrlHash","url","recordHistory","isTouch","history","replaceState","baseUrl","href","text","String","classRe","RegExp","className","has3d","createElement","transforms","webkitTransform","OTransform","msTransform","MozTransform","transform","body","insertBefore","t","style","getComputedStyle","getPropertyValue","removeChild","removeMouseWheelHandler","addEventListener","removeEventListener","detachEvent","addMouseWheelHandler","_addEventListener","prefix","support","onmousewheel","addTouchHandler","MSPointer","getMSPointer","off","move","removeTouchHandler","pointer","PointerEvent","events","pageX","touches","noCallbacks","setScrollingSpeed","originals","-webkit-transform","-moz-transform","-ms-transform","setIsScrollAllowed","setKeyboardScrolling","destroyStructure","background-color","padding","-ms-touch-action","touch-action","overflow","indexOf","removeSlimScroll","replaceWith","childNodes","setVariableState","variable","displayWarnings","loopTop","loopBottom","showError","console","extend","resize","afterResize","afterReBuild","easeInOutCubic","b","c","d","easeInQuart","setRecordHistory","setFitToSection","setLockAnchors","setMouseWheelScrolling","directions","last","resizing","windowsWidth","slidesWrap","active","isResponsive","show","navigator","userAgent","match","msMaxTouchPoints","isWindowFocused","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","keydown","keyup","blur","mousedown","mouseup","destroy","all","slimScrollHandler","scrollableWrap","slimScroll","allowPageScroll","size","alwaysVisible","innerHeight","children","unwrap"],"mappings":";;;;;;;CAOA,SAAUA,EAAQC,GACd,YACsB,mBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,UAAW,SAASE,GAC1B,MAAOH,GAAQG,EAAGJ,EAAQA,EAAOK,SAAUL,EAAOM,QAE1B,mBAAZC,SACdC,OAAOD,QAAUN,EAAQQ,QAAQ,UAAWT,EAAQA,EAAOK,SAAUL,EAAOM,MAE5EL,EAAQS,OAAQV,EAAQA,EAAOK,SAAUL,EAAOM,OAEnC,mBAAXK,QAAyBA,OAASC,KAAM,SAASR,EAAGO,EAAQN,EAAUC,EAAMO,GAClF,YAGA,IAiEIC,GAjEAC,EAAwB,mBACxBC,EAAwB,IAAMD,EAG9BE,EAAwB,gBACxBC,EAAwB,IAAMD,EAC9BE,EAAwB,iBACxBC,EAAwB,kBAGxBC,EAAwB,gBACxBC,EAAwB,kBACxBC,EAAwB,eACxBC,EAAwB,aACxBC,EAAwB,aACxBC,EAAwB,SACxBC,EAAwB,IAAMD,EAG9BE,EAAwB,WACxBC,EAAwB,aACxBC,EAAwB,IAAMD,EAC9BE,EAAwBD,EAAcH,EACtCK,EAAwBF,EAAc,SACtCG,EAAwBH,EAAc,QACtCI,EAAwB,eACxBC,EAAwB,IAAMD,EAC9BE,EAAoB,iBAIpBC,EAAwB,SACxBC,EAAwB,IAAMD,EAC9BE,EAAwB,aACxB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EAAMC,GACvB,MAAY,QAATD,GACSC,EAAWlC,YACL,WAATiC,EACEC,EAAWlC,YAAc,EAAIkC,EAAW+U,eAAiB/U,EAAW,GAAGyM,aAD5E,QAaVzM,WAAY,SAASgB,GAEjB,MAAGA,GAAc/H,KAAKvC,GAAoB0B,OAC/B4I,EAAc/H,KAAKzC,GAAkByC,KAAKnE,GAE9CkM,EAAc/H,KAAKnE,IAW9B2X,aAAc,SAASzH,GACnB,MAAOA,GAAQ/L,KAAKnE,GAAgB0D,IAAI,GAAGiU,cAQ/CK,OAAQ,SAAS9H,GACbA,EAAQ/L,KAAKnE,GAAgBkgB,WAAWxH,QAAQyH,SAASA,SACzDjQ,EAAQ/L,KAAKlE,GAAoB+X,SACjC9H,EAAQ/L,KAAKjE,GAAqB8X,UAUtCH,OAAQ,SAAS3H,EAASyH,GACtBzH,EAAQ/L,KAAKnE,GAAgB2E,IAAI,SAAUgT,EAAe,MAAMtR,SAAS1B,IAAI,SAAUgT,EAAe,OAU1GD,YAAa,WACT,MAAO,eAAiB3X,EAAa,YAI7CH,GAAuB+f","file":"jquery.fullpage.min.js","sourcesContent":["/*!\r\n * fullPage 2.7.5\r\n * https://github.com/alvarotrigo/fullPage.js\r\n * @license MIT licensed\r\n *\r\n * Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo\r\n */\r\n(function(global, factory) {\r\n 'use strict';\r\n if (typeof define === 'function' && define.amd) {\r\n define(['jquery'], function($) {\r\n return factory($, global, global.document, global.Math);\r\n });\r\n } else if (typeof exports !== 'undefined') {\r\n module.exports = factory(require('jquery'), global, global.document, global.Math);\r\n } else {\r\n factory(jQuery, global, global.document, global.Math);\r\n }\r\n})(typeof window !== 'undefined' ? window : this, function($, window, document, Math, undefined) {\r\n 'use strict';\r\n\r\n // keeping central set of classnames and selectors\r\n var WRAPPER = 'fullpage-wrapper';\r\n var WRAPPER_SEL = '.' + WRAPPER;\r\n\r\n // slimscroll\r\n var SCROLLABLE = 'fp-scrollable';\r\n var SCROLLABLE_SEL = '.' + SCROLLABLE;\r\n var SLIMSCROLL_BAR_SEL = '.slimScrollBar';\r\n var SLIMSCROLL_RAIL_SEL = '.slimScrollRail';\r\n\r\n // util\r\n var RESPONSIVE = 'fp-responsive';\r\n var NO_TRANSITION = 'fp-notransition';\r\n var DESTROYED = 'fp-destroyed';\r\n var ENABLED = 'fp-enabled';\r\n var VIEWING_PREFIX = 'fp-viewing';\r\n var ACTIVE = 'active';\r\n var ACTIVE_SEL = '.' + ACTIVE;\r\n\r\n // section\r\n var SECTION_DEFAULT_SEL = '.section';\r\n var SECTION = 'fp-section';\r\n var SECTION_SEL = '.' + SECTION;\r\n var SECTION_ACTIVE_SEL = SECTION_SEL + ACTIVE_SEL;\r\n var SECTION_FIRST_SEL = SECTION_SEL + ':first';\r\n var SECTION_LAST_SEL = SECTION_SEL + ':last';\r\n var TABLE_CELL = 'fp-tableCell';\r\n var TABLE_CELL_SEL = '.' + TABLE_CELL;\r\n var AUTO_HEIGHT = 'fp-auto-height';\r\n var AUTO_HEIGHT_SEL = '.fp-auto-height';\r\n\r\n // section nav\r\n var SECTION_NAV = 'fp-nav';\r\n var SECTION_NAV_SEL = '#' + SECTION_NAV;\r\n var SECTION_NAV_TOOLTIP = 'fp-tooltip';\r\n var SHOW_ACTIVE_TOOLTIP = 'fp-show-active';\r\n\r\n // slide\r\n var SLIDE_DEFAULT_SEL = '.slide';\r\n var SLIDE = 'fp-slide';\r\n var SLIDE_SEL = '.' + SLIDE;\r\n var SLIDE_ACTIVE_SEL = SLIDE_SEL + ACTIVE_SEL;\r\n var SLIDES_WRAPPER = 'fp-slides';\r\n var SLIDES_WRAPPER_SEL = '.' + SLIDES_WRAPPER;\r\n var SLIDES_CONTAINER = 'fp-slidesContainer';\r\n var SLIDES_CONTAINER_SEL = '.' + SLIDES_CONTAINER;\r\n var TABLE = 'fp-table';\r\n\r\n // slide nav\r\n var SLIDES_NAV = 'fp-slidesNav';\r\n var SLIDES_NAV_SEL = '.' + SLIDES_NAV;\r\n var SLIDES_NAV_LINK_SEL = SLIDES_NAV_SEL + ' a';\r\n var SLIDES_ARROW = 'fp-controlArrow';\r\n var SLIDES_ARROW_SEL = '.' + SLIDES_ARROW;\r\n var SLIDES_PREV = 'fp-prev';\r\n var SLIDES_PREV_SEL = '.' + SLIDES_PREV;\r\n var SLIDES_ARROW_PREV = SLIDES_ARROW + ' ' + SLIDES_PREV;\r\n var SLIDES_ARROW_PREV_SEL = SLIDES_ARROW_SEL + SLIDES_PREV_SEL;\r\n var SLIDES_NEXT = 'fp-next';\r\n var SLIDES_NEXT_SEL = '.' + SLIDES_NEXT;\r\n var SLIDES_ARROW_NEXT = SLIDES_ARROW + ' ' + SLIDES_NEXT;\r\n var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL;\r\n\r\n var $window = $(window);\r\n var $document = $(document);\r\n\r\n var defaultScrollHandler;\r\n\r\n $.fn.fullpage = function(options) {\r\n\r\n // common jQuery objects\r\n var $htmlBody = $('html, body');\r\n var $body = $('body');\r\n\r\n var FP = $.fn.fullpage;\r\n // Create some defaults, extending them with any options that were provided\r\n options = $.extend({\r\n //navigation\r\n menu: false,\r\n anchors:[],\r\n lockAnchors: false,\r\n navigation: false,\r\n navigationPosition: 'right',\r\n navigationTooltips: [],\r\n showActiveTooltip: false,\r\n slidesNavigation: false,\r\n slidesNavPosition: 'bottom',\r\n scrollBar: false,\r\n\r\n //scrolling\r\n css3: true,\r\n scrollingSpeed: 700,\r\n autoScrolling: true,\r\n fitToSection: true,\r\n fitToSectionDelay: 1000,\r\n easing: 'easeInOutCubic',\r\n easingcss3: 'ease',\r\n loopBottom: false,\r\n loopTop: false,\r\n loopHorizontal: true,\r\n continuousVertical: false,\r\n normalScrollElements: null,\r\n scrollOverflow: false,\r\n scrollOverflowHandler: defaultScrollHandler,\r\n touchSensitivity: 5,\r\n normalScrollElementTouchThreshold: 5,\r\n\r\n //Accessibility\r\n keyboardScrolling: true,\r\n animateAnchor: true,\r\n recordHistory: true,\r\n\r\n //design\r\n controlArrows: true,\r\n controlArrowColor: '#fff',\r\n verticalCentered: true,\r\n resize: false,\r\n sectionsColor : [],\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n fixedElements: null,\r\n responsive: 0, //backwards compabitility with responsiveWiddth\r\n responsiveWidth: 0,\r\n responsiveHeight: 0,\r\n\r\n //Custom selectors\r\n sectionSelector: SECTION_DEFAULT_SEL,\r\n slideSelector: SLIDE_DEFAULT_SEL,\r\n\r\n\r\n //events\r\n afterLoad: null,\r\n onLeave: null,\r\n afterRender: null,\r\n afterResize: null,\r\n afterReBuild: null,\r\n afterSlideLoad: null,\r\n onSlideLeave: null\r\n }, options);\r\n\r\n displayWarnings();\r\n\r\n //easeInOutCubic animation included in the plugin\r\n $.extend($.easing,{ easeInOutCubic: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;}});\r\n\r\n //TO BE REMOVED in future versions. Maintained temporaly for backwards compatibility.\r\n $.extend($.easing,{ easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }});\r\n\r\n /**\r\n * Sets the autoScroll option.\r\n * It changes the scroll bar visibility and the history of the site as a result.\r\n */\r\n FP.setAutoScrolling = function(value, type){\r\n setVariableState('autoScrolling', value, type);\r\n\r\n var element = $(SECTION_ACTIVE_SEL);\r\n\r\n if(options.autoScrolling && !options.scrollBar){\r\n $htmlBody.css({\r\n 'overflow' : 'hidden',\r\n 'height' : '100%'\r\n });\r\n\r\n FP.setRecordHistory(originals.recordHistory, 'internal');\r\n\r\n //for IE touch devices\r\n container.css({\r\n '-ms-touch-action': 'none',\r\n 'touch-action': 'none'\r\n });\r\n\r\n if(element.length){\r\n //moving the container up\r\n silentScroll(element.position().top);\r\n }\r\n\r\n }else{\r\n $htmlBody.css({\r\n 'overflow' : 'visible',\r\n 'height' : 'initial'\r\n });\r\n\r\n FP.setRecordHistory(false, 'internal');\r\n\r\n //for IE touch devices\r\n container.css({\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n silentScroll(0);\r\n\r\n //scrolling the page to the section with no animation\r\n if (element.length) {\r\n $htmlBody.scrollTop(element.position().top);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Defines wheter to record the history for each hash change in the URL.\r\n */\r\n FP.setRecordHistory = function(value, type){\r\n setVariableState('recordHistory', value, type);\r\n };\r\n\r\n /**\r\n * Defines the scrolling speed\r\n */\r\n FP.setScrollingSpeed = function(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n };\r\n\r\n /**\r\n * Sets fitToSection\r\n */\r\n FP.setFitToSection = function(value, type){\r\n setVariableState('fitToSection', value, type);\r\n };\r\n\r\n /**\r\n * Sets lockAnchors\r\n */\r\n FP.setLockAnchors = function(value){\r\n options.lockAnchors = value;\r\n };\r\n\r\n /**\r\n * Adds or remove the possiblity of scrolling through sections by using the mouse wheel or the trackpad.\r\n */\r\n FP.setMouseWheelScrolling = function (value){\r\n if(value){\r\n addMouseWheelHandler();\r\n }else{\r\n removeMouseWheelHandler();\r\n }\r\n };\r\n\r\n /**\r\n * Adds or remove the possiblity of scrolling through sections by using the mouse wheel/trackpad or touch gestures.\r\n * Optionally a second parameter can be used to specify the direction for which the action will be applied.\r\n *\r\n * @param directions string containing the direction or directions separated by comma.\r\n */\r\n FP.setAllowScrolling = function (value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n $.each(directions, function (index, direction){\r\n setIsScrollAllowed(value, direction, 'm');\r\n });\r\n }\r\n else if(value){\r\n FP.setMouseWheelScrolling(true);\r\n addTouchHandler();\r\n }else{\r\n FP.setMouseWheelScrolling(false);\r\n removeTouchHandler();\r\n }\r\n };\r\n\r\n /**\r\n * Adds or remove the possiblity of scrolling through sections by using the keyboard arrow keys\r\n */\r\n FP.setKeyboardScrolling = function (value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n $.each(directions, function (index, direction){\r\n setIsScrollAllowed(value, direction, 'k');\r\n });\r\n }else{\r\n options.keyboardScrolling = value;\r\n }\r\n };\r\n\r\n /**\r\n * Moves the page up one section.\r\n */\r\n FP.moveSectionUp = function(){\r\n var prev = $(SECTION_ACTIVE_SEL).prev(SECTION_SEL);\r\n\r\n //looping to the bottom if there's no more sections above\r\n if (!prev.length && (options.loopTop || options.continuousVertical)) {\r\n prev = $(SECTION_SEL).last();\r\n }\r\n\r\n if (prev.length) {\r\n scrollPage(prev, null, true);\r\n }\r\n };\r\n\r\n /**\r\n * Moves the page down one section.\r\n */\r\n FP.moveSectionDown = function (){\r\n var next = $(SECTION_ACTIVE_SEL).next(SECTION_SEL);\r\n\r\n //looping to the top if there's no more sections below\r\n if(!next.length &&\r\n (options.loopBottom || options.continuousVertical)){\r\n next = $(SECTION_SEL).first();\r\n }\r\n\r\n if(next.length){\r\n scrollPage(next, null, false);\r\n }\r\n };\r\n\r\n /**\r\n * Moves the page to the given section and slide with no animation.\r\n * Anchors or index positions can be used as params.\r\n */\r\n FP.silentMoveTo = function(sectionAnchor, slideAnchor){\r\n requestAnimFrame(function(){\r\n FP.setScrollingSpeed (0, 'internal');\r\n });\r\n\r\n FP.moveTo(sectionAnchor, slideAnchor)\r\n\r\n requestAnimFrame(function(){\r\n FP.setScrollingSpeed (originals.scrollingSpeed, 'internal');\r\n });\r\n };\r\n\r\n /**\r\n * Moves the page to the given section and slide.\r\n * Anchors or index positions can be used as params.\r\n */\r\n FP.moveTo = function (sectionAnchor, slideAnchor){\r\n var destiny = getSectionByAnchor(sectionAnchor);\r\n\r\n if (typeof slideAnchor !== 'undefined'){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else if(destiny.length > 0){\r\n scrollPage(destiny);\r\n }\r\n };\r\n\r\n /**\r\n * Slides right the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n FP.moveSlideRight = function(section){\r\n moveSlide('next', section);\r\n };\r\n\r\n /**\r\n * Slides left the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n FP.moveSlideLeft = function(section){\r\n moveSlide('prev', section);\r\n };\r\n\r\n /**\r\n * When resizing is finished, we adjust the slides sizes and positions\r\n */\r\n FP.reBuild = function(resizing){\r\n if(container.hasClass(DESTROYED)){ return; } //nothing to do if the plugin was destroyed\r\n\r\n requestAnimFrame(function(){\r\n isResizing = true;\r\n });\r\n\r\n var windowsWidth = $window.width();\r\n windowsHeight = $window.height(); //updating global var\r\n\r\n //text resizing\r\n if (options.resize) {\r\n resizeMe(windowsHeight, windowsWidth);\r\n }\r\n\r\n $(SECTION_SEL).each(function(){\r\n var slidesWrap = $(this).find(SLIDES_WRAPPER_SEL);\r\n var slides = $(this).find(SLIDE_SEL);\r\n\r\n //adjusting the height of the table-cell for IE and Firefox\r\n if(options.verticalCentered){\r\n $(this).find(TABLE_CELL_SEL).css('height', getTableHeight($(this)) + 'px');\r\n }\r\n\r\n $(this).css('height', windowsHeight + 'px');\r\n\r\n //resizing the scrolling divs\r\n if(options.scrollOverflow){\r\n if(slides.length){\r\n slides.each(function(){\r\n createSlimScrolling($(this));\r\n });\r\n }else{\r\n createSlimScrolling($(this));\r\n }\r\n }\r\n\r\n //adjusting the position fo the FULL WIDTH slides...\r\n if (slides.length > 1) {\r\n landscapeScroll(slidesWrap, slidesWrap.find(SLIDE_ACTIVE_SEL));\r\n }\r\n });\r\n\r\n var activeSection = $(SECTION_ACTIVE_SEL);\r\n var sectionIndex = activeSection.index(SECTION_SEL);\r\n\r\n //isn't it the first section?\r\n if(sectionIndex){\r\n //adjusting the position for the current section\r\n FP.silentMoveTo(sectionIndex + 1);\r\n }\r\n\r\n requestAnimFrame(function(){\r\n isResizing = false;\r\n });\r\n $.isFunction( options.afterResize ) && resizing && options.afterResize.call(container);\r\n $.isFunction( options.afterReBuild ) && !resizing && options.afterReBuild.call(container);\r\n };\r\n\r\n /**\r\n * Turns fullPage.js to normal scrolling mode when the viewport `width` or `height`\r\n * are smaller than the set limit values.\r\n */\r\n FP.setResponsive = function (active){\r\n var isResponsive = $body.hasClass(RESPONSIVE);\r\n\r\n if(active){\r\n if(!isResponsive){\r\n FP.setAutoScrolling(false, 'internal');\r\n FP.setFitToSection(false, 'internal');\r\n $(SECTION_NAV_SEL).hide();\r\n $body.addClass(RESPONSIVE);\r\n }\r\n }\r\n else if(isResponsive){\r\n FP.setAutoScrolling(originals.autoScrolling, 'internal');\r\n FP.setFitToSection(originals.autoScrolling, 'internal');\r\n $(SECTION_NAV_SEL).show();\r\n $body.removeClass(RESPONSIVE);\r\n }\r\n }\r\n\r\n //flag to avoid very fast sliding for landscape sliders\r\n var slideMoving = false;\r\n\r\n var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);\r\n var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));\r\n var container = $(this);\r\n var windowsHeight = $window.height();\r\n var isResizing = false;\r\n var isWindowFocused = true;\r\n var lastScrolledDestiny;\r\n var lastScrolledSlide;\r\n var canScroll = true;\r\n var scrollings = [];\r\n var nav;\r\n var controlPressed;\r\n var isScrollAllowed = {};\r\n isScrollAllowed.m = { 'up':true, 'down':true, 'left':true, 'right':true };\r\n isScrollAllowed.k = $.extend(true,{}, isScrollAllowed.m);\r\n var originals = $.extend(true, {}, options); //deep copy\r\n\r\n //timeouts\r\n var resizeId;\r\n var afterSectionLoadsId;\r\n var afterSlideLoadsId;\r\n var scrollId;\r\n var scrollId2;\r\n var keydownId;\r\n\r\n if($(this).length){\r\n init();\r\n }\r\n\r\n function init(){\r\n //if css3 is not supported, it will use jQuery animations\r\n if(options.css3){\r\n options.css3 = support3d();\r\n }\r\n\r\n //no anchors option? Checking for them in the DOM attributes\r\n if(!options.anchors.length){\r\n options.anchors = $('[data-anchor]').map(function(){\r\n return $(this).data('anchor').toString();\r\n }).get();\r\n }\r\n\r\n prepareDom();\r\n FP.setAllowScrolling(true);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n FP.setAutoScrolling(options.autoScrolling, 'internal');\r\n\r\n //the starting point is a slide?\r\n var activeSlide = $(SECTION_ACTIVE_SEL).find(SLIDE_ACTIVE_SEL);\r\n\r\n //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default.\r\n if( activeSlide.length && ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) !== 0 || ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) === 0 && activeSlide.index() !== 0))){\r\n silentLandscapeScroll(activeSlide);\r\n }\r\n\r\n responsive();\r\n\r\n //setting the class for the body element\r\n setBodyClass();\r\n\r\n $window.on('load', function() {\r\n scrollToAnchor();\r\n });\r\n }\r\n\r\n /**\r\n * Works over the DOM structure to set it up for the current fullpage optionss.\r\n */\r\n function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initilizing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createSlimScrollingHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createSlimScrollingHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }\r\n\r\n /**\r\n * Styles the horizontal slides for a section.\r\n */\r\n function styleSlides(section, slides, numSlides){\r\n var sliderWidth = numSlides * 100;\r\n var slideWidth = 100 / numSlides;\r\n\r\n slides.wrapAll('<div class=\"' + SLIDES_CONTAINER + '\" />');\r\n slides.parent().wrap('<div class=\"' + SLIDES_WRAPPER + '\" />');\r\n\r\n section.find(SLIDES_CONTAINER_SEL).css('width', sliderWidth + '%');\r\n\r\n if(numSlides > 1){\r\n if(options.controlArrows){\r\n createSlideArrows(section);\r\n }\r\n\r\n if(options.slidesNavigation){\r\n addSlidesNavigation(section, numSlides);\r\n }\r\n }\r\n\r\n slides.each(function(index) {\r\n $(this).css('width', slideWidth + '%');\r\n\r\n if(options.verticalCentered){\r\n addTableClass($(this));\r\n }\r\n });\r\n\r\n var startingSlide = section.find(SLIDE_ACTIVE_SEL);\r\n\r\n //if the slide won't be an starting point, the default will be the first one\r\n //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default.\r\n if( startingSlide.length && ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) !== 0 || ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) === 0 && startingSlide.index() !== 0))){\r\n silentLandscapeScroll(startingSlide);\r\n }else{\r\n slides.eq(0).addClass(ACTIVE);\r\n }\r\n }\r\n\r\n /**\r\n * Styling vertical sections\r\n */\r\n function styleSection(section, index){\r\n //if no active section is defined, the 1st one will be the default one\r\n if(!index && $(SECTION_ACTIVE_SEL).length === 0) {\r\n section.addClass(ACTIVE);\r\n }\r\n\r\n section.css('height', windowsHeight + 'px');\r\n\r\n if(options.paddingTop){\r\n section.css('padding-top', options.paddingTop);\r\n }\r\n\r\n if(options.paddingBottom){\r\n section.css('padding-bottom', options.paddingBottom);\r\n }\r\n\r\n if (typeof options.sectionsColor[index] !== 'undefined') {\r\n section.css('background-color', options.sectionsColor[index]);\r\n }\r\n\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n section.attr('data-anchor', options.anchors[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the data-anchor attributes to the menu elements and activates the current one.\r\n */\r\n function styleMenu(section, index){\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n //activating the menu / nav element on load\r\n if(section.hasClass(ACTIVE)){\r\n activateMenuAndNav(options.anchors[index], index);\r\n }\r\n }\r\n\r\n //moving the menu outside the main container if it is inside (avoid problems with fixed positions when using CSS3 tranforms)\r\n if(options.menu && options.css3 && $(options.menu).closest(WRAPPER_SEL).length){\r\n $(options.menu).appendTo($body);\r\n }\r\n }\r\n\r\n /**\r\n * Adds internal classes to be able to provide customizable selectors\r\n * keeping the link with the style sheet.\r\n */\r\n function addInternalSelectors(){\r\n //adding internal class names to void problem with common ones\r\n $(options.sectionSelector).each(function(){\r\n $(this).addClass(SECTION);\r\n });\r\n $(options.slideSelector).each(function(){\r\n $(this).addClass(SLIDE);\r\n });\r\n }\r\n\r\n /**\r\n * Creates the control arrows for the given section\r\n */\r\n function createSlideArrows(section){\r\n section.find(SLIDES_WRAPPER_SEL).after('<div class=\"' + SLIDES_ARROW_PREV + '\"></div><div class=\"' + SLIDES_ARROW_NEXT + '\"></div>');\r\n\r\n if(options.controlArrowColor!='#fff'){\r\n section.find(SLIDES_ARROW_NEXT_SEL).css('border-color', 'transparent transparent transparent '+options.controlArrowColor);\r\n section.find(SLIDES_ARROW_PREV_SEL).css('border-color', 'transparent '+ options.controlArrowColor + ' transparent transparent');\r\n }\r\n\r\n if(!options.loopHorizontal){\r\n section.find(SLIDES_ARROW_PREV_SEL).hide();\r\n }\r\n }\r\n\r\n /**\r\n * Creates a vertical navigation bar.\r\n */\r\n function addVerticalNavigation(){\r\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\r\n var nav = $(SECTION_NAV_SEL);\r\n\r\n nav.addClass(function() {\r\n return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition : options.navigationPosition;\r\n });\r\n\r\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\r\n var link = '';\r\n if (options.anchors.length) {\r\n link = options.anchors[i];\r\n }\r\n\r\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\r\n\r\n // Only add tooltip if needed (defined by user)\r\n var tooltip = options.navigationTooltips[i];\r\n\r\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\r\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '\">' + tooltip + '</div>';\r\n }\r\n\r\n li += '</li>';\r\n\r\n nav.find('ul').append(li);\r\n }\r\n\r\n //centering it vertically\r\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\r\n\r\n //activating the current active section\r\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\r\n }\r\n\r\n /**\r\n * Creates the slim scroll scrollbar for the sections and slides inside them.\r\n */\r\n function createSlimScrollingHandler(){\r\n $(SECTION_SEL).each(function(){\r\n var slides = $(this).find(SLIDE_SEL);\r\n\r\n if(slides.length){\r\n slides.each(function(){\r\n createSlimScrolling($(this));\r\n });\r\n }else{\r\n createSlimScrolling($(this));\r\n }\r\n\r\n });\r\n afterRenderActions();\r\n }\r\n\r\n /**\r\n * Actions and callbacks to fire afterRender\r\n */\r\n function afterRenderActions(){\r\n var section = $(SECTION_ACTIVE_SEL);\r\n\r\n if(options.scrollOverflowHandler.afterRender){\r\n options.scrollOverflowHandler.afterRender(section);\r\n }\r\n lazyLoad(section);\r\n playMedia(section);\r\n\r\n $.isFunction( options.afterLoad ) && options.afterLoad.call(section, section.data('anchor'), (section.index(SECTION_SEL) + 1));\r\n $.isFunction( options.afterRender ) && options.afterRender.call(container);\r\n }\r\n\r\n\r\n var isScrolling = false;\r\n\r\n //when scrolling...\r\n $window.on('scroll', scrollHandler);\r\n\r\n function scrollHandler(){\r\n var currentSection;\r\n\r\n if(!options.autoScrolling || options.scrollBar){\r\n var currentScroll = $window.scrollTop();\r\n var visibleSectionIndex = 0;\r\n var initial = Math.abs(currentScroll - document.querySelectorAll(SECTION_SEL)[0].offsetTop);\r\n\r\n //taking the section which is showing more content in the viewport\r\n var sections = document.querySelectorAll(SECTION_SEL);\r\n for (var i = 0; i < sections.length; ++i) {\r\n var section = sections[i];\r\n\r\n var current = Math.abs(currentScroll - section.offsetTop);\r\n\r\n if(current < initial){\r\n visibleSectionIndex = i;\r\n initial = current;\r\n }\r\n }\r\n\r\n //geting the last one, the current one on the screen\r\n currentSection = $(sections).eq(visibleSectionIndex);\r\n\r\n //setting the visible section as active when manually scrolling\r\n //executing only once the first time we reach the section\r\n if(!currentSection.hasClass(ACTIVE) && !currentSection.hasClass(AUTO_HEIGHT)){\r\n isScrolling = true;\r\n var leavingSection = $(SECTION_ACTIVE_SEL);\r\n var leavingSectionIndex = leavingSection.index(SECTION_SEL) + 1;\r\n var yMovement = getYmovement(currentSection);\r\n var anchorLink = currentSection.data('anchor');\r\n var sectionIndex = currentSection.index(SECTION_SEL) + 1;\r\n var activeSlide = currentSection.find(SLIDE_ACTIVE_SEL);\r\n\r\n if(activeSlide.length){\r\n var slideAnchorLink = activeSlide.data('anchor');\r\n var slideIndex = activeSlide.index();\r\n }\r\n\r\n if(canScroll){\r\n currentSection.addClass(ACTIVE).siblings().removeClass(ACTIVE);\r\n\r\n $.isFunction( options.onLeave ) && options.onLeave.call( leavingSection, leavingSectionIndex, sectionIndex, yMovement);\r\n\r\n $.isFunction( options.afterLoad ) && options.afterLoad.call( currentSection, anchorLink, sectionIndex);\r\n lazyLoad(currentSection);\r\n\r\n activateMenuAndNav(anchorLink, sectionIndex - 1);\r\n\r\n if(options.anchors.length){\r\n //needed to enter in hashChange event when using the menu with anchor links\r\n lastScrolledDestiny = anchorLink;\r\n\r\n setState(slideIndex, slideAnchorLink, anchorLink, sectionIndex);\r\n }\r\n }\r\n\r\n //small timeout in order to avoid entering in hashChange event when scrolling is not finished yet\r\n clearTimeout(scrollId);\r\n scrollId = setTimeout(function(){\r\n isScrolling = false;\r\n }, 100);\r\n }\r\n\r\n if(options.fitToSection){\r\n //for the auto adjust of the viewport to fit a whole section\r\n clearTimeout(scrollId2);\r\n\r\n scrollId2 = setTimeout(function(){\r\n //checking fitToSection again in case it was set to false before the timeout delay\r\n if(canScroll && options.fitToSection){\r\n //allows to scroll to an active section and\r\n //if the section is already active, we prevent firing callbacks\r\n if($(SECTION_ACTIVE_SEL).is(currentSection)){\r\n requestAnimFrame(function(){\r\n isResizing = true;\r\n });\r\n }\r\n scrollPage(currentSection);\r\n\r\n requestAnimFrame(function(){\r\n isResizing = false;\r\n });\r\n }\r\n }, options.fitToSectionDelay);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Determines the way of scrolling up or down:\r\n * by 'automatically' scrolling a section or by using the default and normal scrolling.\r\n */\r\n function scrolling(type, scrollable){\r\n if (!isScrollAllowed.m[type]){\r\n return;\r\n }\r\n var check, scrollSection;\r\n\r\n if(type == 'down'){\r\n check = 'bottom';\r\n scrollSection = FP.moveSectionDown;\r\n }else{\r\n check = 'top';\r\n scrollSection = FP.moveSectionUp;\r\n }\r\n\r\n if(scrollable.length > 0 ){\r\n //is the scrollbar at the start/end of the scroll?\r\n if(options.scrollOverflowHandler.isScrolled(check, scrollable)){\r\n scrollSection();\r\n }else{\r\n return true;\r\n }\r\n }else{\r\n // moved up/down\r\n scrollSection();\r\n }\r\n }\r\n\r\n\r\n var touchStartY = 0;\r\n var touchStartX = 0;\r\n var touchEndY = 0;\r\n var touchEndX = 0;\r\n\r\n /* Detecting touch events\r\n\r\n * As we are changing the top property of the page on scrolling, we can not use the traditional way to detect it.\r\n * This way, the touchstart and the touch moves shows an small difference between them which is the\r\n * used one to determine the direction.\r\n */\r\n function touchMoveHandler(event){\r\n var e = event.originalEvent;\r\n\r\n // additional: if one of the normalScrollElements isn't within options.normalScrollElementTouchThreshold hops up the DOM chain\r\n if (!checkParentForNormalScrollElement(event.target) && isReallyTouch(e) ) {\r\n\r\n if(options.autoScrolling){\r\n //preventing the easing on iOS devices\r\n event.preventDefault();\r\n }\r\n\r\n var activeSection = $(SECTION_ACTIVE_SEL);\r\n var scrollable = options.scrollOverflowHandler.scrollable(activeSection);\r\n\r\n if (canScroll && !slideMoving) { //if theres any #\r\n var touchEvents = getEventsPage(e);\r\n\r\n touchEndY = touchEvents.y;\r\n touchEndX = touchEvents.x;\r\n\r\n //if movement in the X axys is greater than in the Y and the currect section has slides...\r\n if (activeSection.find(SLIDES_WRAPPER_SEL).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) {\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (Math.abs(touchStartX - touchEndX) > ($window.width() / 100 * options.touchSensitivity)) {\r\n if (touchStartX > touchEndX) {\r\n if(isScrollAllowed.m.right){\r\n FP.moveSlideRight(); //next\r\n }\r\n } else {\r\n if(isScrollAllowed.m.left){\r\n FP.moveSlideLeft(); //prev\r\n }\r\n }\r\n }\r\n }\r\n\r\n //vertical scrolling (only when autoScrolling is enabled)\r\n else if(options.autoScrolling){\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (Math.abs(touchStartY - touchEndY) > ($window.height() / 100 * options.touchSensitivity)) {\r\n if (touchStartY > touchEndY) {\r\n scrolling('down', scrollable);\r\n } else if (touchEndY > touchStartY) {\r\n scrolling('up', scrollable);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * recursive function to loop up the parent nodes to check if one of them exists in options.normalScrollElements\r\n * Currently works well for iOS - Android might need some testing\r\n * @param {Element} el target element / jquery selector (in subsequent nodes)\r\n * @param {int} hop current hop compared to options.normalScrollElementTouchThreshold\r\n * @return {boolean} true if there is a match to options.normalScrollElements\r\n */\r\n function checkParentForNormalScrollElement (el, hop) {\r\n hop = hop || 0;\r\n var parent = $(el).parent();\r\n\r\n if (hop < options.normalScrollElementTouchThreshold &&\r\n parent.is(options.normalScrollElements) ) {\r\n return true;\r\n } else if (hop == options.normalScrollElementTouchThreshold) {\r\n return false;\r\n } else {\r\n return checkParentForNormalScrollElement(parent, ++hop);\r\n }\r\n }\r\n\r\n /**\r\n * As IE >= 10 fires both touch and mouse events when using a mouse in a touchscreen\r\n * this way we make sure that is really a touch event what IE is detecting.\r\n */\r\n function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }\r\n\r\n /**\r\n * Handler for the touch start event.\r\n */\r\n function touchStartHandler(event){\r\n var e = event.originalEvent;\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n $htmlBody.stop();\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the average of the last `number` elements of the given array.\r\n */\r\n function getAverage(elements, number){\r\n var sum = 0;\r\n\r\n //taking `number` elements from the end to make the average, if there are not enought, 1\r\n var lastElements = elements.slice(Math.max(elements.length - number, 1));\r\n\r\n for(var i = 0; i < lastElements.length; i++){\r\n sum = sum + lastElements[i];\r\n }\r\n\r\n return Math.ceil(sum/number);\r\n }\r\n\r\n /**\r\n * Detecting mousewheel scrolling\r\n *\r\n * http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html\r\n * http://www.sitepoint.com/html5-javascript-mouse-wheel/\r\n */\r\n var prevTime = new Date().getTime();\r\n\r\n function MouseWheelHandler(e) {\r\n var curTime = new Date().getTime();\r\n\r\n //autoscrolling and not zooming?\r\n if(options.autoScrolling && !controlPressed){\r\n // cross-browser wheel delta\r\n e = e || window.event;\r\n var value = e.wheelDelta || -e.deltaY || -e.detail;\r\n var delta = Math.max(-1, Math.min(1, value));\r\n\r\n var horizontalDetection = typeof e.wheelDeltaX !== 'undefined' || typeof e.deltaX !== 'undefined';\r\n var isScrollingVertically = (Math.abs(e.wheelDeltaX) < Math.abs(e.wheelDelta)) || (Math.abs(e.deltaX ) < Math.abs(e.deltaY) || !horizontalDetection);\r\n\r\n //Limiting the array to 150 (lets not waste memory!)\r\n if(scrollings.length > 149){\r\n scrollings.shift();\r\n }\r\n\r\n //keeping record of the previous scrollings\r\n scrollings.push(Math.abs(value));\r\n\r\n //preventing to scroll the site on mouse wheel when scrollbar is present\r\n if(options.scrollBar){\r\n e.preventDefault ? e.preventDefault() : e.returnValue = false;\r\n }\r\n\r\n var activeSection = $(SECTION_ACTIVE_SEL);\r\n var scrollable = options.scrollOverflowHandler.scrollable(activeSection);\r\n\r\n //time difference between the last scroll and the current one\r\n var timeDiff = curTime-prevTime;\r\n prevTime = curTime;\r\n\r\n //haven't they scrolled in a while?\r\n //(enough to be consider a different scrolling action to scroll another section)\r\n if(timeDiff > 200){\r\n //emptying the array, we dont care about old scrollings for our averages\r\n scrollings = [];\r\n }\r\n\r\n if(canScroll){\r\n var averageEnd = getAverage(scrollings, 10);\r\n var averageMiddle = getAverage(scrollings, 70);\r\n var isAccelerating = averageEnd >= averageMiddle;\r\n\r\n //to avoid double swipes...\r\n if(isAccelerating && isScrollingVertically){\r\n //scrolling down?\r\n if (delta < 0) {\r\n scrolling('down', scrollable);\r\n\r\n //scrolling up?\r\n }else {\r\n scrolling('up', scrollable);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if(options.fitToSection){\r\n //stopping the auto scroll to adjust to a section\r\n $htmlBody.stop();\r\n }\r\n }\r\n\r\n /**\r\n * Slides a slider to the given direction.\r\n * Optional `section` param.\r\n */\r\n function moveSlide(direction, section){\r\n var activeSection = typeof section === 'undefined' ? $(SECTION_ACTIVE_SEL) : section;\r\n var slides = activeSection.find(SLIDES_WRAPPER_SEL);\r\n var numSlides = slides.find(SLIDE_SEL).length;\r\n\r\n // more than one slide needed and nothing should be sliding\r\n if (!slides.length || slideMoving || numSlides < 2) {\r\n return;\r\n }\r\n\r\n var currentSlide = slides.find(SLIDE_ACTIVE_SEL);\r\n var destiny = null;\r\n\r\n if(direction === 'prev'){\r\n destiny = currentSlide.prev(SLIDE_SEL);\r\n }else{\r\n destiny = currentSlide.next(SLIDE_SEL);\r\n }\r\n\r\n //isn't there a next slide in the secuence?\r\n if(!destiny.length){\r\n //respect loopHorizontal settin\r\n if (!options.loopHorizontal) return;\r\n\r\n if(direction === 'prev'){\r\n destiny = currentSlide.siblings(':last');\r\n }else{\r\n destiny = currentSlide.siblings(':first');\r\n }\r\n }\r\n\r\n slideMoving = true;\r\n\r\n landscapeScroll(slides, destiny);\r\n }\r\n\r\n /**\r\n * Maintains the active slides in the viewport\r\n * (Because he `scroll` animation might get lost with some actions, such as when using continuousVertical)\r\n */\r\n function keepSlidesPosition(){\r\n $(SLIDE_ACTIVE_SEL).each(function(){\r\n silentLandscapeScroll($(this), 'internal');\r\n });\r\n }\r\n\r\n //IE < 10 pollify for requestAnimationFrame\r\n window.requestAnimFrame = function(){\r\n return window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.oRequestAnimationFrame ||\r\n window.msRequestAnimationFrame ||\r\n function(callback){ callback() }\r\n }();\r\n\r\n /**\r\n * Scrolls the site to the given element and scrolls to the slide if a callback is given.\r\n */\r\n function scrollPage(element, callback, isMovementUp){\r\n //requestAnimFrame is used in order to prevent a Chrome 44 bug (http://stackoverflow.com/a/31961816/1081396)\r\n requestAnimFrame(function(){\r\n var dest = element.position();\r\n if(typeof dest === 'undefined'){ return; } //there's no element to scroll, leaving the function\r\n\r\n //auto height? Scrolling only a bit, the next element's height. Otherwise the whole viewport.\r\n var dtop = element.hasClass(AUTO_HEIGHT) ? (dest.top - windowsHeight + element.height()) : dest.top;\r\n\r\n //local variables\r\n var v = {\r\n element: element,\r\n callback: callback,\r\n isMovementUp: isMovementUp,\r\n dest: dest,\r\n dtop: dtop,\r\n yMovement: getYmovement(element),\r\n anchorLink: element.data('anchor'),\r\n sectionIndex: element.index(SECTION_SEL),\r\n activeSlide: element.find(SLIDE_ACTIVE_SEL),\r\n activeSection: $(SECTION_ACTIVE_SEL),\r\n leavingSection: $(SECTION_ACTIVE_SEL).index(SECTION_SEL) + 1,\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n localIsResizing: isResizing\r\n };\r\n\r\n //quiting when destination scroll is the same as the current one\r\n if((v.activeSection.is(element) && !isResizing) || (options.scrollBar && $window.scrollTop() === v.dtop && !element.hasClass(AUTO_HEIGHT) )){ return; }\r\n\r\n if(v.activeSlide.length){\r\n var slideAnchorLink = v.activeSlide.data('anchor');\r\n var slideIndex = v.activeSlide.index();\r\n }\r\n\r\n // If continuousVertical && we need to wrap around\r\n if (options.autoScrolling && options.continuousVertical && typeof (v.isMovementUp) !== \"undefined\" &&\r\n ((!v.isMovementUp && v.yMovement == 'up') || // Intending to scroll down but about to go up or\r\n (v.isMovementUp && v.yMovement == 'down'))) { // intending to scroll up but about to go down\r\n\r\n v = createInfiniteSections(v);\r\n }\r\n\r\n //callback (onLeave) if the site is not just resizing and readjusting the slides\r\n if($.isFunction(options.onLeave) && !v.localIsResizing){\r\n if(options.onLeave.call(v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.yMovement) === false){\r\n return;\r\n }else{\r\n stopMedia(v.activeSection);\r\n }\r\n }\r\n\r\n element.addClass(ACTIVE).siblings().removeClass(ACTIVE);\r\n lazyLoad(element);\r\n\r\n //preventing from activating the MouseWheelHandler event\r\n //more than once if the page is scrolling\r\n canScroll = false;\r\n\r\n setState(slideIndex, slideAnchorLink, v.anchorLink, v.sectionIndex);\r\n\r\n performMovement(v);\r\n\r\n //flag to avoid callingn `scrollPage()` twice in case of using anchor links\r\n lastScrolledDestiny = v.anchorLink;\r\n\r\n //avoid firing it twice (as it does also on scroll)\r\n activateMenuAndNav(v.anchorLink, v.sectionIndex);\r\n });\r\n }\r\n\r\n /**\r\n * Performs the movement (by CSS3 or by jQuery)\r\n */\r\n function performMovement(v){\r\n // using CSS3 translate functionality\r\n if (options.css3 && options.autoScrolling && !options.scrollBar) {\r\n\r\n var translate3d = 'translate3d(0px, -' + v.dtop + 'px, 0px)';\r\n transformContainer(translate3d, true);\r\n\r\n //even when the scrollingSpeed is 0 there's a little delay, which might cause the\r\n //scrollingSpeed to change in case of using silentMoveTo();\r\n if(options.scrollingSpeed){\r\n afterSectionLoadsId = setTimeout(function () {\r\n afterSectionLoads(v);\r\n }, options.scrollingSpeed);\r\n }else{\r\n afterSectionLoads(v);\r\n }\r\n }\r\n\r\n // using jQuery animate\r\n else{\r\n var scrollSettings = getScrollSettings(v);\r\n\r\n $(scrollSettings.element).animate(\r\n scrollSettings.options,\r\n options.scrollingSpeed, options.easing).promise().done(function () { //only one single callback in case of animating `html, body`\r\n afterSectionLoads(v);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets the scrolling settings depending on the plugin autoScrolling option\r\n */\r\n function getScrollSettings(v){\r\n var scroll = {};\r\n\r\n if(options.autoScrolling && !options.scrollBar){\r\n scroll.options = { 'top': -v.dtop};\r\n scroll.element = WRAPPER_SEL;\r\n }else{\r\n scroll.options = { 'scrollTop': v.dtop};\r\n scroll.element = 'html, body';\r\n }\r\n\r\n return scroll;\r\n }\r\n\r\n /**\r\n * Adds sections before or after the current one to create the infinite effect.\r\n */\r\n function createInfiniteSections(v){\r\n // Scrolling down\r\n if (!v.isMovementUp) {\r\n // Move all previous sections to after the active section\r\n $(SECTION_ACTIVE_SEL).after(v.activeSection.prevAll(SECTION_SEL).get().reverse());\r\n }\r\n else { // Scrolling up\r\n // Move all next sections to before the active section\r\n $(SECTION_ACTIVE_SEL).before(v.activeSection.nextAll(SECTION_SEL));\r\n }\r\n\r\n // Maintain the displayed position (now that we changed the element order)\r\n silentScroll($(SECTION_ACTIVE_SEL).position().top);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n\r\n // save for later the elements that still need to be reordered\r\n v.wrapAroundElements = v.activeSection;\r\n\r\n // Recalculate animation variables\r\n v.dest = v.element.position();\r\n v.dtop = v.dest.top;\r\n v.yMovement = getYmovement(v.element);\r\n\r\n return v;\r\n }\r\n\r\n /**\r\n * Fix section order after continuousVertical changes have been animated\r\n */\r\n function continuousVerticalFixSectionOrder (v) {\r\n // If continuousVertical is in effect (and autoScrolling would also be in effect then),\r\n // finish moving the elements around so the direct navigation will function more simply\r\n if (!v.wrapAroundElements || !v.wrapAroundElements.length) {\r\n return;\r\n }\r\n\r\n if (v.isMovementUp) {\r\n $(SECTION_FIRST_SEL).before(v.wrapAroundElements);\r\n }\r\n else {\r\n $(SECTION_LAST_SEL).after(v.wrapAroundElements);\r\n }\r\n\r\n silentScroll($(SECTION_ACTIVE_SEL).position().top);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n }\r\n\r\n\r\n /**\r\n * Actions to do once the section is loaded.\r\n */\r\n function afterSectionLoads (v){\r\n continuousVerticalFixSectionOrder(v);\r\n\r\n v.element.find('.fp-scrollable').mouseover();\r\n\r\n //callback (afterLoad) if the site is not just resizing and readjusting the slides\r\n $.isFunction(options.afterLoad) && !v.localIsResizing && options.afterLoad.call(v.element, v.anchorLink, (v.sectionIndex + 1));\r\n\r\n playMedia(v.element)\r\n\r\n canScroll = true;\r\n\r\n $.isFunction(v.callback) && v.callback.call(this);\r\n }\r\n\r\n /**\r\n * Lazy loads image, video and audio elements.\r\n */\r\n function lazyLoad(destiny){\r\n //Lazy loading images, videos and audios\r\n var slide = destiny.find(SLIDE_ACTIVE_SEL);\r\n if( slide.length ) {\r\n destiny = $(slide);\r\n }\r\n\r\n destiny.find('img[data-src], source[data-src], audio[data-src]').each(function(){\r\n $(this).attr('src', $(this).data('src'));\r\n $(this).removeAttr('data-src');\r\n\r\n if($(this).is('source')){\r\n $(this).closest('video').get(0).load();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Plays video and audio elements.\r\n */\r\n function playMedia(destiny){\r\n //playing HTML5 media elements\r\n destiny.find('video, audio').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( element.hasAttribute('autoplay') && typeof element.play === 'function' ) {\r\n element.play();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Stops video and audio elements.\r\n */\r\n function stopMedia(destiny){\r\n //stopping HTML5 media elements\r\n destiny.find('video, audio').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( !element.hasAttribute('data-ignore') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Scrolls to the anchor in the URL when loading the site\r\n */\r\n function scrollToAnchor(){\r\n //getting the anchor link in the URL and deleting the `#`\r\n var value = window.location.hash.replace('#', '').split('/');\r\n var section = value[0];\r\n var slide = value[1];\r\n\r\n if(section){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(section, slide);\r\n }else{\r\n FP.silentMoveTo(section, slide);\r\n }\r\n }\r\n }\r\n\r\n //detecting any change on the URL to scroll to the given anchor link\r\n //(a way to detect back history button as we play with the hashes on the URL)\r\n $window.on('hashchange', hashChangeHandler);\r\n\r\n function hashChangeHandler(){\r\n if(!isScrolling && !options.lockAnchors){\r\n var value = window.location.hash.replace('#', '').split('/');\r\n var section = value[0];\r\n var slide = value[1];\r\n\r\n //when moving to a slide in the first section for the first time (first time to add an anchor to the URL)\r\n var isFirstSlideMove = (typeof lastScrolledDestiny === 'undefined');\r\n var isFirstScrollMove = (typeof lastScrolledDestiny === 'undefined' && typeof slide === 'undefined' && !slideMoving);\r\n\r\n\r\n if(section.length){\r\n\r\n /*in order to call scrollpage() only once for each destination at a time\r\n It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange`\r\n event is fired on every scroll too.*/\r\n if ((section && section !== lastScrolledDestiny) && !isFirstSlideMove || isFirstScrollMove || (!slideMoving && lastScrolledSlide != slide )) {\r\n scrollPageAndSlide(section, slide);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sliding with arrow keys, both, vertical and horizontal\r\n */\r\n $document.keydown(keydownHandler);\r\n\r\n //to prevent scrolling while zooming\r\n $document.keyup(function(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n });\r\n\r\n //when opening a new tab (ctrl + t), `control` won't be pressed when comming back.\r\n $(window).blur(function() {\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n });\r\n\r\n var keydownId;\r\n function keydownHandler(e) {\r\n\r\n clearTimeout(keydownId);\r\n\r\n\r\n var activeElement = $(':focus');\r\n\r\n if(!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select') &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n var keyCode = e.which;\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if($.inArray(keyCode, keyControls) > -1){\r\n e.preventDefault();\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }\r\n\r\n /**\r\n * Keydown event\r\n */\r\n function onkeydown(e){\r\n var shiftPressed = e.shiftKey;\r\n\r\n switch (e.which) {\r\n //up\r\n case 38:\r\n case 33:\r\n if(isScrollAllowed.k.up){\r\n FP.moveSectionUp();\r\n }\r\n break;\r\n\r\n //down\r\n case 32: //spacebar\r\n if(shiftPressed && isScrollAllowed.k.up){\r\n FP.moveSectionUp();\r\n break;\r\n }\r\n case 40:\r\n case 34:\r\n if(isScrollAllowed.k.down){\r\n FP.moveSectionDown();\r\n }\r\n break;\r\n\r\n //Home\r\n case 36:\r\n if(isScrollAllowed.k.up){\r\n FP.moveTo(1);\r\n }\r\n break;\r\n\r\n //End\r\n case 35:\r\n if(isScrollAllowed.k.down){\r\n FP.moveTo( $(SECTION_SEL).length );\r\n }\r\n break;\r\n\r\n //left\r\n case 37:\r\n if(isScrollAllowed.k.left){\r\n FP.moveSlideLeft();\r\n }\r\n break;\r\n\r\n //right\r\n case 39:\r\n if(isScrollAllowed.k.right){\r\n FP.moveSlideRight();\r\n }\r\n break;\r\n\r\n default:\r\n return; // exit this handler for other keys\r\n }\r\n }\r\n\r\n //binding the mousemove when the mouse's middle button is released\r\n container.mousedown(function(e){\r\n //middle button\r\n if (e.which == 2){\r\n oldPageY = e.pageY;\r\n container.on('mousemove', mouseMoveHandler);\r\n }\r\n });\r\n\r\n //unbinding the mousemove when the mouse's middle button is released\r\n container.mouseup(function(e){\r\n //middle button\r\n if (e.which == 2){\r\n container.off('mousemove');\r\n }\r\n });\r\n\r\n /**\r\n * Detecting the direction of the mouse movement.\r\n * Used only for the middle button of the mouse.\r\n */\r\n var oldPageY = 0;\r\n function mouseMoveHandler(e){\r\n // moving up\r\n if(canScroll){\r\n if (e.pageY < oldPageY){\r\n FP.moveSectionUp();\r\n\r\n // moving downw\r\n }else if(e.pageY > oldPageY){\r\n FP.moveSectionDown();\r\n }\r\n }\r\n oldPageY = e.pageY;\r\n }\r\n\r\n /**\r\n * Scrolls to the section when clicking the navigation bullet\r\n */\r\n $document.on('click touchstart', SECTION_NAV_SEL + ' a', function(e){\r\n e.preventDefault();\r\n var index = $(this).parent().index();\r\n scrollPage($(SECTION_SEL).eq(index));\r\n });\r\n\r\n /**\r\n * Scrolls the slider to the given slide destination for the given section\r\n */\r\n $document.on('click touchstart', SLIDES_NAV_LINK_SEL, function(e){\r\n e.preventDefault();\r\n var slides = $(this).closest(SECTION_SEL).find(SLIDES_WRAPPER_SEL);\r\n var destiny = slides.find(SLIDE_SEL).eq($(this).closest('li').index());\r\n\r\n landscapeScroll(slides, destiny);\r\n });\r\n\r\n /**\r\n * Applying normalScroll elements.\r\n * Ignoring the scrolls over the specified selectors.\r\n */\r\n if(options.normalScrollElements){\r\n $document.on('mouseenter', options.normalScrollElements, function () {\r\n FP.setMouseWheelScrolling(false);\r\n });\r\n\r\n $document.on('mouseleave', options.normalScrollElements, function(){\r\n FP.setMouseWheelScrolling(true);\r\n });\r\n }\r\n\r\n /**\r\n * Scrolling horizontally when clicking on the slider controls.\r\n */\r\n $(SECTION_SEL).on('click touchstart', SLIDES_ARROW_SEL, function() {\r\n var section = $(this).closest(SECTION_SEL);\r\n\r\n if ($(this).hasClass(SLIDES_PREV)) {\r\n if(isScrollAllowed.m.left){\r\n FP.moveSlideLeft(section);\r\n }\r\n } else {\r\n if(isScrollAllowed.m.right){\r\n FP.moveSlideRight(section);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Scrolls horizontal sliders.\r\n */\r\n function landscapeScroll(slides, destiny){\r\n var destinyPos = destiny.position();\r\n var slideIndex = destiny.index();\r\n var section = slides.closest(SECTION_SEL);\r\n var sectionIndex = section.index(SECTION_SEL);\r\n var anchorLink = section.data('anchor');\r\n var slidesNav = section.find(SLIDES_NAV_SEL);\r\n var slideAnchor = getAnchor(destiny);\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n var localIsResizing = isResizing;\r\n\r\n if(options.onSlideLeave){\r\n var prevSlide = section.find(SLIDE_ACTIVE_SEL);\r\n var prevSlideIndex = prevSlide.index();\r\n var xMovement = getXmovement(prevSlideIndex, slideIndex);\r\n\r\n //if the site is not just resizing and readjusting the slides\r\n if(!localIsResizing && xMovement!=='none'){\r\n if($.isFunction( options.onSlideLeave )){\r\n if(options.onSlideLeave.call( prevSlide, anchorLink, (sectionIndex + 1), prevSlideIndex, xMovement, slideIndex ) === false){\r\n slideMoving = false;\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n destiny.addClass(ACTIVE).siblings().removeClass(ACTIVE);\r\n if(!localIsResizing){\r\n lazyLoad(destiny);\r\n }\r\n\r\n if(!options.loopHorizontal && options.controlArrows){\r\n //hidding it for the fist slide, showing for the rest\r\n section.find(SLIDES_ARROW_PREV_SEL).toggle(slideIndex!==0);\r\n\r\n //hidding it for the last slide, showing for the rest\r\n section.find(SLIDES_ARROW_NEXT_SEL).toggle(!destiny.is(':last-child'));\r\n }\r\n\r\n //only changing the URL if the slides are in the current section (not for resize re-adjusting)\r\n if(section.hasClass(ACTIVE)){\r\n setState(slideIndex, slideAnchor, anchorLink, sectionIndex);\r\n }\r\n\r\n var afterSlideLoads = function(){\r\n //if the site is not just resizing and readjusting the slides\r\n if(!localIsResizing){\r\n $.isFunction( options.afterSlideLoad ) && options.afterSlideLoad.call( destiny, anchorLink, (sectionIndex + 1), slideAnchor, slideIndex);\r\n }\r\n //letting them slide again\r\n slideMoving = false;\r\n };\r\n\r\n if(options.css3){\r\n var translate3d = 'translate3d(-' + Math.round(destinyPos.left) + 'px, 0px, 0px)';\r\n\r\n addAnimation(slides.find(SLIDES_CONTAINER_SEL), options.scrollingSpeed>0).css(getTransforms(translate3d));\r\n\r\n afterSlideLoadsId = setTimeout(function(){\r\n afterSlideLoads();\r\n }, options.scrollingSpeed, options.easing);\r\n }else{\r\n slides.animate({\r\n scrollLeft : Math.round(destinyPos.left)\r\n }, options.scrollingSpeed, options.easing, function() {\r\n\r\n afterSlideLoads();\r\n });\r\n }\r\n\r\n slidesNav.find(ACTIVE_SEL).removeClass(ACTIVE);\r\n slidesNav.find('li').eq(slideIndex).find('a').addClass(ACTIVE);\r\n }\r\n\r\n //when resizing the site, we adjust the heights of the sections, slimScroll...\r\n $window.resize(resizeHandler);\r\n\r\n var previousHeight = windowsHeight;\r\n function resizeHandler(){\r\n //checking if it needs to get responsive\r\n responsive();\r\n\r\n // rebuild immediately on touch devices\r\n if (isTouchDevice) {\r\n var activeElement = $(document.activeElement);\r\n\r\n //if the keyboard is NOT visible\r\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\r\n var currentHeight = $window.height();\r\n\r\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\r\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\r\n FP.reBuild(true);\r\n previousHeight = currentHeight;\r\n }\r\n }\r\n }else{\r\n //in order to call the functions only when the resize is finished\r\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\r\n clearTimeout(resizeId);\r\n\r\n resizeId = setTimeout(function(){\r\n FP.reBuild(true);\r\n }, 350);\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the site needs to get responsive and disables autoScrolling if so.\r\n * A class `fp-responsive` is added to the plugin's container in case the user wants to use it for his own responsive CSS.\r\n */\r\n function responsive(){\r\n var widthLimit = options.responsive || options.responsiveWidth; //backwards compatiblity\r\n var heightLimit = options.responsiveHeight;\r\n\r\n //only calculating what we need. Remember its called on the resize event.\r\n var isBreakingPointWidth = widthLimit && $window.width() < widthLimit;\r\n var isBreakingPointHeight = heightLimit && $window.height() < heightLimit;\r\n\r\n if(widthLimit && heightLimit){\r\n FP.setResponsive(isBreakingPointWidth || isBreakingPointHeight);\r\n }\r\n else if(widthLimit){\r\n FP.setResponsive(isBreakingPointWidth);\r\n }\r\n else if(heightLimit){\r\n FP.setResponsive(isBreakingPointHeight);\r\n }\r\n }\r\n\r\n /**\r\n * Adds transition animations for the given element\r\n */\r\n function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }\r\n\r\n /**\r\n * Remove transition animations for the given element\r\n */\r\n function removeAnimation(element){\r\n return element.addClass(NO_TRANSITION);\r\n }\r\n\r\n /**\r\n * Resizing of the font size depending on the window size as well as some of the images on the site.\r\n */\r\n function resizeMe(displayHeight, displayWidth) {\r\n //Standard dimensions, for which the body font size is correct\r\n var preferredHeight = 825;\r\n var preferredWidth = 900;\r\n\r\n if (displayHeight < preferredHeight || displayWidth < preferredWidth) {\r\n var heightPercentage = (displayHeight * 100) / preferredHeight;\r\n var widthPercentage = (displayWidth * 100) / preferredWidth;\r\n var percentage = Math.min(heightPercentage, widthPercentage);\r\n var newFontSize = percentage.toFixed(2);\r\n\r\n $body.css('font-size', newFontSize + '%');\r\n } else {\r\n $body.css('font-size', '100%');\r\n }\r\n }\r\n\r\n /**\r\n * Activating the website navigation dots according to the given slide name.\r\n */\r\n function activateNavDots(name, sectionIndex){\r\n if(options.navigation){\r\n $(SECTION_NAV_SEL).find(ACTIVE_SEL).removeClass(ACTIVE);\r\n if(name){\r\n $(SECTION_NAV_SEL).find('a[href=\"#' + name + '\"]').addClass(ACTIVE);\r\n }else{\r\n $(SECTION_NAV_SEL).find('li').eq(sectionIndex).find('a').addClass(ACTIVE);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Activating the website main menu elements according to the given slide name.\r\n */\r\n function activateMenuElement(name){\r\n if(options.menu){\r\n $(options.menu).find(ACTIVE_SEL).removeClass(ACTIVE);\r\n $(options.menu).find('[data-menuanchor=\"'+name+'\"]').addClass(ACTIVE);\r\n }\r\n }\r\n\r\n function activateMenuAndNav(anchor, index){\r\n activateMenuElement(anchor);\r\n activateNavDots(anchor, index);\r\n }\r\n\r\n /**\r\n /**\r\n * Retuns `up` or `down` depending on the scrolling movement to reach its destination\r\n * from the current section.\r\n */\r\n function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }\r\n\r\n /**\r\n * Retuns `right` or `left` depending on the scrolling movement to reach its destination\r\n * from the current slide.\r\n */\r\n function getXmovement(fromIndex, toIndex){\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'left';\r\n }\r\n return 'right';\r\n }\r\n\r\n\r\n function createSlimScrolling(element){\r\n //needed to make `scrollHeight` work under Opera 12\r\n element.css('overflow', 'hidden');\r\n\r\n var scrollOverflowHandler = options.scrollOverflowHandler;\r\n var wrap = scrollOverflowHandler.wrapContent();\r\n //in case element is a slide\r\n var section = element.closest(SECTION_SEL);\r\n var scrollable = scrollOverflowHandler.scrollable(element);\r\n var contentHeight;\r\n\r\n //if there was scroll, the contentHeight will be the one in the scrollable section\r\n if(scrollable.length){\r\n contentHeight = scrollOverflowHandler.scrollHeight(element);\r\n }else{\r\n contentHeight = element.get(0).scrollHeight;\r\n if(options.verticalCentered){\r\n contentHeight = element.find(TABLE_CELL_SEL).get(0).scrollHeight;\r\n }\r\n }\r\n\r\n var scrollHeight = windowsHeight - parseInt(section.css('padding-bottom')) - parseInt(section.css('padding-top'));\r\n\r\n //needs scroll?\r\n if ( contentHeight > scrollHeight) {\r\n //was there already an scroll ? Updating it\r\n if(scrollable.length){\r\n scrollOverflowHandler.update(element, scrollHeight);\r\n }\r\n //creating the scrolling\r\n else{\r\n if(options.verticalCentered){\r\n element.find(TABLE_CELL_SEL).wrapInner(wrap);\r\n }else{\r\n element.wrapInner(wrap);\r\n }\r\n scrollOverflowHandler.create(element, scrollHeight);\r\n }\r\n }\r\n //removing the scrolling when it is not necessary anymore\r\n else{\r\n scrollOverflowHandler.remove(element);\r\n }\r\n\r\n //undo\r\n element.css('overflow', '');\r\n }\r\n\r\n function addTableClass(element){\r\n element.addClass(TABLE).wrapInner('<div class=\"' + TABLE_CELL + '\" style=\"height:' + getTableHeight(element) + 'px;\" />');\r\n }\r\n\r\n function getTableHeight(element){\r\n var sectionHeight = windowsHeight;\r\n\r\n if(options.paddingTop || options.paddingBottom){\r\n var section = element;\r\n if(!section.hasClass(SECTION)){\r\n section = element.closest(SECTION_SEL);\r\n }\r\n\r\n var paddings = parseInt(section.css('padding-top')) + parseInt(section.css('padding-bottom'));\r\n sectionHeight = (windowsHeight - paddings);\r\n }\r\n\r\n return sectionHeight;\r\n }\r\n\r\n /**\r\n * Adds a css3 transform property to the container class with or without animation depending on the animated param.\r\n */\r\n function transformContainer(translate3d, animated){\r\n if(animated){\r\n addAnimation(container);\r\n }else{\r\n removeAnimation(container);\r\n }\r\n\r\n container.css(getTransforms(translate3d));\r\n\r\n //syncronously removing the class after the animation has been applied.\r\n setTimeout(function(){\r\n container.removeClass(NO_TRANSITION);\r\n },10);\r\n }\r\n\r\n /**\r\n * Gets a section by its anchor / index\r\n */\r\n function getSectionByAnchor(sectionAnchor){\r\n //section\r\n var section = $(SECTION_SEL + '[data-anchor=\"'+sectionAnchor+'\"]');\r\n if(!section.length){\r\n section = $(SECTION_SEL).eq( (sectionAnchor -1) );\r\n }\r\n\r\n return section;\r\n }\r\n\r\n /**\r\n * Gets a slide inside a given section by its anchor / index\r\n */\r\n function getSlideByAnchor(slideAnchor, section){\r\n var slides = section.find(SLIDES_WRAPPER_SEL);\r\n var slide = slides.find(SLIDE_SEL + '[data-anchor=\"'+slideAnchor+'\"]');\r\n\r\n if(!slide.length){\r\n slide = slides.find(SLIDE_SEL).eq(slideAnchor);\r\n }\r\n\r\n return slide;\r\n }\r\n\r\n /**\r\n * Scrolls to the given section and slide anchors\r\n */\r\n function scrollPageAndSlide(destiny, slide){\r\n var section = getSectionByAnchor(destiny);\r\n\r\n //default slide\r\n if (typeof slide === 'undefined') {\r\n slide = 0;\r\n }\r\n\r\n //we need to scroll to the section and then to the slide\r\n if (destiny !== lastScrolledDestiny && !section.hasClass(ACTIVE)){\r\n scrollPage(section, function(){\r\n scrollSlider(section, slide);\r\n });\r\n }\r\n //if we were already in the section\r\n else{\r\n scrollSlider(section, slide);\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the slider to the given slide destination for the given section\r\n */\r\n function scrollSlider(section, slideAnchor){\r\n if(typeof slideAnchor !== 'undefined'){\r\n var slides = section.find(SLIDES_WRAPPER_SEL);\r\n var destiny = getSlideByAnchor(slideAnchor, section);\r\n\r\n if(destiny.length){\r\n landscapeScroll(slides, destiny);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a landscape navigation bar with dots for horizontal sliders.\r\n */\r\n function addSlidesNavigation(section, numSlides){\r\n section.append('<div class=\"' + SLIDES_NAV + '\"><ul></ul></div>');\r\n var nav = section.find(SLIDES_NAV_SEL);\r\n\r\n //top or bottom\r\n nav.addClass(options.slidesNavPosition);\r\n\r\n for(var i=0; i< numSlides; i++){\r\n nav.find('ul').append('<li><a href=\"#\"><span></span></a></li>');\r\n }\r\n\r\n //centering it\r\n nav.css('margin-left', '-' + (nav.width()/2) + 'px');\r\n\r\n nav.find('li').first().find('a').addClass(ACTIVE);\r\n }\r\n\r\n\r\n /**\r\n * Sets the state of the website depending on the active section/slide.\r\n * It changes the URL hash when needed and updates the body class.\r\n */\r\n function setState(slideIndex, slideAnchor, anchorLink, sectionIndex){\r\n var sectionHash = '';\r\n\r\n if(options.anchors.length && !options.lockAnchors){\r\n\r\n //isn't it the first slide?\r\n if(slideIndex){\r\n if(typeof anchorLink !== 'undefined'){\r\n sectionHash = anchorLink;\r\n }\r\n\r\n //slide without anchor link? We take the index instead.\r\n if(typeof slideAnchor === 'undefined'){\r\n slideAnchor = slideIndex;\r\n }\r\n\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(sectionHash + '/' + slideAnchor);\r\n\r\n //first slide won't have slide anchor, just the section one\r\n }else if(typeof slideIndex !== 'undefined'){\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(anchorLink);\r\n }\r\n\r\n //section without slides\r\n else{\r\n setUrlHash(anchorLink);\r\n }\r\n }\r\n\r\n setBodyClass();\r\n }\r\n\r\n /**\r\n * Sets the URL hash.\r\n */\r\n function setUrlHash(url){\r\n if(options.recordHistory){\r\n location.hash = url;\r\n }else{\r\n //Mobile Chrome doesn't work the normal way, so... lets use HTML5 for phones :)\r\n if(isTouchDevice || isTouch){\r\n history.replaceState(undefined, undefined, '#' + url);\r\n }else{\r\n var baseUrl = window.location.href.split('#')[0];\r\n window.location.replace( baseUrl + '#' + url );\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the anchor for the given slide / section. Its index will be used if there's none.\r\n */\r\n function getAnchor(element){\r\n var anchor = element.data('anchor');\r\n var index = element.index();\r\n\r\n //Slide without anchor link? We take the index instead.\r\n if(typeof anchor === 'undefined'){\r\n anchor = index;\r\n }\r\n\r\n return anchor;\r\n }\r\n\r\n /**\r\n * Sets a class for the body of the page depending on the active section / slide\r\n */\r\n function setBodyClass(){\r\n var section = $(SECTION_ACTIVE_SEL);\r\n var slide = section.find(SLIDE_ACTIVE_SEL);\r\n\r\n var sectionAnchor = getAnchor(section);\r\n var slideAnchor = getAnchor(slide);\r\n\r\n var sectionIndex = section.index(SECTION_SEL);\r\n\r\n var text = String(sectionAnchor);\r\n\r\n if(slide.length){\r\n text = text + '-' + slideAnchor;\r\n }\r\n\r\n //changing slash for dash to make it a valid CSS style\r\n text = text.replace('/', '-').replace('#','');\r\n\r\n //removing previous anchor classes\r\n var classRe = new RegExp('\\\\b\\\\s?' + VIEWING_PREFIX + '-[^\\\\s]+\\\\b', \"g\");\r\n $body[0].className = $body[0].className.replace(classRe, '');\r\n\r\n //adding the current anchor\r\n $body.addClass(VIEWING_PREFIX + '-' + text);\r\n }\r\n\r\n /**\r\n * Checks for translate3d support\r\n * @return boolean\r\n * http://stackoverflow.com/questions/5661671/detecting-transform-translate3d-support\r\n */\r\n function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling action fired by the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements won't scroll through sections.\r\n */\r\n function removeMouseWheelHandler(){\r\n if (document.addEventListener) {\r\n document.removeEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper\r\n document.removeEventListener('wheel', MouseWheelHandler, false); //Firefox\r\n document.removeEventListener('MozMousePixelScroll', MouseWheelHandler, false); //old Firefox\r\n } else {\r\n document.detachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8\r\n }\r\n }\r\n\r\n /**\r\n * Adds the auto scrolling action for the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements will scroll through sections\r\n * https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n */\r\n function addMouseWheelHandler(){\r\n var prefix = '';\r\n var _addEventListener;\r\n\r\n if (window.addEventListener){\r\n _addEventListener = \"addEventListener\";\r\n }else{\r\n _addEventListener = \"attachEvent\";\r\n prefix = 'on';\r\n }\r\n\r\n // detect available wheel event\r\n var support = 'onwheel' in document.createElement('div') ? 'wheel' : // Modern browsers support \"wheel\"\r\n document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least \"mousewheel\"\r\n 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox\r\n\r\n\r\n if(support == 'DOMMouseScroll'){\r\n document[ _addEventListener ](prefix + 'MozMousePixelScroll', MouseWheelHandler, false);\r\n }\r\n\r\n //handle MozMousePixelScroll in older Firefox\r\n else{\r\n document[ _addEventListener ](prefix + support, MouseWheelHandler, false);\r\n }\r\n }\r\n\r\n /**\r\n * Adds the possibility to auto scroll through sections on touch devices.\r\n */\r\n function addTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n //Microsoft pointers\r\n var MSPointer = getMSPointer();\r\n\r\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);\r\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);\r\n }\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling for touch devices.\r\n */\r\n function removeTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n //Microsoft pointers\r\n var MSPointer = getMSPointer();\r\n\r\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down);\r\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move);\r\n }\r\n }\r\n\r\n /*\r\n * Returns and object with Microsoft pointers (for IE<11 and for IE >= 11)\r\n * http://msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx\r\n */\r\n function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }\r\n\r\n /**\r\n * Gets the pageX and pageY properties depending on the browser.\r\n * https://github.com/alvarotrigo/fullPage.js/issues/194#issuecomment-34069854\r\n */\r\n function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }\r\n\r\n /**\r\n * Slides silently (with no animation) the active slider to the given slide.\r\n */\r\n function silentLandscapeScroll(activeSlide, noCallbacks){\r\n FP.setScrollingSpeed (0, 'internal');\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n //preventing firing callbacks afterSlideLoad etc.\r\n isResizing = true;\r\n }\r\n\r\n landscapeScroll(activeSlide.closest(SLIDES_WRAPPER_SEL), activeSlide);\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n isResizing = false;\r\n }\r\n\r\n FP.setScrollingSpeed(originals.scrollingSpeed, 'internal');\r\n }\r\n\r\n /**\r\n * Scrolls silently (with no animation) the page to the given Y position.\r\n */\r\n function silentScroll(top){\r\n if(options.scrollBar){\r\n container.scrollTop(top);\r\n }\r\n else if (options.css3) {\r\n var translate3d = 'translate3d(0px, -' + top + 'px, 0px)';\r\n transformContainer(translate3d, false);\r\n }\r\n else {\r\n container.css('top', -top);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the cross-browser transform string.\r\n */\r\n function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }\r\n\r\n /**\r\n * Allowing or disallowing the mouse/swipe scroll in a given direction. (not for keyboard)\r\n * @type m (mouse) or k (keyboard)\r\n */\r\n function setIsScrollAllowed(value, direction, type){\r\n switch (direction){\r\n case 'up': isScrollAllowed[type].up = value; break;\r\n case 'down': isScrollAllowed[type].down = value; break;\r\n case 'left': isScrollAllowed[type].left = value; break;\r\n case 'right': isScrollAllowed[type].right = value; break;\r\n case 'all':\r\n if(type == 'm'){\r\n FP.setAllowScrolling(value);\r\n }else{\r\n FP.setKeyboardScrolling(value);\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * Destroys fullpage.js plugin events and optinally its html markup and styles\r\n */\r\n FP.destroy = function(all){\r\n FP.setAutoScrolling(false, 'internal');\r\n FP.setAllowScrolling(false);\r\n FP.setKeyboardScrolling(false);\r\n container.addClass(DESTROYED);\r\n\r\n clearTimeout(afterSlideLoadsId);\r\n clearTimeout(afterSectionLoadsId);\r\n clearTimeout(resizeId);\r\n clearTimeout(scrollId);\r\n clearTimeout(scrollId2);\r\n\r\n $window\r\n .off('scroll', scrollHandler)\r\n .off('hashchange', hashChangeHandler)\r\n .off('resize', resizeHandler);\r\n\r\n $document\r\n .off('click', SECTION_NAV_SEL + ' a')\r\n .off('mouseenter', SECTION_NAV_SEL + ' li')\r\n .off('mouseleave', SECTION_NAV_SEL + ' li')\r\n .off('click', SLIDES_NAV_LINK_SEL)\r\n .off('mouseover', options.normalScrollElements)\r\n .off('mouseout', options.normalScrollElements);\r\n\r\n $(SECTION_SEL)\r\n .off('click', SLIDES_ARROW_SEL);\r\n\r\n clearTimeout(afterSlideLoadsId);\r\n clearTimeout(afterSectionLoadsId);\r\n\r\n //lets make a mess!\r\n if(all){\r\n destroyStructure();\r\n }\r\n };\r\n\r\n /*\r\n * Removes inline styles added by fullpage.js\r\n */\r\n function destroyStructure(){\r\n //reseting the `top` or `translate` properties to 0\r\n silentScroll(0);\r\n\r\n $(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL).remove();\r\n\r\n //removing inline styles\r\n $(SECTION_SEL).css( {\r\n 'height': '',\r\n 'background-color' : '',\r\n 'padding': ''\r\n });\r\n\r\n $(SLIDE_SEL).css( {\r\n 'width': ''\r\n });\r\n\r\n container.css({\r\n 'height': '',\r\n 'position': '',\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n $htmlBody.css({\r\n 'overflow': '',\r\n 'height': ''\r\n });\r\n\r\n // remove .fp-enabled class\r\n $('html').removeClass(ENABLED);\r\n\r\n // remove all of the .fp-viewing- classes\r\n $.each($body.get(0).className.split(/\\s+/), function (index, className) {\r\n if (className.indexOf(VIEWING_PREFIX) === 0) {\r\n $body.removeClass(className);\r\n }\r\n });\r\n\r\n //removing added classes\r\n $(SECTION_SEL + ', ' + SLIDE_SEL).each(function(){\r\n removeSlimScroll($(this));\r\n $(this).removeClass(TABLE + ' ' + ACTIVE);\r\n });\r\n\r\n removeAnimation(container);\r\n\r\n //Unwrapping content\r\n container.find(TABLE_CELL_SEL + ', ' + SLIDES_CONTAINER_SEL + ', ' + SLIDES_WRAPPER_SEL).each(function(){\r\n //unwrap not being use in case there's no child element inside and its just text\r\n $(this).replaceWith(this.childNodes);\r\n });\r\n\r\n //scrolling the page to the top with no animation\r\n $htmlBody.scrollTop(0);\r\n }\r\n\r\n /*\r\n * Sets the state for a variable with multiple states (original, and temporal)\r\n * Some variables such as `autoScrolling` or `recordHistory` might change automatically its state when using `responsive` or `autoScrolling:false`.\r\n * This function is used to keep track of both states, the original and the temporal one.\r\n * If type is not 'internal', then we assume the user is globally changing the variable.\r\n */\r\n function setVariableState(variable, value, type){\r\n options[variable] = value;\r\n if(type !== 'internal'){\r\n originals[variable] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Displays warnings\r\n */\r\n function displayWarnings(){\r\n // Disable mutually exclusive settings\r\n if (options.continuousVertical &&\r\n (options.loopTop || options.loopBottom)) {\r\n options.continuousVertical = false;\r\n showError('warn', 'Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n if(options.scrollBar && options.scrollOverflow){\r\n showError('warn', 'Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox');\r\n }\r\n\r\n if(options.continuousVertical && options.scrollBar){\r\n options.continuousVertical = false;\r\n showError('warn', 'Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n //anchors can not have the same value as any element ID or NAME\r\n $.each(options.anchors, function(index, name){\r\n if($('#' + name).length || $('[name=\"'+name+'\"]').length ){\r\n showError('error', 'data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Shows a message in the console of the given type.\r\n */\r\n function showError(type, text){\r\n console && console[type] && console[type]('fullPage: ' + text);\r\n }\r\n };\r\n\r\n /**\r\n * An object to handle overflow scrolling.\r\n * This uses jquery.slimScroll to accomplish overflow scrolling.\r\n * It is possible to pass in an alternate scrollOverflowHandler\r\n * to the fullpage.js option that implements the same functions\r\n * as this handler.\r\n *\r\n * @type {Object}\r\n */\r\n var slimScrollHandler = {\r\n /**\r\n * Optional function called after each render.\r\n *\r\n * Solves a bug with slimScroll vendor library #1037, #553\r\n *\r\n * @param {object} section jQuery object containing rendered section\r\n */\r\n afterRender: function(section){\r\n var slides = section.find(SLIDES_WRAPPER);\r\n var scrollableWrap = section.find(SCROLLABLE_SEL);\r\n\r\n if(slides.length){\r\n scrollableWrap = slides.find(SLIDE_ACTIVE_SEL);\r\n }\r\n\r\n scrollableWrap.mouseover();\r\n },\r\n\r\n /**\r\n * Called when overflow scrolling is needed for a section.\r\n *\r\n * @param {Object} element jQuery object containing current section\r\n * @param {Number} scrollHeight Current window height in pixels\r\n */\r\n create: function(element, scrollHeight){\r\n element.find(SCROLLABLE_SEL).slimScroll({\r\n allowPageScroll: true,\r\n height: scrollHeight + 'px',\r\n size: '10px',\r\n alwaysVisible: true\r\n });\r\n },\r\n\r\n /**\r\n * Return a boolean depending on whether the scrollable element is a\r\n * the end or at the start of the scrolling depending on the given type.\r\n *\r\n * @param {String} type Either 'top' or 'bottom'\r\n * @param {Object} scrollable jQuery object for the scrollable element\r\n * @return {Boolean}\r\n */\r\n isScrolled: function(type, scrollable){\r\n if(type === 'top'){\r\n return !scrollable.scrollTop();\r\n }else if(type === 'bottom'){\r\n return scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the scrollable element for the given section.\r\n * If there are landscape slides, will only return a scrollable element\r\n * if it is in the active slide.\r\n *\r\n * @param {Object} activeSection jQuery object containing current section\r\n * @return {Boolean}\r\n */\r\n scrollable: function(activeSection){\r\n // if there are landscape slides, we check if the scrolling bar is in the current one or not\r\n if(activeSection.find(SLIDES_WRAPPER_SEL).length){\r\n return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL);\r\n }\r\n return activeSection.find(SCROLLABLE_SEL);\r\n },\r\n\r\n /**\r\n * Returns the scroll height of the wrapped content.\r\n * If this is larger than the window height minus section padding,\r\n * overflow scrolling is needed.\r\n *\r\n * @param {Object} element jQuery object containing current section\r\n * @return {Number}\r\n */\r\n scrollHeight: function(element){\r\n return element.find(SCROLLABLE_SEL).get(0).scrollHeight;\r\n },\r\n\r\n /**\r\n * Called when overflow scrolling is no longer needed for a section.\r\n *\r\n * @param {Object} element jQuery object containing current section\r\n */\r\n remove: function(element){\r\n element.find(SCROLLABLE_SEL).children().first().unwrap().unwrap();\r\n element.find(SLIMSCROLL_BAR_SEL).remove();\r\n element.find(SLIMSCROLL_RAIL_SEL).remove();\r\n },\r\n\r\n /**\r\n * Called when overflow scrolling has already been setup but the\r\n * window height has potentially changed.\r\n *\r\n * @param {Object} element jQuery object containing current section\r\n * @param {Number} scrollHeight Current window height in pixels\r\n */\r\n update: function(element, scrollHeight){\r\n element.find(SCROLLABLE_SEL).css('height', scrollHeight + 'px').parent().css('height', scrollHeight + 'px');\r\n },\r\n\r\n /**\r\n * Called to get any additional elements needed to wrap the section\r\n * content in order to facilitate overflow scrolling.\r\n *\r\n * @return {String|Object} Can be a string containing HTML,\r\n * a DOM element, or jQuery object.\r\n */\r\n wrapContent: function(){\r\n return '<div class=\"' + SCROLLABLE + '\"></div>';\r\n }\r\n };\r\n\r\n defaultScrollHandler = slimScrollHandler;\r\n\r\n});\r\n"],"sourceRoot":"/source/"}