function mobileCheck(){ if (navigator.userAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || navigator.userAgent.match(/LG|SAMSUNG|Samsung/) != null) { return true; } return false; } var MC = mobileCheck(); var MCWidth = 440; if(MC){ MCWidth = 340; } (function($) { var ie6 = !$.support.opacity; if ($.proxy === undefined) { $.extend({ proxy: function( fn, thisObject ) { if ( fn ) { proxy = function() { return fn.apply( thisObject || this, arguments ); }; }; return proxy; } }); }; $.extend($.easing, { easeOutBackMin: function (x, t, b, c, d, s) { if (s === undefined) s = 1; 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 : MCWidth, height : 'auto', background : '#FFFFFF', modal : true, overlay : { 'background-color' : '#000000', 'opacity' : 0.5 }, showDuration : 200, closeDuration : 100, moveDuration : 550, shake : { 'distance' : 10, 'duration' : 100, 'transition' : 'easeOutBackMin', '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 = $('