"use strict";!function(t){function e(){o(),a(),i(),n(),r()}function r(e){var r=t("[data-yeti-box]"),a=["dropdown","tooltip","reveal"];if(e&&("string"==typeof e?a.push(e):"object"==typeof e&&"string"==typeof e[0]?a.concat(e):console.error("Plugin names must be strings")),r.length){var i=a.map(function(t){return"closeme.zf."+t}).join(" ");t(window).off(i).on(i,function(e,r){var a=e.namespace.split(".")[0],i=t("[data-"+a+"]").not('[data-yeti-box="'+r+'"]');i.each(function(){var e=t(this);e.triggerHandler("close.zf.trigger",[e])})})}}function a(e){var r=void 0,a=t("[data-resize]");a.length&&t(window).off("resize.zf.trigger").on("resize.zf.trigger",function(i){r&&clearTimeout(r),r=setTimeout(function(){g||a.each(function(){t(this).triggerHandler("resizeme.zf.trigger")}),a.attr("data-events","resize")},e||10)})}function i(e){var r=void 0,a=t("[data-scroll]");a.length&&t(window).off("scroll.zf.trigger").on("scroll.zf.trigger",function(i){r&&clearTimeout(r),r=setTimeout(function(){g||a.each(function(){t(this).triggerHandler("scrollme.zf.trigger")}),a.attr("data-events","scroll")},e||10)})}function n(e){var r=t("[data-mutate]");r.length&&g&&r.each(function(){t(this).triggerHandler("mutateme.zf.trigger")})}function o(){if(!g)return!1;var e=document.querySelectorAll("[data-resize], [data-scroll], [data-mutate]"),r=function(e){var r=t(e[0].target);switch(e[0].type){case"attributes":"scroll"===r.attr("data-events")&&"data-events"===e[0].attributeName&&r.triggerHandler("scrollme.zf.trigger",[r,window.pageYOffset]),"resize"===r.attr("data-events")&&"data-events"===e[0].attributeName&&r.triggerHandler("resizeme.zf.trigger",[r]),"style"===e[0].attributeName&&(r.closest("[data-mutate]").attr("data-events","mutate"),r.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[r.closest("[data-mutate]")]));break;case"childList":r.closest("[data-mutate]").attr("data-events","mutate"),r.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[r.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var a=0;a<=e.length-1;a++){var i=new g(r);i.observe(e[a],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}}var g=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}(),s=function(e,r){e.data(r).split(" ").forEach(function(a){t("#"+a)["close"===r?"trigger":"triggerHandler"](r+".zf.trigger",[e])})};t(document).on("click.zf.trigger","[data-open]",function(){s(t(this),"open")}),t(document).on("click.zf.trigger","[data-close]",function(){var e=t(this).data("close");e?s(t(this),"close"):t(this).trigger("close.zf.trigger")}),t(document).on("click.zf.trigger","[data-toggle]",function(){var e=t(this).data("toggle");e?s(t(this),"toggle"):t(this).trigger("toggle.zf.trigger")}),t(document).on("close.zf.trigger","[data-closable]",function(e){e.stopPropagation();var r=t(this).data("closable");""!==r?Foundation.Motion.animateOut(t(this),r,function(){t(this).trigger("closed.zf")}):t(this).fadeOut().trigger("closed.zf")}),t(document).on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",function(){var e=t(this).data("toggle-focus");t("#"+e).triggerHandler("toggle.zf.trigger",[t(this)])}),t(window).on("load",function(){e()}),Foundation.IHearYou=e}(jQuery);
|