/* * Interspire Modal 1.0 * (c) 2008 Interspire Pty. Ltd. * * Based on SimpleModal 1.1.1 - jQuery Plugin * http://www.ericmmartin.com/projects/simplemodal/ * http://plugins.jquery.com/project/SimpleModal * http://code.google.com/p/simplemodal/ * * Copyright (c) 2007 Eric Martin - http://ericmmartin.com * * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * Revision: $Id$ * */ (function ($) { $.iModal = function(options) { return $.iModal.modal.init(options); }; $.modal = function() { }; $.modal.close = function () { return $.iModal.modal.close(true); }; $.iModal.close = function () { return $.iModal.modal.close(true); }; $.fn.iModal = function (options) { options = $.extend({}, { type: 'inline', inline: $(this).html() }, options); return $.iModal.modal.init(options); }; $.iModal.defaults = { overlay: 50, overlayCss: {}, containerCss: {}, close: true, closeTitle: 'Close', onOpen: null, onShow: null, onClose: null, onBeforeClose: null, type: 'string', width: '630' }; $.iModal.modal = { options: null, init: function(options) { // Can't have more than one modal window open at a time if($('#ModalContentContainer').length > 0) { return this; } this.options = $.extend({}, $.iModal.defaults, options); if(this.options.type == 'inline') { this.options.data = $(this.options.inline).html(); $(this.options.inline).html(''); } this.generateModal(); return this; }, displayModal: function(data) { this.hideLoader(); modalContent = ''; if(!$.browser.msie || $.browser.version >= 7) { modalContent = '
'; } modalContent += '