!function($,window,document,undefined){function Plugin(element,options){this.element=element,this.options=$.extend({},defaults,options),this._defaults=defaults,this._name=pluginName,this.effectClassName="intro-effect-"+this.options.effect,this.init()}var pluginName="sectiontrans",defaults={effect:"fade"};Plugin.prototype={init:function(){var pageScroll=this.scrollY();this.noscroll=0===pageScroll,this.disable_scroll(),$(this.element).addClass(this.effectClassName),pageScroll&&(this.isRevealed=!0,$(this.element).addClass("notrans"),$(this.element).addClass("modify"));var that=this;window.addEventListener("scroll",function(e){that.scrollPage.call(that,e)})},keys:[32,37,38,39,40],docElem:window.document.documentElement,scrollVal:0,isRevealed:!1,noscroll:!1,isAnimating:!1,trigger:$("button.trigger"),preventDefault:function(e){e=e||window.event,e.preventDefault&&e.preventDefault(),e.returnValue=!1},ie:function(){var undef,rv=-1,ua=window.navigator.userAgent,msie=ua.indexOf("MSIE "),trident=ua.indexOf("Trident/");if(msie>0)rv=parseInt(ua.substring(msie+5,ua.indexOf(".",msie)),10);else if(trident>0){var rvNum=ua.indexOf("rv:");rv=parseInt(ua.substring(rvNum+3,ua.indexOf(".",rvNum)),10)}return rv>-1?rv:void 0}(),wheel:function(e){},disable_scroll:function(){window.onmousewheel=document.onmousewheel=this.wheel},enable_scroll:function(){window.onmousewheel=document.onmousewheel=document.onkeydown=document.body.ontouchmove=null},scrollY:function(){return window.pageYOffset||this.docElem.scrollTop},scrollPage:function(){if(this.scrollVal=this.scrollY(),this.noscroll&&!this.ie){if(this.scrollVal<0)return!1;window.scrollTo(0,0)}return $(this.element).hasClass("notrans")?($(this.element).removeClass("notrans"),!1):!this.isAnimating&&void(this.scrollVal<=0&&this.isRevealed?this.toggle(0):this.scrollVal>0&&!this.isRevealed&&this.toggle(1))},toggle:function(reveal){this.isAnimating=!0,reveal?($(this.element).addClass("mk-intro-triggered"),$(this.element).hasClass("intro-effect-fade")&&$(this.element).animate({top:"-100%"},3e3),$("."+this.effectClassName).next().next().addClass("mk-intro-triggered page-effect-"+this.options.effect),$("body").addClass("mk-intro-triggered").trigger("page_intro")):(this.noscroll=!0,this.disable_scroll(),$(this.element).hasClass("intro-effect-fade")&&$(this.element).removeClass("mk-intro-triggered").css("top","0"),$("."+this.effectClassName).next().next().removeClass("mk-intro-triggered page-effect-"+this.options.effect),$("body").removeClass("mk-intro-triggered").trigger("page_outro"));var that=this;setTimeout(function(){that.isRevealed=!that.isRevealed,that.isAnimating=!1,reveal&&(that.noscroll=!1,that.enable_scroll())},1200)}},$.fn[pluginName]=function(options){return this.each(function(){$.data(this,"plugin_"+pluginName)||$.data(this,"plugin_"+pluginName,new Plugin(this,options))})}}(jQuery,window,document);