var ModalEffects=function(){function n(){var n=document.querySelector(".md-overlay");[].slice.call(document.querySelectorAll(".md-trigger")).forEach(function(t){function f(n){classie.remove(i,"md-show");n&&classie.remove(document.documentElement,"md-perspective")}function r(){f(classie.has(t,"md-setperspective"))}var i=document.querySelector("#"+t.getAttribute("data-modal")),u=i.querySelector(".md-close");t.addEventListener("click",function(){classie.add(i,"md-show");n.removeEventListener("click",r);n.addEventListener("click",r);classie.has(t,"md-setperspective")&&setTimeout(function(){classie.add(document.documentElement,"md-perspective")},25)});u.addEventListener("click",function(n){n.stopPropagation();r()})})}n()}();(function(n){"use strict";function f(n){return new RegExp("(^|\\s+)"+n+"(\\s+|$)")}function e(n,u){var f=t(n,u)?r:i;f(n,u)}var t,i,r,u;"classList"in document.documentElement?(t=function(n,t){return n.classList.contains(t)},i=function(n,t){n.classList.add(t)},r=function(n,t){n.classList.remove(t)}):(t=function(n,t){return f(t).test(n.className)},i=function(n,i){t(n,i)||(n.className=n.className+" "+i)},r=function(n,t){n.className=n.className.replace(f(t)," ")});u={hasClass:t,addClass:i,removeClass:r,toggleClass:e,has:t,add:i,remove:r,toggle:e};typeof define=="function"&&define.amd?(define("classie",u),n.classie=u):n.classie=u})(window)