diff --git a/dist/jquery.remodal.css b/dist/jquery.remodal.css deleted file mode 100755 index 11a7c87..0000000 --- a/dist/jquery.remodal.css +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Remodal - v0.6.4 - * Flat, responsive, lightweight, easy customizable modal window plugin with declarative state notation and hash tracking. - * http://vodkabears.github.io/remodal/ - * - * Made by Ilya Makarov - * Under MIT License - */ -@import url(//fonts.googleapis.com/css?family=Exo+2:700,400&subset=latin,cyrillic); - -/* ========================================================================== - Remodal necessary styles - ========================================================================== */ - -/* Hide scroll bar */ - -html.remodal-is-locked { - overflow: hidden; -} - -/* Anti FOUC */ - -.remodal, -[data-remodal-id] { - visibility: hidden; -} - -/* Necessary styles of the overlay */ - -.remodal-overlay { - position: fixed; - z-index: 9999; - top: -5000px; - right: -5000px; - bottom: -5000px; - left: -5000px; - - display: none; -} - -/* Necessary styles of the wrapper */ - -.remodal-wrapper { - position: fixed; - z-index: 10000; - top: 0; - right: 0; - bottom: 0; - left: 0; - - display: none; - overflow: auto; - - text-align: center; - - -webkit-overflow-scrolling: touch; -} - -.remodal-wrapper:after { - display: inline-block; - - height: 100%; - margin-left: -0.05em; - - content: ""; -} - -/* Fix iPad, iPhone glitches */ - -.remodal-overlay, -.remodal-wrapper { - -webkit-transform: translateZ(0px); -} - -/* Necessary styles of the modal dialog */ - -.remodal { - position: relative; - - display: inline-block; -} - -/* Anti-zoom. Font-size should be >= 16px. */ - -.remodal select, -.remodal textarea, -.remodal input, -.remodal select:focus, -.remodal textarea:focus, -.remodal input:focus { - font-size: 16px; -} - -/* ========================================================================== - Remodal default theme - ========================================================================== */ - -/* Default theme font */ - -.remodal, -.remodal * { - font-family: "Exo 2", sans-serif; -} - -/* Background for effects */ - -.remodal-bg { - -webkit-transition: -webkit-filter 0.2s ease-out; - -moz-transition: -moz-filter 0.2s ease-out; - -o-transition: -o-filter 0.2s ease-out; - transition: filter 0.2s ease-out; -} - -body.remodal-is-active .remodal-bg { - -webkit-filter: blur(3px); - -ms-filter: blur(3px); - filter: blur(3px); - -moz-filter: blur(3px); - -o-filter: blur(3px); -} - -/* Default theme styles of the overlay */ - -.remodal-overlay { - -webkit-transition: opacity 0.2s ease-out; - -moz-transition: opacity 0.2s ease-out; - -o-transition: opacity 0.2s ease-out; - transition: opacity 0.2s ease-out; - - opacity: 0; - background: rgba(33, 36, 46, 0.95); -} - -body.remodal-is-active .remodal-overlay { - opacity: 1; -} - -/* Default theme styles of the modal dialog */ - -.remodal { - font-size: 16px; - - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - width: 100%; - min-height: 100%; - padding: 35px; - - -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-out; - -moz-transition: -moz-transform 0.2s ease-out, opacity 0.2s ease-out; - -o-transition: -o-transform 0.2s ease-out, opacity 0.2s ease-out; - transition: transform 0.2s ease-out, opacity 0.2s ease-out; - -webkit-transform: scale(0.95); - -moz-transform: scale(0.95); - -ms-transform: scale(0.95); - -o-transform: scale(0.95); - transform: scale(0.95); - - opacity: 0; - color: #182a3c; - background: #f4f4f4; - background-clip: padding-box; -} - -body.remodal-is-active .remodal { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); - - opacity: 1; -} - -/* Vertical align of the modal dialog */ - -.remodal, -.remodal-wrapper:after { - vertical-align: middle; -} - -/* Close button */ - -.remodal-close { - position: absolute; - top: 5px; - left: 5px; - - width: 28px; - height: 28px; - - -webkit-transition: background 0.2s ease-out; - -moz-transition: background 0.2s ease-out; - -o-transition: background 0.2s ease-out; - transition: background 0.2s ease-out; - text-decoration: none; - - -webkit-border-radius: 50%; - border-radius: 50%; -} - -.remodal-close:after { - font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important; - font-size: 28px; - line-height: 28px; - - display: block; - - content: "×"; - cursor: pointer; - -webkit-transition: all 0.2s ease-out; - -moz-transition: all 0.2s ease-out; - -o-transition: all 0.2s ease-out; - transition: all 0.2s ease-out; - text-decoration: none; - - color: #3e5368; -} - -.remodal-close:hover, -.remodal-close:active { - background: #3e5368; -} - -.remodal-close:hover.remodal-close:after, -.remodal-close:active.remodal-close:after { - color: #f4f4f4; -} - -/* Dialog buttons */ - -.remodal-confirm, -.remodal-cancel { - font-size: 10pt; - - display: inline-block; - - width: 120px; - margin: 0 0 5px 0; - padding: 9px 0; - - cursor: pointer; - -webkit-transition: all 0.2s ease-out; - -moz-transition: all 0.2s ease-out; - -o-transition: all 0.2s ease-out; - transition: all 0.2s ease-out; - text-align: center; - text-decoration: none; - - -webkit-border-radius: 6px; - border-radius: 6px; - background-clip: padding-box; -} - -.remodal-confirm { - color: #16a085; - border: 2px solid #16a085; - background: #f4f4f4; -} - -.remodal-confirm:hover, -.remodal-confirm:active { - color: #f4f4f4; - background: #16a085; -} - -.remodal-cancel { - color: #c0392b; - border: 2px solid #c0392b; - background: #f4f4f4; -} - -.remodal-cancel:hover, -.remodal-cancel:active { - color: #f4f4f4; - background: #c0392b; -} - -/* Media queries - ========================================================================== */ - -@media only screen and (min-width: 641px) { - .remodal { - max-width: 700px; - min-height: 0; - margin: 20px auto; - - -webkit-border-radius: 6px; - border-radius: 6px; - } -} - -/* IE8 - ========================================================================== */ - -.lt-ie9 .remodal-overlay { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F021242E, endColorstr=#F021242E); -} - -.lt-ie9 .remodal { - width: 700px; - min-height: 0; - margin: 20px auto; -} - -.lt-ie9 .remodal-close:after { - margin: auto; - - text-align: center; -} - -.lt-ie9 .remodal-close:hover, -.lt-ie9 .remodal-close:active { - background: transparent; -} - -.lt-ie9 .remodal-close:hover.remodal-close:after, -.lt-ie9 .remodal-close:active.remodal-close:after { - color: #3e5368; -} diff --git a/dist/jquery.remodal.js b/dist/jquery.remodal.js deleted file mode 100755 index 28278bf..0000000 --- a/dist/jquery.remodal.js +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Remodal - v0.6.4 - * Flat, responsive, lightweight, easy customizable modal window plugin with declarative state notation and hash tracking. - * http://vodkabears.github.io/remodal/ - * - * Made by Ilya Makarov - * Under MIT License - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - define(['jquery'], function($) { - return factory(root, $); - }); - } else if (typeof exports === 'object') { - factory(root, require('jquery')); - } else { - factory(root, root.jQuery || root.Zepto); - } -})(this, function(global, $) { - - 'use strict'; - - /** - * Name of the plugin - * @private - * @type {String} - */ - var pluginName = 'remodal'; - - /** - * Namespace for CSS and events - * @private - * @type {String} - */ - var namespace = global.remodalGlobals && global.remodalGlobals.namespace || pluginName; - - /** - * Default settings - * @private - * @type {Object} - */ - var defaults = $.extend({ - hashTracking: true, - closeOnConfirm: true, - closeOnCancel: true, - closeOnEscape: true, - closeOnAnyClick: true - }, global.remodalGlobals && global.remodalGlobals.defaults); - - /** - * Current modal - * @private - * @type {Remodal} - */ - var current; - - /** - * Scrollbar position - * @private - * @type {Number} - */ - var scrollTop; - - /** - * Get a transition duration in ms - * @private - * @param {jQuery} $elem - * @return {Number} - */ - function getTransitionDuration($elem) { - var duration = $elem.css('transition-duration') || - $elem.css('-webkit-transition-duration') || - $elem.css('-moz-transition-duration') || - $elem.css('-o-transition-duration') || - $elem.css('-ms-transition-duration') || - '0s'; - - var delay = $elem.css('transition-delay') || - $elem.css('-webkit-transition-delay') || - $elem.css('-moz-transition-delay') || - $elem.css('-o-transition-delay') || - $elem.css('-ms-transition-delay') || - '0s'; - - var max; - var len; - var num; - var i; - - duration = duration.split(', '); - delay = delay.split(', '); - - // The duration length is the same as the delay length - for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) { - num = parseFloat(duration[i]) + parseFloat(delay[i]); - - if (num > max) { - max = num; - } - } - - return num * 1000; - } - - /** - * Get a scrollbar width - * @private - * @return {Number} - */ - function getScrollbarWidth() { - if ($(document.body).height() <= $(window).height()) { - return 0; - } - - var outer = document.createElement('div'); - var inner = document.createElement('div'); - var widthNoScroll; - var widthWithScroll; - - outer.style.visibility = 'hidden'; - outer.style.width = '100px'; - document.body.appendChild(outer); - - widthNoScroll = outer.offsetWidth; - - // Force scrollbars - outer.style.overflow = 'scroll'; - - // Add inner div - inner.style.width = '100%'; - outer.appendChild(inner); - - widthWithScroll = inner.offsetWidth; - - // Remove divs - outer.parentNode.removeChild(outer); - - return widthNoScroll - widthWithScroll; - } - - /** - * Lock the screen - * @private - */ - function lockScreen() { - var $html = $('html'); - var lockedClass = namespace + '-is-locked'; - var paddingRight; - var $body; - - if (!$html.hasClass(lockedClass)) { - $body = $(document.body); - - // Zepto does not support '-=', '+=' in the `css` method - paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth(); - - $body.css('padding-right', paddingRight + 'px'); - $html.addClass(lockedClass); - } - } - - /** - * Unlock the screen - * @private - */ - function unlockScreen() { - var $html = $('html'); - var lockedClass = namespace + '-is-locked'; - var paddingRight; - var $body; - - if ($html.hasClass(lockedClass)) { - $body = $(document.body); - - // Zepto does not support '-=', '+=' in the `css` method - paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth(); - - $body.css('padding-right', paddingRight + 'px'); - $html.removeClass(lockedClass); - } - } - - /** - * Parse a string with options - * @private - * @param str - * @returns {Object} - */ - function parseOptions(str) { - var obj = {}; - var arr; - var len; - var val; - var i; - - // Remove spaces before and after delimiters - str = str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ','); - - // Parse a string - arr = str.split(','); - for (i = 0, len = arr.length; i < len; i++) { - arr[i] = arr[i].split(':'); - val = arr[i][1]; - - // Convert a string value if it is like a boolean - if (typeof val === 'string' || val instanceof String) { - val = val === 'true' || (val === 'false' ? false : val); - } - - // Convert a string value if it is like a number - if (typeof val === 'string' || val instanceof String) { - val = !isNaN(val) ? +val : val; - } - - obj[arr[i][0]] = val; - } - - return obj; - } - - /** - * Remodal constructor - * @param {jQuery} $modal - * @param {Object} options - * @constructor - */ - function Remodal($modal, options) { - var remodal = this; - var tdOverlay; - var tdModal; - var tdBg; - - remodal.settings = $.extend({}, defaults, options); - - // Build DOM - remodal.$body = $(document.body); - remodal.$overlay = $('.' + namespace + '-overlay'); - - if (!remodal.$overlay.length) { - remodal.$overlay = $('
').addClass(namespace + '-overlay'); - remodal.$body.append(remodal.$overlay); - } - - remodal.$bg = $('.' + namespace + '-bg'); - remodal.$closeButton = $('').addClass(namespace + '-close'); - remodal.$wrapper = $('
').addClass(namespace + '-wrapper'); - remodal.$modal = $modal; - remodal.$modal.addClass(namespace); - remodal.$modal.css('visibility', 'visible'); - - remodal.$modal.append(remodal.$closeButton); - remodal.$wrapper.append(remodal.$modal); - remodal.$body.append(remodal.$wrapper); - remodal.$confirmButton = remodal.$modal.find('.' + namespace + '-confirm'); - remodal.$cancelButton = remodal.$modal.find('.' + namespace + '-cancel'); - - // Calculate timeouts - tdOverlay = getTransitionDuration(remodal.$overlay); - tdModal = getTransitionDuration(remodal.$modal); - tdBg = getTransitionDuration(remodal.$bg); - remodal.td = Math.max(tdOverlay, tdModal, tdBg); - - // Add the close button event listener - remodal.$wrapper.on('click.' + namespace, '.' + namespace + '-close', function(e) { - e.preventDefault(); - - remodal.close(); - }); - - // Add the cancel button event listener - remodal.$wrapper.on('click.' + namespace, '.' + namespace + '-cancel', function(e) { - e.preventDefault(); - - remodal.$modal.trigger('cancel'); - - if (remodal.settings.closeOnCancel) { - remodal.close('cancellation'); - } - }); - - // Add the confirm button event listener - remodal.$wrapper.on('click.' + namespace, '.' + namespace + '-confirm', function(e) { - e.preventDefault(); - - remodal.$modal.trigger('confirm'); - - if (remodal.settings.closeOnConfirm) { - remodal.close('confirmation'); - } - }); - - // Add the keyboard event listener - $(document).on('keyup.' + namespace, function(e) { - if (e.keyCode === 27 && remodal.settings.closeOnEscape) { - remodal.close(); - } - }); - - // Add the overlay event listener - remodal.$wrapper.on('click.' + namespace, function(e) { - var $target = $(e.target); - - if (!$target.hasClass(namespace + '-wrapper')) { - return; - } - - if (remodal.settings.closeOnAnyClick) { - remodal.close(); - } - }); - - remodal.index = $[pluginName].lookup.push(remodal) - 1; - remodal.busy = false; - } - - /** - * Open a modal window - * @public - */ - Remodal.prototype.open = function() { - - // Check if the animation was completed - if (this.busy) { - return; - } - - var remodal = this; - var id; - - remodal.busy = true; - remodal.$modal.trigger('open'); - - id = remodal.$modal.attr('data-' + pluginName + '-id'); - - if (id && remodal.settings.hashTracking) { - scrollTop = $(window).scrollTop(); - location.hash = id; - } - - if (current && current !== remodal) { - current.$overlay.hide(); - current.$wrapper.hide(); - current.$body.removeClass(namespace + '-is-active'); - } - - current = remodal; - - lockScreen(); - remodal.$overlay.show(); - remodal.$wrapper.show(); - - setTimeout(function() { - remodal.$body.addClass(namespace + '-is-active'); - remodal.$wrapper.scrollTop(0); - - setTimeout(function() { - remodal.busy = false; - remodal.$modal.trigger('opened'); - }, remodal.td + 50); - }, 25); - }; - - /** - * Close a modal window - * @public - * @param {String|undefined} reason A reason to close - */ - Remodal.prototype.close = function(reason) { - - // Check if the animation was completed - if (this.busy) { - return; - } - - var remodal = this; - - remodal.busy = true; - remodal.$modal.trigger({ - type: 'close', - reason: reason - }); - - if ( - remodal.settings.hashTracking && - remodal.$modal.attr('data-' + pluginName + '-id') === location.hash.substr(1) - ) { - location.hash = ''; - $(window).scrollTop(scrollTop); - } - - remodal.$body.removeClass(namespace + '-is-active'); - - setTimeout(function() { - remodal.$overlay.hide(); - remodal.$wrapper.hide(); - unlockScreen(); - - remodal.busy = false; - remodal.$modal.trigger({ - type: 'closed', - reason: reason - }); - }, remodal.td + 50); - }; - - /** - * Special plugin object for instances. - * @public - * @type {Object} - */ - $[pluginName] = { - lookup: [] - }; - - /** - * Plugin constructor - * @param {Object} options - * @returns {JQuery} - * @constructor - */ - $.fn[pluginName] = function(opts) { - var instance; - var $elem; - - this.each(function(index, elem) { - $elem = $(elem); - - if ($elem.data(pluginName) == null) { - instance = new Remodal($elem, opts); - $elem.data(pluginName, instance.index); - - if ( - instance.settings.hashTracking && - $elem.attr('data-' + pluginName + '-id') === location.hash.substr(1) - ) { - instance.open(); - } - } else { - instance = $[pluginName].lookup[$elem.data(pluginName)]; - } - }); - - return instance; - }; - - $(document).ready(function() { - - // data-remodal-target opens a modal window with the special Id. - $(document).on('click', '[data-' + pluginName + '-target]', function(e) { - e.preventDefault(); - - var elem = e.currentTarget; - var id = elem.getAttribute('data-' + pluginName + '-target'); - var $target = $('[data-' + pluginName + '-id=' + id + ']'); - - $[pluginName].lookup[$target.data(pluginName)].open(); - }); - - // Auto initialization of modal windows. - // They should have the 'remodal' class attribute. - // Also you can write `data-remodal-options` attribute to pass params into the modal. - $(document).find('.' + namespace).each(function(i, container) { - var $container = $(container); - var options = $container.data(pluginName + '-options'); - - if (!options) { - options = {}; - } else if (typeof options === 'string' || options instanceof String) { - options = parseOptions(options); - } - - $container[pluginName](options); - }); - }); - - /** - * Hashchange handler - * @private - * @param {Event} e - * @param {Boolean} [closeOnEmptyHash=true] - */ - function hashHandler(e, closeOnEmptyHash) { - var id = location.hash.replace('#', ''); - var instance; - var $elem; - - if (typeof closeOnEmptyHash === 'undefined') { - closeOnEmptyHash = true; - } - - if (!id) { - if (closeOnEmptyHash) { - - // Check if we have currently opened modal and animation was completed - if (current && !current.busy && current.settings.hashTracking) { - current.close(); - } - } - } else { - - // Catch syntax error if your hash is bad - try { - $elem = $( - '[data-' + pluginName + '-id=' + - id.replace(new RegExp('/', 'g'), '\\/') + ']' - ); - } catch (err) {} - - if ($elem && $elem.length) { - instance = $[pluginName].lookup[$elem.data(pluginName)]; - - if (instance && instance.settings.hashTracking) { - instance.open(); - } - } - - } - } - - $(window).bind('hashchange.' + namespace, hashHandler); - -}); diff --git a/dist/jquery.remodal.min.js b/dist/jquery.remodal.min.js deleted file mode 100755 index cd03c70..0000000 --- a/dist/jquery.remodal.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Remodal - v0.6.4 - * Flat, responsive, lightweight, easy customizable modal window plugin with declarative state notation and hash tracking. - * http://vodkabears.github.io/remodal/ - * - * Made by Ilya Makarov - * Under MIT License - */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){var b,c,d,e,f=a.css("transition-duration")||a.css("-webkit-transition-duration")||a.css("-moz-transition-duration")||a.css("-o-transition-duration")||a.css("-ms-transition-duration")||"0s",g=a.css("transition-delay")||a.css("-webkit-transition-delay")||a.css("-moz-transition-delay")||a.css("-o-transition-delay")||a.css("-ms-transition-delay")||"0s";for(f=f.split(", "),g=g.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;c>e;e++)d=parseFloat(f[e])+parseFloat(g[e]),d>b&&(b=d);return 1e3*d}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){var a,c,e=b("html"),f=m+"-is-locked";e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}function f(){var a,c,e=b("html"),f=m+"-is-locked";e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}function g(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;c>e;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||("false"===d?!1:d)),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function h(a,d){var e,f,g,h=this;h.settings=b.extend({},n,d),h.$body=b(document.body),h.$overlay=b("."+m+"-overlay"),h.$overlay.length||(h.$overlay=b("
").addClass(m+"-overlay"),h.$body.append(h.$overlay)),h.$bg=b("."+m+"-bg"),h.$closeButton=b('').addClass(m+"-close"),h.$wrapper=b("
").addClass(m+"-wrapper"),h.$modal=a,h.$modal.addClass(m),h.$modal.css("visibility","visible"),h.$modal.append(h.$closeButton),h.$wrapper.append(h.$modal),h.$body.append(h.$wrapper),h.$confirmButton=h.$modal.find("."+m+"-confirm"),h.$cancelButton=h.$modal.find("."+m+"-cancel"),e=c(h.$overlay),f=c(h.$modal),g=c(h.$bg),h.td=Math.max(e,f,g),h.$wrapper.on("click."+m,"."+m+"-close",function(a){a.preventDefault(),h.close()}),h.$wrapper.on("click."+m,"."+m+"-cancel",function(a){a.preventDefault(),h.$modal.trigger("cancel"),h.settings.closeOnCancel&&h.close("cancellation")}),h.$wrapper.on("click."+m,"."+m+"-confirm",function(a){a.preventDefault(),h.$modal.trigger("confirm"),h.settings.closeOnConfirm&&h.close("confirmation")}),b(document).on("keyup."+m,function(a){27===a.keyCode&&h.settings.closeOnEscape&&h.close()}),h.$wrapper.on("click."+m,function(a){var c=b(a.target);c.hasClass(m+"-wrapper")&&h.settings.closeOnAnyClick&&h.close()}),h.index=b[l].lookup.push(h)-1,h.busy=!1}function i(a,c){var d,e,f=location.hash.replace("#","");if("undefined"==typeof c&&(c=!0),f){try{e=b("[data-"+l+"-id="+f.replace(new RegExp("/","g"),"\\/")+"]")}catch(g){}e&&e.length&&(d=b[l].lookup[e.data(l)],d&&d.settings.hashTracking&&d.open())}else c&&j&&!j.busy&&j.settings.hashTracking&&j.close()}var j,k,l="remodal",m=a.remodalGlobals&&a.remodalGlobals.namespace||l,n=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnAnyClick:!0},a.remodalGlobals&&a.remodalGlobals.defaults);h.prototype.open=function(){if(!this.busy){var a,c=this;c.busy=!0,c.$modal.trigger("open"),a=c.$modal.attr("data-"+l+"-id"),a&&c.settings.hashTracking&&(k=b(window).scrollTop(),location.hash=a),j&&j!==c&&(j.$overlay.hide(),j.$wrapper.hide(),j.$body.removeClass(m+"-is-active")),j=c,e(),c.$overlay.show(),c.$wrapper.show(),setTimeout(function(){c.$body.addClass(m+"-is-active"),c.$wrapper.scrollTop(0),setTimeout(function(){c.busy=!1,c.$modal.trigger("opened")},c.td+50)},25)}},h.prototype.close=function(a){if(!this.busy){var c=this;c.busy=!0,c.$modal.trigger({type:"close",reason:a}),c.settings.hashTracking&&c.$modal.attr("data-"+l+"-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(k)),c.$body.removeClass(m+"-is-active"),setTimeout(function(){c.$overlay.hide(),c.$wrapper.hide(),f(),c.busy=!1,c.$modal.trigger({type:"closed",reason:a})},c.td+50)}},b[l]={lookup:[]},b.fn[l]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(l)?(c=new h(d,a),d.data(l,c.index),c.settings.hashTracking&&d.attr("data-"+l+"-id")===location.hash.substr(1)&&c.open()):c=b[l].lookup[d.data(l)]}),c},b(document).ready(function(){b(document).on("click","[data-"+l+"-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-"+l+"-target"),e=b("[data-"+l+"-id="+d+"]");b[l].lookup[e.data(l)].open()}),b(document).find("."+m).each(function(a,c){var d=b(c),e=d.data(l+"-options");e?("string"==typeof e||e instanceof String)&&(e=g(e)):e={},d[l](e)})}),b(window).bind("hashchange."+m,i)}); \ No newline at end of file