/**
* fullPage 2.5.7
* https://github.com/alvarotrigo/fullPage.js
* MIT licensed
*
* Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo
*/
(function(b){b.fn.fullpage=function(c){function wa(a){a.find(".fp-slides").after('
');"#fff"!=c.controlArrowColor&&(a.find(".fp-controlArrow.fp-next").css("border-color","transparent transparent transparent "+c.controlArrowColor),a.find(".fp-controlArrow.fp-prev").css("border-color","transparent "+c.controlArrowColor+" transparent transparent"));c.loopHorizontal||a.find(".fp-controlArrow.fp-prev").hide()}function xa(){b("body").append('');
h=b("#fp-nav");h.css("color",c.navigationColor);h.addClass(c.navigationPosition);for(var a=0;a',e=c.navigationTooltips[a];void 0!==e&&""!=e&&(d+=''+e+"
");d+="";h.find("ul").append(d)}}function V(){b(".fp-section").each(function(){var a=b(this).find(".fp-slide");a.length?a.each(function(){A(b(this))}):A(b(this))});b.isFunction(c.afterRender)&&
c.afterRender.call(this)}function W(){var a;if(!c.autoScrolling||c.scrollBar){var d=b(window).scrollTop(),e=0,g=Math.abs(d-b(".fp-section").first().offset().top);b(".fp-section").each(function(a){var c=Math.abs(d-b(this).offset().top);c=d[0].scrollHeight:void 0,c)g();else return!0;else g()}}function za(a){var d=a.originalEvent;if(!aa(a.target)&&ba(d)){c.autoScrolling&&a.preventDefault();a=b(".fp-section.active");var e=Z(a);n&&!w&&(d=ca(d),u=d.y,D=d.x,a.find(".fp-slides").length&&Math.abs(E-D)>Math.abs(x-u)?Math.abs(E-
D)>b(window).width()/100*c.touchSensitivity&&(E>D?l.right&&b.fn.fullpage.moveSlideRight():l.left&&b.fn.fullpage.moveSlideLeft()):c.autoScrolling&&Math.abs(x-u)>b(window).height()/100*c.touchSensitivity&&(x>u?C("down",e):u>x&&C("up",e)))}}function aa(a,d){d=d||0;var e=b(a).parent();return d=g&&(0>e?C("down",a):C("up",a))}return!1}c.scrollBar&&b("html,body").stop()}function ea(a){var d=b(".fp-section.active").find(".fp-slides");if(d.length&&!w){var e=d.find(".fp-slide.active"),g=null,g="prev"===a?e.prev(".fp-slide"):e.next(".fp-slide");if(!g.length){if(!c.loopHorizontal)return;g="prev"===a?e.siblings(":last"):e.siblings(":first")}w=!0;z(d,g)}}function fa(){b(".fp-slide.active").each(function(){N(b(this))})}function q(a,d,e){var g=a.position();if("undefined"!==typeof g&&
(d={element:a,callback:d,isMovementUp:e,dest:g,dtop:g.top,yMovement:K(a),anchorLink:a.data("anchor"),sectionIndex:a.index(".fp-section"),activeSlide:a.find(".fp-slide.active"),activeSection:b(".fp-section.active"),leavingSection:b(".fp-section.active").index(".fp-section")+1,localIsResizing:v},!(d.activeSection.is(a)&&!v||c.scrollBar&&b(window).scrollTop()===d.dtop))){if(d.activeSlide.length)var f=d.activeSlide.data("anchor"),h=d.activeSlide.index();c.autoScrolling&&c.continuousVertical&&"undefined"!==
typeof d.isMovementUp&&(!d.isMovementUp&&"up"==d.yMovement||d.isMovementUp&&"down"==d.yMovement)&&(d.isMovementUp?b(".fp-section.active").before(d.activeSection.nextAll(".fp-section")):b(".fp-section.active").after(d.activeSection.prevAll(".fp-section").get().reverse()),m(b(".fp-section.active").position().top),fa(),d.wrapAroundElements=d.activeSection,d.dest=d.element.position(),d.dtop=d.dest.top,d.yMovement=K(d.element));a.addClass("active").siblings().removeClass("active");n=!1;M(h,f,d.anchorLink,
d.sectionIndex);b.isFunction(c.onLeave)&&!d.localIsResizing&&c.onLeave.call(d.activeSection,d.leavingSection,d.sectionIndex+1,d.yMovement);Ba(d);p=d.anchorLink;L(d.anchorLink,d.sectionIndex)}}function Ba(a){if(c.css3&&c.autoScrolling&&!c.scrollBar)ga("translate3d(0px, -"+a.dtop+"px, 0px)",!0),setTimeout(function(){ha(a)},c.scrollingSpeed);else{var d=Ca(a);b(d.element).animate(d.options,c.scrollingSpeed,c.easing).promise().done(function(){ha(a)})}}function Ca(a){var d={};c.autoScrolling&&!c.scrollBar?
(d.options={top:-a.dtop},d.element="."+ia):(d.options={scrollTop:a.dtop},d.element="html, body");return d}function Da(a){a.wrapAroundElements&&a.wrapAroundElements.length&&(a.isMovementUp?b(".fp-section:first").before(a.wrapAroundElements):b(".fp-section:last").after(a.wrapAroundElements),m(b(".fp-section.active").position().top),fa())}function ha(a){Da(a);b.isFunction(c.afterLoad)&&!a.localIsResizing&&c.afterLoad.call(a.element,a.anchorLink,a.sectionIndex+1);n=!0;setTimeout(function(){b.isFunction(a.callback)&&
a.callback.call(this)},600)}function ja(){if(!J){var a=window.location.hash.replace("#","").split("/"),d=a[0],a=a[1];if(d.length){var b="undefined"===typeof p,c="undefined"===typeof p&&"undefined"===typeof a&&!w;(d&&d!==p&&!b||c||!w&&O!=a)&&P(d,a)}}}function Ea(a){n&&(a.pageYF&&b.fn.fullpage.moveSectionDown());F=a.pageY}function z(a,d){var e=d.position(),g=a.find(".fp-slidesContainer").parent(),f=d.index(),h=a.closest(".fp-section"),k=h.index(".fp-section"),
l=h.data("anchor"),m=h.find(".fp-slidesNav"),t=d.data("anchor"),n=v;if(c.onSlideLeave){var q=h.find(".fp-slide.active"),p=q.index(),r;r=p==f?"none":p>f?"left":"right";n||"none"===r||b.isFunction(c.onSlideLeave)&&c.onSlideLeave.call(q,l,k+1,p,r)}d.addClass("active").siblings().removeClass("active");"undefined"===typeof t&&(t=f);!c.loopHorizontal&&c.controlArrows&&(h.find(".fp-controlArrow.fp-prev").toggle(0!=f),h.find(".fp-controlArrow.fp-next").toggle(!d.is(":last-child")));h.hasClass("active")&&
M(f,t,l,k);var u=function(){n||b.isFunction(c.afterSlideLoad)&&c.afterSlideLoad.call(d,l,k+1,t,f);w=!1};c.css3?(e="translate3d(-"+e.left+"px, 0px, 0px)",ka(a.find(".fp-slidesContainer"),020*Math.max(Q,a)/100&&(b.fn.fullpage.reBuild(!0),Q=a))}else clearTimeout(oa),oa=setTimeout(function(){b.fn.fullpage.reBuild(!0)},500)}function na(){if(c.responsive){var a=f.hasClass("fp-responsive");b(window).width()a||900>d){var c=Math.min(100*a/825,100*d/900).toFixed(2);b("body").css("font-size",c+"%")}else b("body").css("font-size","100%")}function L(a,d){c.menu&&(b(c.menu).find(".active").removeClass("active"),b(c.menu).find('[data-menuanchor="'+a+'"]').addClass("active"));c.navigation&&
(b("#fp-nav").find(".active").removeClass("active"),a?b("#fp-nav").find('a[href="#'+a+'"]').addClass("active"):b("#fp-nav").find("li").eq(d).find("a").addClass("active"))}function K(a){var d=b(".fp-section.active").index(".fp-section");a=a.index(".fp-section");return d==a?"none":d>a?"up":"down"}function A(a){a.css("overflow","hidden");var d=a.closest(".fp-section"),b=a.find(".fp-scrollable"),g;b.length?g=b.get(0).scrollHeight:(g=a.get(0).scrollHeight,c.verticalCentered&&(g=a.find(".fp-tableCell").get(0).scrollHeight));
d=k-parseInt(d.css("padding-bottom"))-parseInt(d.css("padding-top"));g>d?b.length?b.css("height",d+"px").parent().css("height",d+"px"):(c.verticalCentered?a.find(".fp-tableCell").wrapInner(''):a.wrapInner(''),a.find(".fp-scrollable").slimScroll({allowPageScroll:!0,height:d+"px",size:"10px",alwaysVisible:!0})):pa(a);a.css("overflow","")}function pa(a){a.find(".fp-scrollable").children().first().unwrap().unwrap();a.find(".slimScrollBar").remove();
a.find(".slimScrollRail").remove()}function qa(a){a.addClass("fp-table").wrapInner('')}function ra(a){var b=k;if(c.paddingTop||c.paddingBottom)b=a,b.hasClass("fp-section")||(b=a.closest(".fp-section")),a=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom")),b=k-a;return b}function ga(a,b){b?ka(f):S(f);f.css(la(a));setTimeout(function(){f.removeClass("fp-notransition")},10)}function P(a,d){var c;"undefined"===typeof d&&(d=0);c=isNaN(a)?
b('[data-anchor="'+a+'"]'):b(".fp-section").eq(a-1);a===p||c.hasClass("active")?sa(c,d):q(c,function(){sa(c,d)})}function sa(a,b){if("undefined"!=typeof b){var c=a.find(".fp-slides"),g=c.find('[data-anchor="'+b+'"]');g.length||(g=c.find(".fp-slide").eq(b));g.length&&z(c,g)}}function Ga(a,b){a.append('');var e=a.find(".fp-slidesNav");e.addClass(c.slidesNavPosition);for(var g=0;g');e.css("margin-left",
"-"+e.width()/2+"px");e.find("li").first().find("a").addClass("active")}function M(a,b,e,g){var f="";c.anchors.length?(a?("undefined"!==typeof e&&(f=e),"undefined"===typeof b&&(b=a),O=b,ta(f+"/"+b)):("undefined"!==typeof a&&(O=b),ta(e)),H(location.hash)):"undefined"!==typeof a?H(g+"-"+a):H(String(g))}function ta(a){if(c.recordHistory)location.hash=a;else if(G||T)history.replaceState(void 0,void 0,"#"+a);else{var b=window.location.href.split("#")[0];window.location.replace(b+"#"+a)}}function H(a){a=
a.replace("/","-").replace("#","");b("body")[0].className=b("body")[0].className.replace(/\b\s?fp-viewing-[^\s]+\b/g,"");b("body").addClass("fp-viewing-"+a)}function Ha(){var a=document.createElement("p"),b,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var g in c)void 0!==a.style[g]&&(a.style[g]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[g]));
document.body.removeChild(a);return void 0!==b&&0(b/=f/2)?g/2*b*b*b+c:g/2*((b-=2)*b*b+2)+c}});b.extend(b.easing,{easeInQuart:function(a,
b,c,g,f){return g*(b/=f)*b*b*b+c}});b.fn.fullpage.setAutoScrolling=function(a,d){U("autoScrolling",a,d);var e=b(".fp-section.active");c.autoScrolling&&!c.scrollBar?(b("html, body").css({overflow:"hidden",height:"100%"}),b.fn.fullpage.setRecordHistory(c.recordHistory,"internal"),f.css({"-ms-touch-action":"none","touch-action":"none"}),e.length&&m(e.position().top)):(b("html, body").css({overflow:"visible",height:"initial"}),b.fn.fullpage.setRecordHistory(!1,"internal"),f.css({"-ms-touch-action":"",
"touch-action":""}),m(0),b("html, body").scrollTop(e.position().top))};b.fn.fullpage.setRecordHistory=function(a,b){U("recordHistory",a,b)};b.fn.fullpage.setScrollingSpeed=function(a,b){U("scrollingSpeed",a,b)};b.fn.fullpage.setMouseWheelScrolling=function(a){a?document.addEventListener?(document.addEventListener("mousewheel",r,!1),document.addEventListener("wheel",r,!1)):document.attachEvent("onmousewheel",r):document.addEventListener?(document.removeEventListener("mousewheel",r,!1),document.removeEventListener("wheel",
r,!1)):document.detachEvent("onmousewheel",r)};b.fn.fullpage.setAllowScrolling=function(a,c){"undefined"!=typeof c?(c=c.replace(" ","").split(","),b.each(c,function(c,d){switch(d){case "up":l.up=a;break;case "down":l.down=a;break;case "left":l.left=a;break;case "right":l.right=a;break;case "all":b.fn.fullpage.setAllowScrolling(a)}})):a?(b.fn.fullpage.setMouseWheelScrolling(!0),Ia()):(b.fn.fullpage.setMouseWheelScrolling(!1),Ja())};b.fn.fullpage.setKeyboardScrolling=function(a){c.keyboardScrolling=
a};b.fn.fullpage.moveSectionUp=function(){var a=b(".fp-section.active").prev(".fp-section");a.length||!c.loopTop&&!c.continuousVertical||(a=b(".fp-section").last());a.length&&q(a,null,!0)};b.fn.fullpage.moveSectionDown=function(){var a=b(".fp-section.active").next(".fp-section");a.length||!c.loopBottom&&!c.continuousVertical||(a=b(".fp-section").first());a.length&&q(a,null,!1)};b.fn.fullpage.moveTo=function(a,c){var e="",e=isNaN(a)?b('[data-anchor="'+a+'"]'):b(".fp-section").eq(a-1);"undefined"!==
typeof c?P(a,c):0');
e.parent().wrap('');b(this).find(".fp-slidesContainer").css("width",a+"%");c.controlArrows&&wa(b(this));c.slidesNavigation&&Ga(b(this),g);e.each(function(a){b(this).css("width",f+"%");c.verticalCentered&&qa(b(this))});d=d.find(".fp-slide.active");d.length?N(d):e.eq(0).addClass("active")}else c.verticalCentered&&qa(b(this))}).promise().done(function(){b.fn.fullpage.setAutoScrolling(c.autoScrolling,"internal");var a=b(".fp-section.active").find(".fp-slide.active");a.length&&
(0!==b(".fp-section.active").index(".fp-section")||0===b(".fp-section.active").index(".fp-section")&&0!==a.index())&&N(a);c.fixedElements&&c.css3&&b(c.fixedElements).appendTo("body");c.navigation&&(h.css("margin-top","-"+h.height()/2+"px"),h.find("li").eq(b(".fp-section.active").index(".fp-section")).find("a").addClass("active"));c.menu&&c.css3&&b(c.menu).closest(".fullpage-wrapper").length&&b(c.menu).appendTo("body");c.scrollOverflow?("complete"===document.readyState&&V(),b(window).on("load",V)):
b.isFunction(c.afterRender)&&c.afterRender.call(f);na();a=window.location.hash.replace("#","").split("/")[0];if(a.length){var d=b('[data-anchor="'+a+'"]');!c.animateAnchor&&d.length&&(c.autoScrolling?m(d.position().top):(m(0),H(a),b("html, body").scrollTop(d.position().top)),L(a,null),b.isFunction(c.afterLoad)&&c.afterLoad.call(d,a,d.index(".fp-section")+1),d.addClass("active").siblings().removeClass("active"))}b(window).on("load",function(){var a=window.location.hash.replace("#","").split("/"),b=
a[0],a=a[1];b&&P(b,a)})});var X,Y,J=!1;b(window).on("scroll",W);var x=0,E=0,u=0,D=0;b(window).on("hashchange",ja);b(window).keydown(function(a){clearTimeout(va);va=setTimeout(function(){var d=a.shiftKey,e=b(document.activeElement);if(!e.is("textarea")&&!e.is("input")&&!e.is("select")&&c.keyboardScrolling&&c.autoScrolling)switch(40!=a.which&&38!=a.which&&32!=a.which||a.preventDefault(),a.which){case 38:case 33:b.fn.fullpage.moveSectionUp();break;case 32:if(d){b.fn.fullpage.moveSectionUp();break}case 40:case 34:b.fn.fullpage.moveSectionDown();
break;case 36:b.fn.fullpage.moveTo(1);break;case 35:b.fn.fullpage.moveTo(b(".fp-section").length);break;case 37:b.fn.fullpage.moveSlideLeft();break;case 39:b.fn.fullpage.moveSlideRight()}},150)});var va;f.mousedown(function(a){2==a.which&&(F=a.pageY,f.on("mousemove",Ea))});f.mouseup(function(a){2==a.which&&f.off("mousemove")});var F=0;b(document).on("click touchstart","#fp-nav a",function(a){a.preventDefault();a=b(this).parent().index();q(b(".fp-section").eq(a))});b(document).on("click touchstart",
".fp-slidesNav a",function(a){a.preventDefault();a=b(this).closest(".fp-section").find(".fp-slides");var c=a.find(".fp-slide").eq(b(this).closest("li").index());z(a,c)});c.normalScrollElements&&(b(document).on("mouseenter",c.normalScrollElements,function(){b.fn.fullpage.setMouseWheelScrolling(!1)}),b(document).on("mouseleave",c.normalScrollElements,function(){b.fn.fullpage.setMouseWheelScrolling(!0)}));b(".fp-section").on("click touchstart",".fp-controlArrow",function(){b(this).hasClass("fp-prev")?
b.fn.fullpage.moveSlideLeft():b.fn.fullpage.moveSlideRight()});b(window).resize(ma);var Q=k,oa;b.fn.fullpage.destroy=function(a){b.fn.fullpage.setAutoScrolling(!1,"internal");b.fn.fullpage.setAllowScrolling(!1);b.fn.fullpage.setKeyboardScrolling(!1);f.addClass("fp-destroyed");b(window).off("scroll",W).off("hashchange",ja).off("resize",ma);b(document).off("click","#fp-nav a").off("mouseenter","#fp-nav li").off("mouseleave","#fp-nav li").off("click",".fp-slidesNav a").off("mouseover",c.normalScrollElements).off("mouseout",
c.normalScrollElements);b(".fp-section").off("click",".fp-controlArrow");a&&Ka()}}})(jQuery);