/*! * jQuery MsgBox - for jQuery 1.3+ * http://codecanyon.net/item/jquery-msgbox/92626?ref=aeroalquimia * * Copyright 2010, Eduardo Daniel Sada * You need to buy a license if you want use this script. * http://codecanyon.net/wiki/buying/howto-buying/licensing/ * * Version: 1.3.2 (Jun 21 2011) * * Includes jQuery Easing v1.1.2 * http://gsgd.co.uk/sandbox/jquery.easIng.php * Copyright (c) 2007 George Smith * Released under the MIT License. */ (function($) { var ie6 = (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7 && parseInt(jQuery.browser.version, 10) > 4); if ($.proxy === undefined) { $.extend({ proxy: function( fn, thisObject ) { if ( fn ) { proxy = function() { return fn.apply( thisObject || this, arguments ); }; }; return proxy; } }); }; $.extend( jQuery.easing, { easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; } }); $.extend($.expr[':'], { value: function(a) { return $(a).val(); } }); $.extend({ MsgBoxObject: { defaults : { name : 'jquery-msgbox', zIndex : 10000, width : 700, height : 467, background : '#FFFFFF', modal : true, overlay : { 'background-color' : '#000000', 'opacity' : 0.5 }, showDuration : 200, closeDuration : 100, moveDuration : 500, shake : { 'distance' : 10, 'duration' : 100, 'transition' : 'easeOutBack', 'loops' : 2 }, form : { 'active' : false, 'action' : '#', 'method' : 'post' }, emergefrom : 'top' }, options : {}, esqueleto : { msgbox : [], wrapper : [], form : [], buttons : [], inputs : [] }, visible : false, i : 0, animation : false, config : function(options) { this.options = $.extend(true, this.options, options); this.overlay.element.css(this.options.overlay); this.overlay.options.hideOnClick = !this.options.modal; this.esqueleto.msgbox.css({'width':this.options.width, 'height':this.options.height, 'background-color': this.options.background}); this.moveBox(); }, overlay : { create: function(options) { this.options = options; this.element = $('
'); this.element.css($.extend({}, { 'position' : 'fixed', 'top' : 0, 'left' : 0, 'opacity' : 0, 'display' : 'none', 'z-index' : this.options.zIndex }, this.options.style)); this.element.click( $.proxy(function(event) { if (this.options.hideOnClick) { if ($.isFunction(this.options.callback)) { this.options.callback(); } else { this.hide(); } } event.preventDefault(); }, this)); this.hidden = true; this.inject(); return this; }, inject: function() { this.target = $(document.body); this.target.append(this.element); if(ie6) { this.element.css({'position': 'absolute'}); var zIndex = parseInt(this.element.css('zIndex')); if (!zIndex) { zIndex = 1; var pos = this.element.css('position'); if (pos == 'static' || !pos) { this.element.css({'position': 'relative'}); } this.element.css({'zIndex': zIndex}); } zIndex = (!!(this.options.zIndex || this.options.zIndex === 0) && zIndex > this.options.zIndex) ? this.options.zIndex : zIndex - 1; if (zIndex < 0) { zIndex = 1; } this.shim = $('