|
|
/*! UIkit 2.3.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(t,e,i){"use strict";var n=t.UIkit||{},o=t("html"),s=t(window);n.fn||(n.version="2.3.1",n.fn=function(e,i){var o=arguments,s=e.match(/^([a-z\-]+)(?:\.([a-z]+))?/i),a=s[1],r=s[2];return n[a]?this.each(function(){var e=t(this),s=e.data(a);s||e.data(a,s=new n[a](this,r?void 0:i)),r&&s[r].apply(s,Array.prototype.slice.call(o,1))}):(t.error("UIkit component ["+a+"] does not exist."),this)},n.support={},n.support.transition=function(){var t=function(){var t,i=e.body||e.documentElement,n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in n)if(void 0!==i.style[t])return n[t]}();return t&&{end:t}}(),n.support.requestAnimationFrame=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||i.oRequestAnimationFrame||function(t){i.setTimeout(t,1e3/60)},n.support.touch="ontouchstart"in window&&navigator.userAgent.toLowerCase().match(/mobile|tablet/)||i.DocumentTouch&&document instanceof i.DocumentTouch||i.navigator.msPointerEnabled&&i.navigator.msMaxTouchPoints>0||i.navigator.pointerEnabled&&i.navigator.maxTouchPoints>0||!1,n.support.mutationobserver=i.MutationObserver||i.WebKitMutationObserver||i.MozMutationObserver||null,n.Utils={},n.Utils.debounce=function(t,e,i){var n;return function(){var o=this,s=arguments,a=function(){n=null,i||t.apply(o,s)},r=i&&!n;clearTimeout(n),n=setTimeout(a,e),r&&t.apply(o,s)}},n.Utils.removeCssRules=function(t){var e,i,n,o,s,a,r,l,u,c;t&&setTimeout(function(){try{for(c=document.styleSheets,o=0,r=c.length;r>o;o++){for(n=c[o],i=[],n.cssRules=n.cssRules,e=s=0,l=n.cssRules.length;l>s;e=++s)n.cssRules[e].type===CSSRule.STYLE_RULE&&t.test(n.cssRules[e].selectorText)&&i.unshift(e);for(a=0,u=i.length;u>a;a++)n.deleteRule(i[a])}}catch(d){}},0)},n.Utils.isInView=function(e,i){var n=t(e);if(!n.is(":visible"))return!1;var o=s.scrollLeft(),a=s.scrollTop(),r=n.offset(),l=r.left,u=r.top;return i=t.extend({topoffset:0,leftoffset:0},i),u+n.height()>=a&&u-i.topoffset<=a+s.height()&&l+n.width()>=o&&l-i.leftoffset<=o+s.width()?!0:!1},n.Utils.options=function(e){if(t.isPlainObject(e))return e;var i=e?e.indexOf("{"):-1,n={};if(-1!=i)try{n=Function("","var json = "+e.substr(i)+"; return JSON.parse(JSON.stringify(json));")()}catch(o){}return n},n.Utils.events={},n.Utils.events.click=n.support.touch?"tap":"click",t.UIkit=n,t.fn.uk=n.fn,t.UIkit.langdirection="rtl"==o.attr("dir")?"right":"left",t(function(){if(t(e).trigger("uk-domready"),n.support.mutationobserver){var i=new n.support.mutationobserver(n.Utils.debounce(function(){t(e).trigger("uk-domready")},300));i.observe(document.body,{childList:!0,subtree:!0}),n.support.touch}}),o.addClass(n.support.touch?"uk-touch":"uk-notouch"))})(jQuery,document,window),function(t,e){"use strict";var i=t(window),n="resize orientationchange",o=function(s,a){var r=this,l=t(s);l.data("stackMargin")||(this.element=l,this.columns=this.element.children(),this.options=t.extend({},o.defaults,a),this.columns.length&&(i.on(n,function(){var n=function(){r.process()};return t(function(){n(),i.on("load",n)}),e.Utils.debounce(n,150)}()),t(document).on("uk-domready",function(){r.columns=r.element.children(),r.process()}),this.element.data("stackMargin",this)))};t.extend(o.prototype,{process:function(){var e=this;this.revert();var i=!1,n=this.columns.filter(":visible:first"),o=n.length?n.offset().top:!1;if(o!==!1)return this.columns.each(function(){var n=t(this);n.is(":visible")&&(i?n.addClass(e.options.cls):n.offset().top!=o&&(n.addClass(e.options.cls),i=!0))}),this},revert:function(){return this.columns.removeClass(this.options.cls),this}}),o.defaults={cls:"uk-margin-small-top"},e.stackMargin=o,t(document).on("uk-domready",function(){t("[data-uk-margin]").each(function(){var i,n=t(this);n.data("stackMargin")||(i=new o(n,e.Utils.options(n.attr("data-uk-margin"))))})})}(jQuery,jQuery.UIkit),function(t){function e(t,e,i,n){return Math.abs(t-e)>=Math.abs(i-n)?t-e>0?"Left":"Right":i-n>0?"Up":"Down"}function i(){u=null,d.last&&(d.el.trigger("longTap") };d(),this.element.data("scrollspy",this),this.check=d,n.push(this)}};s.defaults={cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},e.scrollspy=s;var a=[],r=function(){for(var t=0;a.length>t;t++)e.support.requestAnimationFrame.apply(window,[a[t].check])},l=function(n,o){var s=t(n);if(!s.data("scrollspynav")){this.element=s,this.options=t.extend({},l.defaults,o);var r,u=[],c=this.element.find("a[href^='#']").each(function(){u.push(t(this).attr("href"))}),d=t(u.join(",")),h=this,f=function(){r=[];for(var t=0;d.length>t;t++)e.Utils.isInView(d.eq(t),h.options)&&r.push(d.eq(t));if(r.length){var n=i.scrollTop(),o=function(){for(var t=0;r.length>t;t++)if(r[t].offset().top>=n)return r[t]}();if(!o)return;h.options.closest?c.closest(h.options.closest).removeClass(h.options.cls).end().filter("a[href='#"+o.attr("id")+"']").closest(h.options.closest).addClass(h.options.cls):c.removeClass(h.options.cls).filter("a[href='#"+o.attr("id")+"']").addClass(h.options.cls)}};this.options.smoothscroll&&e.smoothScroll&&c.each(function(){new e.smoothScroll(this,h.options.smoothscroll)}),f(),this.element.data("scrollspynav",this),this.check=f,a.push(this)}};l.defaults={cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},e.scrollspynav=l;var u=function(){o(),r()};i.on("scroll",u).on("resize orientationchange",e.Utils.debounce(u,50)),t(document).on("uk-domready",function(){t("[data-uk-scrollspy]").each(function(){var i=t(this);i.data("scrollspy")||new s(i,e.Utils.options(i.attr("data-uk-scrollspy")))}),t("[data-uk-scrollspy-nav]").each(function(){var i=t(this);i.data("scrollspynav")||new l(i,e.Utils.options(i.attr("data-uk-scrollspy-nav")))})})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=function(e,n){var o=this,s=t(e);s.data("smoothScroll")||(this.options=t.extend({},i.defaults,n),this.element=s.on("click",function(){var e=t(this.hash).length?t(this.hash):t("body"),i=e.offset().top-o.options.offset,n=t(document).height(),s=t(window).height();return e.outerHeight(),i+s>n&&(i=n-s),t("html,body").stop().animate({scrollTop:i},o.options.duration,o.options.transition),!1}),this.element.data("smoothScroll",this))};i.defaults={duration:1e3,transition:"easeOutExpo",offset:0},e.smoothScroll=i,t.easing.easeOutExpo||(t.easing.easeOutExpo=function(t,e,i,n,o){return e==o?i+n:n*(-Math.pow(2,-10*e/o)+1)+i}),t(document).on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var n=t(this);n.data("smoothScroll")||(new i(n,e.Utils.options(n.attr("data-uk-smooth-scroll"))),n.trigger("click"))})}(jQuery,jQuery.UIkit),function(t,e,i){var n=function(t,i){var o=this,s=e(t);s.data("toggle")||(this.options=e.extend({},n.defaults,i),this.totoggle=this.options.target?e(this.options.target):[],this.element=s.on("click",function(t){t.preventDefault(),o.toggle()}),this.element.data("toggle",this))};e.extend(n.prototype,{toggle:function(){this.totoggle.length&&this.totoggle.toggleClass(this.options.cls)}}),n.defaults={target:!1,cls:"uk-hidden"},i.toggle=n,e(document).on("click.toggle.uikit","[data-uk-toggle]",function(){var t=e(this);t.data("toggle")||(new n(t,i.Utils.options(t.attr("data-uk-toggle"))),t.trigger("click"))})}(this,jQuery,jQuery.UIkit);
|