You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
26 KiB
3 lines
26 KiB
/*! UIkit 1.1.0 | http://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
|
|
|
(function(t,i){"use strict";var e=t.UIkit||{};e.fn||(e.fn=function(i,n){var s=arguments,o=i.match(/^([a-z\-]+)(?:\.([a-z]+))?/i),a=o[1],r=o[2];return e[a]?this.each(function(){var i=t(this),o=i.data(a);o||i.data(a,o=new e[a](this,r?void 0:n)),r&&o[r].apply(o,Array.prototype.slice.call(s,1))}):(t.error("UIkit component ["+a+"] does not exist."),this)},e.support={},e.support.transition=function(){var t=function(){var t,e=i.body||i.documentElement,n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in n)if(void 0!==e.style[t])return n[t]}();return t&&{end:t}}(),e.support.touch="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,e.Utils={},e.Utils.debounce=function(t,i,e){var n;return function(){var s=this,o=arguments,a=function(){n=null,e||t.apply(s,o)},r=e&&!n;clearTimeout(n),n=setTimeout(a,i),r&&t.apply(s,o)}},e.Utils.options=function(i){if(t.isPlainObject(i))return i;var e=i.indexOf("{"),n={};if(-1!=e)try{n=Function("","var json = "+i.substr(e)+"; return JSON.parse(JSON.stringify(json));")()}catch(s){}return n},t.UIkit=e,t.fn.uk=e.fn,t.UIkit.langdirection="rtl"==t("html").attr("dir")?"right":"left")})(jQuery,document),function(t){function i(t){return"tagName"in t?t:t.parentNode}function e(t,i,e,n){var s=Math.abs(t-i),o=Math.abs(e-n);return s>=o?t-i>0?"Left":"Right":e-n>0?"Up":"Down"}function n(){u=null,h.last&&(h.el.trigger("longTap"),h={})}function s(){u&&clearTimeout(u),u=null}function o(){a&&clearTimeout(a),r&&clearTimeout(r),l&&clearTimeout(l),u&&clearTimeout(u),a=r=l=u=null,h={}}var a,r,l,u,h={},c=750;t(document).ready(function(){var d,p;t(document.body).bind("touchstart",function(e){d=Date.now(),p=d-(h.last||d),h.el=t(i(e.originalEvent.touches[0].target)),a&&clearTimeout(a),h.x1=e.originalEvent.touches[0].pageX,h.y1=e.originalEvent.touches[0].pageY,p>0&&250>=p&&(h.isDoubleTap=!0),h.last=d,u=setTimeout(n,c)}).bind("touchmove",function(t){s(),h.x2=t.originalEvent.touches[0].pageX,h.y2=t.originalEvent.touches[0].pageY}).bind("touchend",function(){s(),h.x2&&Math.abs(h.x1-h.x2)>30||h.y2&&Math.abs(h.y1-h.y2)>30?l=setTimeout(function(){h.el.trigger("swipe"),h.el.trigger("swipe"+e(h.x1,h.x2,h.y1,h.y2)),h={}},0):"last"in h&&(r=setTimeout(function(){var i=t.Event("tap");i.cancelTouch=o,h.el.trigger(i),h.isDoubleTap?(h.el.trigger("doubleTap"),h={}):a=setTimeout(function(){a=null,h.el.trigger("singleTap"),h={}},250)},0))}).bind("touchcancel",o),t(window).bind("scroll",o)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(i){t.fn[i]=function(t){return this.bind(i,t)}})}(jQuery),function(t,i){"use strict";var e=function(i,e){var n=this;this.options=t.extend({},this.options,e),this.element=t(i).on("click",this.options.trigger,function(t){t.preventDefault(),n.close()})};t.extend(e.prototype,{options:{fade:!0,duration:200,trigger:".uk-alert-close"},close:function(){function t(){i.trigger("closed").remove()}var i=this.element.trigger("close");this.options.fade?i.css("overflow","hidden").css("max-height",i.height()).animate({height:0,opacity:0,"padding-top":0,"padding-bottom":0,"margin-top":0,"margin-bottom":0},this.options.duration,t):t()}}),i.alert=e,t(document).on("click.alert.uikit","[data-uk-alert]",function(n){var s=t(this);s.data("alert")||(s.data("alert",new e(s,i.Utils.options(s.data("uk-alert")))),t(n.target).is(s.data("alert").options.trigger)&&(n.preventDefault(),s.data("alert").close()))})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=function(i,e){var n=this,s=t(i);this.options=t.extend({},this.options,e),this.element=s.on("click",this.options.target,function(i){i.preventDefault(),s.find(n.options.target).not(this).removeClass("uk-active").blur(),s.trigger("change",[t(this).addClass("uk-active")])})};t.extend(e.prototype,{options:{target:".uk-button"},getSelected:function(){this.element.find(".uk-active")}});var n=function(i,e){var n=t(i);this.options=t.extend({},this.options,e),this.element=n.on("click",this.options.target,function(i){i.preventDefault(),n.trigger("change",[t(this).toggleClass("uk-active").blur()])})};t.extend(n.prototype,{options:{target:".uk-button"},getSelected:function(){this.element.find(".uk-active")}});var s=function(i){var e=this;this.element=t(i).on("click",function(t){t.preventDefault(),e.toggle(),e.element.blur()})};t.extend(s.prototype,{toggle:function(){this.element.toggleClass("uk-active")}}),i.button=s,i["button-checkbox"]=n,i["button-radio"]=e,t(document).on("click.button-radio.uikit","[data-uk-button-radio]",function(n){var s=t(this);s.data("button-radio")||(s.data("button-radio",new e(s,i.Utils.options(s.data("uk-button-radio")))),t(n.target).is(s.data("button-radio").options.target)&&t(n.target).trigger("click"))}),t(document).on("click.button-checkbox.uikit","[data-uk-button-checkbox]",function(e){var s=t(this);s.data("button-checkbox")||(s.data("button-checkbox",new n(s,i.Utils.options(s.data("uk-button-checkbox")))),t(e.target).is(s.data("button-checkbox").options.target)&&t(e.target).trigger("click"))}),t(document).on("click.button.uikit","[data-uk-button]",function(){var i=t(this);i.data("button")||i.data("button",new s(i,i.data("uk-button"))).trigger("click")})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=!1,n=function(i,n){var s=this;this.options=t.extend({},this.options,n),this.element=t(i),this.dropdown=this.element.find(".uk-dropdown"),this.centered=this.dropdown.hasClass("uk-dropdown-center"),this.justified=this.options.justify?t(this.options.justify):!1,this.boundary=t(this.options.boundary),this.boundary.length||(this.boundary=t(window)),"click"==this.options.mode?this.element.on("click",function(i){t(i.target).parents(".uk-dropdown").length||i.preventDefault(),e&&e[0]!=s.element[0]&&e.removeClass("uk-open"),s.element.hasClass("uk-open")?(t(i.target).is("a")||!s.element.find(".uk-dropdown").find(i.target).length)&&(s.element.removeClass("uk-open"),e=!1):(s.checkDimensions(),s.element.addClass("uk-open"),e=s.element,t(document).off("click.outer.dropdown"),setTimeout(function(){t(document).on("click.outer.dropdown",function(i){!e||e[0]!=s.element[0]||!t(i.target).is("a")&&s.element.find(".uk-dropdown").find(i.target).length||(e.removeClass("uk-open"),t(document).off("click.outer.dropdown"))})},10))}):this.element.on("mouseenter",function(){s.remainIdle&&clearTimeout(s.remainIdle),e&&e[0]!=s.element[0]&&e.removeClass("uk-open"),s.checkDimensions(),s.element.addClass("uk-open"),e=s.element}).on("mouseleave",function(){s.remainIdle=setTimeout(function(){s.element.removeClass("uk-open"),s.remainIdle=!1,e&&e[0]==s.element[0]&&(e=!1)},s.options.remaintime)})};t.extend(n.prototype,{remainIdle:!1,options:{mode:"hover",remaintime:800,justify:!1,boundary:t(window)},checkDimensions:function(){if(this.dropdown.length){var i=this.dropdown.css("margin-"+t.UIkit.langdirection,"").css("min-width",""),e=i.show().offset(),n=i.outerWidth(),s=this.boundary.width(),o=this.boundary.offset()?this.boundary.offset().left:0;if(this.centered&&(i.css("margin-"+t.UIkit.langdirection,-1*(parseFloat(n)/2-i.parent().width()/2)),e=i.offset(),(n+e.left>s||0>e.left)&&(i.css("margin-"+t.UIkit.langdirection,""),e=i.offset())),this.justified&&this.justified.length){var a=this.justified.outerWidth();if(i.css("min-width",a),"right"==t.UIkit.langdirection){var r=s-(this.justified.offset().left+a),l=s-(i.offset().left+i.outerWidth());i.css("margin-right",r-l)}else i.css("margin-left",this.justified.offset().left-e.left);e=i.offset()}n+(e.left-o)>s&&(i.addClass("uk-dropdown-flip"),e=i.offset()),0>e.left&&i.addClass("uk-dropdown-stack"),i.css("display","")}}}),i.dropdown=n,t(document).on("mouseenter.dropdown.uikit","[data-uk-dropdown]",function(){var e=t(this);e.data("dropdown")||(e.data("dropdown",new n(e,i.Utils.options(e.data("uk-dropdown")))),"hover"==e.data("dropdown").options.mode&&e.trigger("mouseenter"))})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=t(window),n="resize orientationchange",s=function(s,o){var a=this;this.options=t.extend({},this.options,o),this.element=t(s),this.columns=this.element.children(),this.elements=this.options.target?this.element.find(this.options.target):this.columns,this.columns.length&&e.on(n,function(){var n=function(){a.match()};return t(function(){n(),e.on("load",n)}),i.Utils.debounce(n,150)}())};t.extend(s.prototype,{options:{target:!1},match:function(){this.revert();var i=this.columns.filter(":visible:first");if(i.length){var e=Math.ceil(100*parseFloat(i.css("width"))/parseFloat(i.parent().css("width")))>=100?!0:!1,n=0,s=this;if(!e)return this.elements.each(function(){n=Math.max(n,t(this).outerHeight())}).each(function(i){var e=t(this),o="border-box"==e.css("box-sizing")?"outerHeight":"height",a=s.columns.eq(i),r=e.height()+(n-a[o]());e.css("min-height",r+"px")}),this}},revert:function(){return this.elements.css("min-height",""),this}});var o=function(s){var o=this;this.element=t(s),this.columns=this.element.children(),this.columns.length&&e.on(n,function(){var n=function(){o.process()};return t(function(){n(),e.on("load",n)}),i.Utils.debounce(n,150)}())};t.extend(o.prototype,{process:function(){this.revert();var i=!1,e=this.columns.filter(":visible:first"),n=e.length?e.offset().top:!1;if(n!==!1)return this.columns.each(function(){var e=t(this);e.is(":visible")&&(i?e.addClass("uk-grid-margin"):e.offset().top!=n&&(e.addClass("uk-grid-margin"),i=!0))}),this},revert:function(){return this.columns.removeClass("uk-grid-margin"),this}}),i["grid-match"]=s,i["grid-margin"]=o,t(function(){t("[data-uk-grid-match],[data-uk-grid-margin]").each(function(){var e=t(this);e.is("[data-uk-grid-match]")&&!e.data("grid-match")&&e.data("grid-match",new s(e,i.Utils.options(e.data("uk-grid-match")))),e.is("[data-uk-grid-margin]")&&!e.data("grid-margin")&&e.data("grid-margin",new o(e,i.Utils.options(e.data("uk-grid-margin"))))})})}(jQuery,jQuery.UIkit),function(t,i,e){"use strict";var n=!1,s=t("html"),o=function(e,s){var o=this;this.element=t(e),this.options=t.extend({keyboard:!0,show:!1,bgclose:!0},s),this.transition=i.support.transition,this.dialog=this.element.find(".uk-modal-dialog"),this.element.on("click",".uk-modal-close",function(t){t.preventDefault(),o.hide()}).on("click",function(i){var e=t(i.target);e[0]==o.element[0]&&o.options.bgclose&&o.hide()}),this.options.keyboard&&t(document).on("keyup.ui.modal.escape",function(t){n&&27==t.which&&o.isActive()&&o.hide()})};t.extend(o.prototype,{transition:!1,toggle:function(){this[this.isActive()?"hide":"show"]()},show:function(){this.isActive()||(n&&n.hide(!0),this.resize(),this.element.removeClass("uk-open").show(),n=this,s.addClass("uk-modal-page").height(),this.element.addClass("uk-open").trigger("uk.modal.show"))},hide:function(t){if(this.isActive())if(!t&&i.support.transition){var e=this;this.element.one(i.support.transition.end,function(){e._hide()}).removeClass("uk-open")}else this._hide()},resize:function(){this.dialog.css("margin-left","");var t=parseInt(this.dialog.css("width"),10),i=t+parseInt(this.dialog.css("margin-left"),10)+parseInt(this.dialog.css("margin-right"),10)<e.width();this.dialog.css("margin-left",t&&i?-1*Math.ceil(t/2):"")},_hide:function(){this.element.hide().removeClass("uk-open"),s.removeClass("uk-modal-page"),n===this&&(n=!1),this.element.trigger("uk.modal.hide")},isActive:function(){return n==this}});var a=function(i,e){var n=this,s=t(i);this.options=t.extend({target:s.is("a")?s.attr("href"):!1},e),this.element=s,this.modal=new o(this.options.target,e),s.on("click",function(t){t.preventDefault(),n.show()}),t.each(["show","hide","isActive"],function(t,i){n[i]=function(){return n.modal[i]()}})};a.Modal=o,i.modal=a,t(document).on("click.modal.uikit","[data-uk-modal]",function(){var e=t(this);e.data("modal")||(e.data("modal",new a(e,i.Utils.options(e.data("uk-modal")))),e.data("modal").show())}),e.on("resize orientationchange",i.Utils.debounce(function(){n&&n.resize()},150))}(jQuery,jQuery.UIkit,jQuery(window)),function(t,i){"use strict";i.support.touch&&t("html").addClass("uk-touch");var e,n=t(window),s=t(document),o={show:function(i){if(i=t(i),i.length){var a=t("html"),r=i.find(".uk-offcanvas-bar:first"),l=r.hasClass("uk-offcanvas-bar-flip")?-1:1,u=-1==l&&n.width()<window.innerWidth?window.innerWidth-n.width():0;e={x:window.scrollX,y:window.scrollY},i.addClass("uk-active"),a.css({width:window.innerWidth,height:window.innerHeight}).addClass("uk-offcanvas-page"),a.css("margin-left",(r.outerWidth()-u)*l).width(),r.addClass("uk-offcanvas-bar-show").width(),i.off(".ukoffcanvas").on("click.ukoffcanvas swipeRight.ukoffcanvas swipeLeft.ukoffcanvas",function(i){var e=t(i.target);if(!i.type.match(/swipe/)){if(e.hasClass("uk-offcanvas-bar"))return;if(e.parents(".uk-offcanvas-bar:first").length)return}i.stopImmediatePropagation(),o.hide()}),s.on("keydown.offcanvas",function(t){27===t.keyCode&&o.hide()})}},hide:function(i){var n=t("html"),o=t(".uk-offcanvas.uk-active"),a=o.find(".uk-offcanvas-bar:first");o.length&&(t.UIkit.support.transition&&!i?(n.one(t.UIkit.support.transition.end,function(){n.removeClass("uk-offcanvas-page").attr("style",""),o.removeClass("uk-active"),window.scrollTo(e.x,e.y)}).css("margin-left",""),setTimeout(function(){a.removeClass("uk-offcanvas-bar-show")},50)):(n.removeClass("uk-offcanvas-page").attr("style",""),o.removeClass("uk-active"),a.removeClass("uk-offcanvas-bar-show"),window.scrollTo(e.x,e.y)),o.off(".ukoffcanvas"),s.off(".ukoffcanvas"))}},a=function(i,e){var n=this,s=t(i);this.options=t.extend({target:s.is("a")?s.attr("href"):!1},e),this.element=s,s.on("click",function(t){t.preventDefault(),o.show(n.options.target)})};a.offcanvas=o,i.offcanvas=a,s.on("click.offcanvas.uikit","[data-uk-offcanvas]",function(e){e.preventDefault();var n=t(this);n.data("offcanvas")||(n.data("offcanvas",new a(n,i.Utils.options(n.data("uk-offcanvas")))),n.trigger("click"))})}(jQuery,jQuery.UIkit),function(t,i){"use strict";function e(i){var e=t(i),n="auto";if(e.is(":visible"))n=e.outerHeight();else{var s={position:e.css("position"),visibility:e.css("visibility"),display:e.css("display")};n=e.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),e.css(s)}return n}var n=function(i,e){var n=this;this.options=t.extend({},this.options,e),this.element=t(i).on("click",this.options.toggler,function(i){i.preventDefault();var e=t(this);n.open(e.parent()[0]==n.element[0]?e:e.parent("li"))}),this.element.find(this.options.lists).each(function(){var i=t(this),e=i.parent(),s=e.hasClass("uk-active");i.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'),e.data("list-container",i.parent()),s&&n.open(e,!0)})};t.extend(n.prototype,{options:{toggler:">li.uk-parent > a[href='#']",lists:">li.uk-parent > ul",multiple:!1},open:function(i,n){var s=this.element,o=t(i);this.options.multiple||s.children(".uk-open").not(i).each(function(){t(this).data("list-container")&&t(this).data("list-container").stop().animate({height:0},function(){t(this).parent().removeClass("uk-open")})}),o.toggleClass("uk-open"),o.data("list-container")&&(n?o.data("list-container").stop().height(o.hasClass("uk-open")?"auto":0):o.data("list-container").stop().animate({height:o.hasClass("uk-open")?e(o.data("list-container").find("ul:first")):0}))}}),i.nav=n,t(function(){t("[data-uk-nav]").each(function(){var e=t(this);e.data("nav")||e.data("nav",new n(e,i.Utils.options(e.data("uk-nav"))))})})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e,n=function(i,e){var n=this;this.options=t.extend({},this.options,e),this.element=t(i).on({focus:function(){n.show()},blur:function(){n.hide()},mouseenter:function(){n.show()},mouseleave:function(){n.hide()}}),this.tip="function"==typeof this.options.src?this.options.src.call(this.element):this.options.src,this.element.attr("data-cached-title",this.element.attr("title")).attr("title","")};t.extend(n.prototype,{tip:"",options:{offset:5,pos:"top",src:function(){return this.attr("title")}},show:function(){if(this.tip.length){e.css({top:-2e3,visibility:"hidden"}).show(),e.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var i=t.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),n=e[0].offsetWidth,s=e[0].offsetHeight,o="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,a="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,r={display:"none",visibility:"visible",top:i.top+i.height+s,left:i.left},l=a.split("-");switch("left"!=l[0]&&"right"!=l[0]||"right"!=t.UIkit.langdirection||(l[0]="left"==l[0]?"right":"left"),l[0]){case"bottom":t.extend(r,{top:i.top+i.height+o,left:i.left+i.width/2-n/2});break;case"top":t.extend(r,{top:i.top-s-o,left:i.left+i.width/2-n/2});break;case"left":t.extend(r,{top:i.top+i.height/2-s/2,left:i.left-n-o});break;case"right":t.extend(r,{top:i.top+i.height/2-s/2,left:i.left+i.width+o})}2==l.length&&(r.left="left"==l[1]?i.left:i.left+i.width-n),e.css(r).attr("class","uk-tooltip uk-tooltip-"+a).show()}},hide:function(){this.element.is("input")&&this.element[0]===document.activeElement||e.hide()},content:function(){return this.tip}}),i.tooltip=n,t(function(){e=t('<div class="uk-tooltip"></div>').appendTo("body")}),t(document).on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var e=t(this);e.data("tooltip")||e.data("tooltip",new n(e,i.Utils.options(e.data("uk-tooltip")))).trigger("mouseenter")})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=function(i,e){var n=this;if(this.options=t.extend({},this.options,e),this.element=t(i).on("click",this.options.toggler,function(t){t.preventDefault(),n.show(this)}),this.options.connect){this.connect=t(this.options.connect).find(".uk-active").removeClass(".uk-active").end();var s=this.element.find(this.options.toggler).filter(".uk-active");s.length&&this.show(s)}};t.extend(e.prototype,{options:{connect:!1,toggler:">*"},show:function(i){i=isNaN(i)?t(i):this.element.find(this.options.toggler).eq(i);var e=i;if(!e.hasClass("uk-disabled")){if(this.element.find(this.options.toggler).filter(".uk-active").removeClass("uk-active"),e.addClass("uk-active"),this.options.connect&&this.connect.length){var n=this.element.find(this.options.toggler).index(e);this.connect.children().removeClass("uk-active").eq(n).addClass("uk-active")}this.element.trigger("uk.switcher.show",[e])}}}),i.switcher=e,t(function(){t("[data-uk-switcher]").each(function(){var n=t(this);n.data("switcher")||n.data("switcher",new e(n,i.Utils.options(n.data("uk-switcher"))))})})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=function(i,e){var n=this;if(this.element=t(i),this.options=t.extend({connect:!1},this.options,e),this.options.connect&&(this.connect=t(this.options.connect)),window.location.hash){var s=this.element.children().filter(window.location.hash);s.length&&this.element.children().removeClass("uk-active").filter(s).addClass("uk-active")}var o=t('<li class="uk-tab-responsive uk-active"><a href="javascript:void(0);"></a></li>'),a=o.find("a:first"),r=t('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),l=r.find("ul");a.html(this.element.find("li.uk-active:first").find("a").text()),this.element.hasClass("uk-tab-bottom")&&r.addClass("uk-dropdown-up"),this.element.hasClass("uk-tab-flip")&&r.addClass("uk-dropdown-flip"),this.element.find("a").each(function(i){var e=t(this).parent(),s=t('<li><a href="javascript:void(0);">'+e.text()+"</a></li>").on("click",function(){n.element.data("switcher").show(i)});t(this).parents(".uk-disabled:first").length||l.append(s)}),this.element.uk("switcher",{toggler:">li:not(.uk-tab-responsive)",connect:this.options.connect}),o.append(r).uk("dropdown",{mode:"click"}),this.element.append(o).data({dropdown:o.data("dropdown"),mobilecaption:a}).on("uk.switcher.show",function(t,i){o.addClass("uk-active"),a.html(i.find("a").text())})};i.tab=e,t(function(){t("[data-uk-tab]").each(function(){var n=t(this);n.data("tab")||n.data("tab",new e(n,i.Utils.options(n.data("uk-tab"))))})})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=function(i,e){var n=this;this.options=t.extend({},this.options,e),this.element=t(i),this.timer=null,this.value=null,this.input=this.element.find(".uk-search-field"),this.form=this.input.length?t(this.input.get(0).form):t(),this.input.attr("autocomplete","off"),this.input.on({keydown:function(t){if(n.form[n.input.val()?"addClass":"removeClass"](n.options.filledClass),t&&t.which&&!t.shiftKey)switch(t.which){case 13:n.done(n.selected),t.preventDefault();break;case 38:n.pick("prev"),t.preventDefault();break;case 40:n.pick("next"),t.preventDefault();break;case 27:case 9:n.hide();break;default:}},keyup:function(){n.trigger()},blur:function(t){setTimeout(function(){n.hide(t)},200)}}),this.form.find("button[type=reset]").bind("click",function(){n.form.removeClass("uk-open").removeClass("uk-loading").removeClass("uk-active"),n.value=null,n.input.focus()}),this.dropdown=t('<div class="uk-dropdown uk-dropdown-search"><ul class="uk-nav uk-nav-search"></ul></div>').appendTo(this.form).find(".uk-nav-search"),this.options.flipDropdown&&this.dropdown.parent().addClass("uk-dropdown-flip")};t.extend(e.prototype,{options:{source:!1,param:"search",method:"post",minLength:3,delay:300,flipDropdown:!1,match:":not(.uk-skip)",skipClass:"uk-skip",loadingClass:"uk-loading",filledClass:"uk-active",resultsHeaderClass:"uk-nav-header",moreResultsClass:"",noResultsClass:"",listClass:"results",hoverClass:"uk-active",msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found",onSelect:function(t){window.location=t.data("choice").url},onLoadedResults:function(t){return t}},request:function(i){var e=this;this.form.addClass(this.options.loadingClass),this.options.source?t.ajax(t.extend({url:this.options.source,type:this.options.method,dataType:"json",success:function(t){t=e.options.onLoadedResults.apply(this,[t]),e.form.removeClass(e.options.loadingClass),e.suggest(t)}},i)):this.form.removeClass(e.options.loadingClass)},pick:function(t){var i=!1;if("string"==typeof t||t.hasClass(this.options.skipClass)||(i=t),"next"==t||"prev"==t){var e=this.dropdown.children().filter(this.options.match);if(this.selected){var n=e.index(this.selected);i="next"==t?e.eq(e.length>n+1?n+1:0):e.eq(0>n-1?e.length-1:n-1)}else i=e["next"==t?"first":"last"]()}i&&i.length&&(this.selected=i,this.dropdown.children().removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass))},done:function(t){return t?(t.hasClass(this.options.moreResultsClass)?this.form.submit():t.data("choice")&&this.options.onSelect.apply(this,[t]),this.hide(),void 0):(this.form.submit(),void 0)},trigger:function(){var t=this,i=this.value,e={};return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=i&&(this.timer&&window.clearTimeout(this.timer),this.timer=window.setTimeout(function(){e[t.options.param]=t.value,t.request({data:e})},this.options.delay,this)),this)},suggest:function(i){if(i){var e=this,n={mouseover:function(){e.pick(t(this).parent())},click:function(i){i.preventDefault(),e.done(t(this).parent())}};i===!1?this.hide():(this.selected=null,this.dropdown.empty(),this.options.msgResultsHeader&&t("<li>").addClass(this.options.resultsHeaderClass+" "+this.options.skipClass).html(this.options.msgResultsHeader).appendTo(this.dropdown),i.results&&i.results.length>0?(t(i.results).each(function(){var i=t('<li><a href="#">'+this.title+"</a></li>").data("choice",this);this.text&&i.find("a").append("<div>"+this.text+"</div>"),e.dropdown.append(i)}),this.options.msgMoreResults&&(t("<li>").addClass("uk-nav-divider "+e.options.skipClass).appendTo(e.dropdown),t("<li>").addClass(e.options.moreResultsClass).html('<a href="#">'+e.options.msgMoreResults+"</a>").appendTo(e.dropdown).on(n)),e.dropdown.find("li>a").on(n)):this.options.msgNoResults&&t("<li>").addClass(this.options.noResultsClass+" "+this.options.skipClass).html("<a>"+this.options.msgNoResults+"</a>").appendTo(this.dropdown),this.show())}},show:function(){this.visible||(this.visible=!0,this.form.addClass("uk-open"))},hide:function(){this.visible&&(this.visible=!1,this.form.removeClass(this.options.loadingClass).removeClass("uk-open"))}}),i.search=e,t(document).on("focus.search.uikit","[data-uk-search]",function(){var n=t(this);n.data("search")||n.data("search",new e(n,i.Utils.options(n.data("uk-search"))))})}(jQuery,jQuery.UIkit),function(t,i){"use strict";function e(t){var i=t.element,e=t.options;if(!i.is(":visible"))return!1;var s=n.scrollLeft(),o=n.scrollTop(),a=t.offset||i.offset(),r=a.left,l=a.top;return l+i.height()>=o&&l-e.topoffset<=o+n.height()&&r+i.width()>=s&&r-e.leftoffset<=s+n.width()?!0:!1}var n=t(window),s=function(s,o){this.options=t.extend({},this.options,o);var a,r,l=this,u=function(){var t=e(l);t&&!a&&(r||(l.element.addClass(l.options.initcls),l.offset=l.element.offset(),r=!0,l.element.trigger("uk-scrollspy-init")),l.element.addClass("uk-scrollspy-inview").addClass(l.options.cls).width(),a=!0,l.element.trigger("uk.scrollspy.inview")),!t&&a&&l.options.repeat&&(l.element.removeClass("uk-scrollspy-inview").removeClass(l.options.cls),a=!1,l.element.trigger("uk.scrollspy.outview"))};this.element=t(s),n.on("scroll",u).on("resize orientationchange",i.Utils.debounce(u,50)),u()};t.extend(s.prototype,{options:{cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1}}),i.scrollspy=s,t(function(){t("[data-uk-scrollspy]").each(function(){var e=t(this);e.data("scrollspy")||e.data("scrollspy",new s(e,i.Utils.options(e.data("uk-scrollspy"))))})})}(jQuery,jQuery.UIkit),function(t,i){"use strict";var e=function(i,e){var n=this;this.options=t.extend({duration:1e3,transition:"easeOutExpo"},e),this.element=t(i).on("click",function(){var i=(t(this.hash).length?t(this.hash):t("body")).offset().top,e=t(document).height(),s=t(window).height();return i+s>e&&(i=i-s+50),t("html,body").stop().animate({scrollTop:i},n.options.duration,n.options.transition),!1})};i["smooth-scroll"]=e,t.easing.easeOutExpo||(t.easing.easeOutExpo=function(t,i,e,n,s){return i==s?e+n:n*(-Math.pow(2,-10*i/s)+1)+e}),t(document).on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var n=t(this);n.data("smooth-scroll")||n.data("smooth-scroll",new e(n,i.Utils.options(n.data("uk-smooth-scroll")))).trigger("click")})}(jQuery,jQuery.UIkit);
|