/*getJcolor:根据JBoxColor设置边框、文本框的颜色值*/ /*stype:1-边框;2-文本框*/ function getJcolor(JColor, stype) { var color, txtcolor, rcolor; switch (JColor) { case "gray": color = "rgba(0,0,0,0.5)"; txtcolor = "#cbcbcb"; break;//灰色 case "brightred": color = "#b60008"; txtcolor = "#cc0000"; break;//大红色 case "red": color = "#b23942"; txtcolor = "#da434e"; break;//洋红 case "rosered": color = "#b4005d"; txtcolor = "#e50077"; break;//玫瑰红 case "orangeyellow": color = "#c07500"; txtcolor = "#f49500"; break;//橙黄 case "rattanyellow": color = "#aa8205"; txtcolor = "#d8a507"; break;//藤黄色 case "grassgreen": color = "#719a18"; txtcolor = "#a4c72d"; break;//草绿色 case "midgreen": color = "#1a8929"; txtcolor = "#21ae35"; break;//中绿色 case "cyangreen": color = "#107b5d"; txtcolor = "#159c77"; break;//青绿色 case "jadegreen": color = "#007d75"; txtcolor = "#009f95"; break;//翠绿色 case "skyblue": color = "#007fba"; txtcolor = "#00a1ec"; break;//天蓝色 case "darkblue": color = "#00377b"; txtcolor = "#3790cf"; break;//深蓝色 case "bluegray": color = "#6f82b7"; txtcolor = "#8da5e8"; break;//蓝灰色 case "orchid": color = "#793169"; txtcolor = "#b1639f"; break;//淡紫色 case "midpurple": color = "#6a447e"; txtcolor = "#8757a0"; break;//中紫色 case "purple": color = "#543f97"; txtcolor = "#6b51c0"; break;//紫色 case "violet": color = "#4a146a"; txtcolor = "#5f1a87"; break;//紫罗兰色 case "deeppurple": color = "#730565"; txtcolor = "#920780"; break;//深紫色 case "purple1": color = "#651d97"; txtcolor = "#8025c0"; break;//紫1 case "cyan_blue": color = "#006679"; txtcolor = "#00829a"; break;//蓝青色 case "cyan": color = "#3e8a87"; txtcolor = "#4fb0ac"; break;//青色 case "cookedbrown": color = "#6a3905"; txtcolor = "#6a3905"; break;//熟棕色 case "nude": color = "#a59782"; txtcolor = "#d2c0a5"; break;//祼色 } switch (stype) { case 1: rcolor = color; break; case 2: rcolor = txtcolor; break; } return rcolor; } /*需要定义alert和popur的色调JBoxColor,可以在此处、页面文件或模板文件中定义.如:*/ /*var JBoxColor="gray";*/ /*下面定义alert代码*/ (function($) { $.alerts = { _bexistdlg: false,//是否存在对话框 _show: function (color,msg, value, type, msgtype, callback) { this.color = color == '' ? "gray" : color; var popuphtml = '
' +'
' +'
' +'
'; $('body').append(popuphtml); $.alerts._bexistdlg = true; switch( type ) { case 'alert': var salert = '' + '' + '' + '
' + msg + '
确定
'; $(".j_dialog .dlgBody").html(salert); $(".j_dialog .abtnok").click( function() { $.alerts._hide(); if (callback) callback(true); }); break; case 'confirm': var sconfirm = '' + '' + '' + '
' + msg + '
'; $(".j_dialog .dlgBody").html(sconfirm); $(".j_dialog .abtnok").click( function() { $.alerts._hide(); if ($.alerts._bexistdlg) { setTimeout(function () { if (callback) callback(true); },400) } }); $(".j_dialog .abtncancel").addClass("l").click( function() { $.alerts._hide(); if( callback ) callback(false); }); break; case 'prompt': var sprompt='' +'' + '' +'' +'' +'' + '' +'' + '' +'' +'
'+msg+'
'; $(".j_dialog .dlgBody").html(sprompt); $(".j_dialog .abtnok").click( function() { var val = $(".j_dialog .t_prompt").val(); $.alerts._hide(); if ($.alerts._bexistdlg) { setTimeout(function () { if (callback) callback(val); }, 600) } }); $(".j_dialog .abtncancel").click( function() { $.alerts._hide(); if( callback ) callback( null ); }); if( value ) $(".j_dialog .t_prompt").val(value); $(".j_dialog .t_prompt").focus().select(); break; } $(".dvDlgMask").fadeIn(200, $.easeInQuint, function () { $.alerts._reposition(); }); }, _hide: function () { var win_y = $(window).height() / 2 + $(window).scrollTop(); var win_x = $(window).width() / 2 + $(window).scrollLeft(); $('.j_dialog').animate({ "left": win_x, "top": win_y, "width": 0, "height": 0, "opacity": 0 }, 200,$.easeOutQuint, function () { $(this).remove(); $.alerts._bexistdlg = false; $('.dvDlgMask').fadeOut(200,$.easeOutQuint, function () { $(this).remove(); }); }); }, _reposition: function () { var t = ($(window).height() - $(".j_dialog").outerHeight()) / 2 + $(window).scrollTop(); var l = ($(window).width() - $(".j_dialog").outerWidth()) / 2 + $(window).scrollLeft(); if( t < 0 ) t = 0; if( l < 0 ) l = 0; $(".j_dialog").stop().css({ "border-color":getJcolor(JBoxColor, 1), "top": t, "left": l, "opacity": 1 }).fadeIn(200, $.easeInQuint); }, } jalert = function(message,callback) { $.alerts._show(JBoxColor,message, null, 'alert', 'warn', function (result) { if( callback ) callback(result); }); } jtipalert = function (message, callback) { $.alerts._show(JBoxColor, message, null, 'alert', 'tip', function (result) { if (callback) callback(result); }); } jerralert = function (message, callback) { $.alerts._show(JBoxColor, message, null, 'alert', 'err', function (result) { if (callback) callback(result); }); } jconfirm = function(message,callback) { $.alerts._show(JBoxColor, message, null, 'confirm', null, function (result) { if( callback ) callback(result); }); }; jprompt = function ( message, value, callback) { $.alerts._show(JBoxColor,message, value, 'prompt',null, function(result) { if( callback ) callback(result); }); }; })(jQuery); /*下面定义j_popur代码*/ var j_popur_transition = "slide";//j_popur显示方式 (function ($) { $.j_popur = { _color: "blue", _hide: function () { var win_y = $(window).height() / 2 + $(window).scrollTop(); var win_x = $(window).width() / 2 + $(window).scrollLeft(); $('.j_popur').animate({ "left": win_x, "top": win_y, "width": 0, "height": 0, "opacity": 0 }, 200, $.easeOutQuint, function () { $(this).remove(); $('.dvDlgMask').remove(); }); }, _show: function (title, transition, dsc, color,stype) { this.color = color == undefined ? this._color : color; if ($(".j_popur").length == 0) { var s = ""; if (stype == "frame") { s = ''; } else if (stype == "html") { s = dsc; } var popuphtml = '
' + '
' + '
' + '
' + s + '
' + '
'; $('body').append(popuphtml); } var jpopur = $('.j_popur'); jpopur.css({ "border-color": getJcolor(JBoxColor, 1) }); $('.dlgHead .aclose', jpopur).on("click", function () { $.j_popur._hide(); }); $(".dlgHead .spantitle",jpopur).text(title); $(".dvDlgMask").show(); if (stype == "frame") { $(".dlgBody .dlgframe",jpopur).on("load", function () { //为.dlgframe内的页面添加样式,以显示不同的色调 $(this).contents().find("body").addClass(JBoxColor); $(".dvDlgMask .dvajax").remove(); var w_h = J_ResetIframe($(this).get(0), false); var wh = w_h.split("|"); var width = parseInt(wh[0]); var height = parseInt(wh[1]); $.j_popur._transition(jpopur, transition, width, height); }).attr("src", dsc); } else if (stype == "html") { var width = $(dsc).outerWidth(); var height = $(dsc).outerHeight(); $.j_popur._transition(jpopur, transition, width, height); } }, _transition: function (jpopur, transition,width,height) { $(".dlgHead", jpopur).css("width", width); $(".dlgBody", jpopur).css({ 'width': width, 'height': height }); jpopur.css({ "width": $(".dlgBody", jpopur).outerWidth(), "height": $(".dlgBody", jpopur).outerHeight() + $(".dlgHead", jpopur).outerHeight() }); var box_h = jpopur.height(); var box_w = jpopur.width(); var win_y = $(window).height() / 2 + $(window).scrollTop(); var win_x = $(window).width() / 2 + $(window).scrollLeft(); var box_t = win_y - Math.round(jpopur.outerHeight() / 2); var box_l = win_x - Math.round(jpopur.outerWidth() / 2); jpopur.css({ "top": box_t, "left": box_l }); switch (transition) { case 'fade': jpopur.fadeTo(500, 1); break; case 'slide': $(".j_popur").css({ 'height': '0%' }).animate({ "height": box_h, "opacity": 1 }, 300, $.easeInQuint); break; case 'grow': jpopur.css({ 'height': 0, 'width': 0, }).animate({ height: box_h, width: box_w, "opacity": 1 }, 300, $.easeInQuint); break; case "extension": jpopur.css({ 'height': '0%', 'width': '0%', "left": win_x, "top": win_y }).animate({ "height": box_h, "width": box_w, "left": box_l, "top": box_t, "opacity": 1 }, 300, $.easeInQuint); break; default: break; } }, _showtip: function (title) { if ($(".j_tip").length == 0) { var popuphtml = '
'; $('body').append(popuphtml); } $(".j_tip").text(title); var j_tipHieght = $(".j_tip").outerHeight(); var j_tipWidth = $(".j_tip").outerWidth(); var win_y = $(window).height() / 2 + $(window).scrollTop(); var win_x = $(window).width() / 2 + $(window).scrollLeft(); var j_tip_top = win_y - Math.round(j_tipHieght / 2); var j_tip_left = win_x - Math.round(j_tipWidth / 2); $(".j_tip").css({ "top": j_tip_top, "left": j_tip_left }); $(".j_tip").fadeIn(500, $.easeInQuint, function () { window.setTimeout(function () { $(".j_tip").fadeOut(500, $.easeOutQuint); }, 2500); }); } } createframedlg = function (title, dsc) { $.j_popur._show(title, j_popur_transition, dsc, JBoxColor,"frame"); } createhtmldlg = function (title, dsc) { $.j_popur._show(title, j_popur_transition, dsc, JBoxColor,"html"); } removedlg = function () { $.j_popur._hide(); } showtip = function (title) { $.j_popur._showtip(title); } })(jQuery); /*下边的定义J_ResetIframe,使j_popur自适应iframe内容页的大小*/ //函数在创建、编辑管理员,创建或者修改菜单中用到. function ResetIframe(bpara) { J_ResetIframe($(".j_popur .dlgBody .dlgframe").get(0), bpara) } function J_ResetIframe(frm, bpara) { var height, width;//iframe的高度和宽度 var fname=$(frm).attr("name"); var subWeb = document.frames ? document.frames[fname].document : frm.contentDocument; if (frm != null && subWeb != null) { height = subWeb.body.scrollHeight; width = subWeb.body.scrollWidth; } frm.height = height; frm.width = width; if (bpara) { var jpopur = $(frm).parent().parent(); $.j_popur._transition(jpopur, "", width, height); } else { return width + "|" + height; } } /*下面定义GetDomain()代码,其作用是获取当前域名*/ function GetDomain() { var port = ""; var tport = location.port; if (tport == "80") port = ""; else port = ":" + tport; return location.protocol + "//" + location.hostname + port + "/"; } /*下面定义jsetimgsize代码,使页面中的图片根据页面的实际大小进行自适应*/ jQuery.fn.jsetimgsize = function (options) { var opt = { // Defaults 'isize': 780 //image的宽度,高度据此自适应 } return $(this).each(function () { if (options) { $.extend(opt, options); } var srel = $(this).attr("rel"); var arr_rel = srel.split(","); var iwidth = arr_rel[0]; var iheight = arr_rel[1]; if (iwidth >= opt.isize) { wimg = opt.isize; himg = Math.floor(opt.isize * iheight / iwidth); $(this).css({ 'width': wimg, 'height': himg }); } }); } jQuery.fn.jtab = function (options) { var opt = { // Defaults 'tabbtn': ".tabbtn", 'tabpage': "div" } return $(this).each(function () { if (options) { $.extend(opt, options); } var arrspan = $(".head", $(this)).find(opt.tabbtn); var arrdv = $(".body", $(this)).find(opt.tabpage); arrspan.eq(0).addClass("on"); arrdv.eq(0).show(); arrspan.each(function (index) { $(this).mouseenter(function () { arrspan.removeClass("on"); arrdv.hide(); $(this).addClass("on"); arrdv.eq(index).show(); }); }); }); } /*下面定义jselect代码*/ jQuery.fn.jselect = function (options) { var opt = { // Defaults 'width': 150, //select的宽度 'menuwidth': 150,//select下拉列表的宽度 'color': 'green' } return $(this).each(function () { if (options) { $.extend(opt, options); } var input = $(this); input.after("
标题
" + "
").hide(); var dv_sel = input.next("div"); dv_sel.css({ "width": opt.width }); var sel_head = $(".m", $(".head", dv_sel)); sel_head.css({ "width": opt.width - 4 - 30 - 24 }) //4为左圆角宽度,30为右箭头宽度,24为左右padding .text($("option:selected", input).text()); var dl = $("dl", dv_sel); var mwidth = opt.menuwidth > opt.width ? opt.menuwidth : opt.width; var wdl = mwidth - 2 - 2; //dl的宽度.左右边线宽度和为2,左右padding和为2 dl.css({ "top": sel_head.outerHeight() - 1, "background": opt.background, "width": wdl, "overflow-x": "hidden", "overflow-y": "auto" }); //以下两句判断下拉列表是向左弹出还是向右弹出 var l = dv_sel.offset().left; if (l + mwidth < $(window).width()) { dl.css("left", 0); } else { dl.css("right", 0); } var option = $("option", input); var optionsel = $("option:selected", input); var fn_change = input.attr("onchange"); var itm; option.each(function (i) { dl.append("
"); itm = $("dd", dl); var dd = itm.eq(i); dd.attr({ "val": $(this).val(), "title": $(this).text() }).text($(this).text()); }); itm.width(wdl - 39 - 10 - 1);//10,39为左右padding,1为右边边线宽度 //itm.eq(0).addClass("noborder"); var options_index = option.index(optionsel); itm.eq(options_index).addClass("on"); var maxheight = $(document).height() - 200; maxheight = dl.height() > maxheight ? maxheight : dl.height(); dv_sel.hover( function () { //dl.slideDown(200, $.easeInQuint); dl.stop(true, true).css({ "height": 0, "width": 0, "opacity": 0 }).show().animate({ "height": maxheight, "width": wdl, "opacity": 1 }, 200, $.easeInQuint); $(this).addClass("hover"); return false; }, function () { $(this).removeClass("hover"); //dl.slideUp(200, $.easeOutQuint); dl.animate({ "height": 0, "width": 0, "opacity": 0 }, 200, $.easeOutQuint); return false; } ); /*************************/ itm.hover(function () { itm.removeClass("hover"); $(this).addClass("hover"); }, function () { itm.removeClass("hover"); }).each(function (index) { $(this).on("mousedown", function () { itm.removeClass("on"); $(this).addClass("on"); sel_head.text($(this).text()); input.val($(this).attr("val")); input.get(0).selectedIndex = index; dl.hide(); if (fn_change != null) { (eval(fn_change)); }; return false; }) }) }); } /*下面定义jform代码*/ jQuery.fn.jform = function (options) { var opt = { // Defaults 'width': 300, 'height': 30, 'fsize': 12, 'bcolor': "#cbcbcb", 'icon': false, 'type': "normal", //普通文本框,普通密码框normal,带图标密码框pwdicon,带图标用户名框unicon,带图标搜索框search 'color': JBoxColor//JBoxColor值在模板文件中定义 } return $(this).each(function () { if (options) { $.extend(opt, options); } var boxshadow, bovercolor; bovercolor = getJcolor(opt.color, 2); boxshadow = "0 0 1px " + bovercolor; var overcss = "$(this).css({ 'border-color': bovercolor, '-moz-box-shadow': boxshadow, '-webkit-box-shadow': boxshadow, 'box-shadow': boxshadow })"; var css = "$(this).css({ 'border-color': opt.bcolor, '-moz-box-shadow': '', '-webkit-box-shadow': '', 'box-shadow': '' })"; if ($(this).is('[type=text]')) { //style="width:298px;height:28px;border:solid 1px #000;"实际显示结果为:宽度300,高度为30,也就是多了一个边框的宽度 var input = $(this); var hinput = opt.height - 2; var winput = opt.width - 2 - 24; var bicon = opt.icon; if (!bicon) { input.css({ "width": winput, 'height': hinput, 'background': 'none', 'font-size': opt.fsize }) .wrap('
'); var p = input.parent(); p.css({ 'width': winput, 'height': hinput, 'border-color': opt.bcolor }); } else { input.css({ "width": winput + 12 - 30, 'height': hinput, 'background': 'none', 'font-size': opt.fsize }) .wrap('').parent().wrap('
'); var spaninput = input.parent(); spaninput.css({ 'height': hinput, 'width': opt.width - 2 - 12 - 30 }).before(''); var spanbg = spaninput.prev(); spanbg.css({ 'height': hinput }); var h = Math.round((spanbg.outerHeight() - 15) / 2) - 1; bp = '7px ' + h + 'px'; spanbg.css({ 'background-position': bp }); var p = spaninput.parent(); p.css({ 'width': opt.width - 2 - 12, 'height': hinput, 'border-color': opt.bcolor }); } if (typeof (input.attr("disabled")) == "undefined") {//该文本框可用时 p.hover(function () { eval(overcss); }, function () { if (document.activeElement != input.get(0)) eval(css);//在文本框内有焦点的时候,鼠标划出不改变样式 }).css({ "cursor": "text" }); input.css({ "cursor": "text" }); } if (typeof (input.attr("disabled")) != "undefined") {//当文本框不可用时,定义的样式 input.css({ "color": "#aaa", "cursor": "default" }); p.css({ "border-color": "#dedede", "cursor": "default" }); } //文本框失去焦点的时候,恢复样式 input.blur(function () { p.css({ 'border-color': opt.bcolor, '-moz-box-shadow': '', '-webkit-box-shadow': '', 'box-shadow': '' }) }) } if ($(this).is('[type=password]')) { var input = $(this); var hinput = opt.height - 2; var winput = opt.width - 2 - 24; var bicon = opt.icon; if (!bicon) { input.css({ "width": winput, 'height': hinput, 'background': 'none', 'font-size': opt.fsize - 4 }) .wrap('
'); var p = input.parent(); p.css({ 'width': winput, 'height': hinput, 'border-color': opt.bcolor }); } else { input.css({ "width": winput + 12 - 30, 'height': hinput, 'background': 'none', 'font-size': opt.fsize - 4 }) .wrap('').parent().wrap('
'); var spaninput = input.parent(); spaninput.css({ 'height': hinput, 'width': opt.width - 2 - 12 - 30 }).before(''); var spanbg = spaninput.prev(); spanbg.css({ 'height': hinput }); var h = Math.round((spanbg.outerHeight() - 15) / 2); bp = '7px ' + h + 'px'; spanbg.css({ 'background-position': bp }); var p = spaninput.parent(); p.css({ 'width': opt.width - 2 - 12, 'height': hinput, 'border-color': opt.bcolor }); } if (typeof (input.attr("disabled")) == "undefined") {//该密码框可用时 p.hover(function () { eval(overcss); }, function () { if (document.activeElement != input.get(0)) eval(css);//在密码框有焦点的时候,鼠标划出不改变样式 }).css({ "cursor": "text" }); input.css({ "cursor": "text" }); } if (typeof (input.attr("disabled")) != "undefined") {//当密码框不可用时,定义的样式 input.css({ "color": "#aaa", "cursor": "default" }); p.css({ "border-color": "#dedede", "cursor": "default" }); } //密码框失去焦点的时候,恢复样式 input.blur(function () { p.css({ 'border-color': opt.bcolor, '-moz-box-shadow': '', '-webkit-box-shadow': '', 'box-shadow': '' }) }) } if ($(this).is('[type=radio]')) { var input = $(this); var fn_change = $(this).parent().attr("onchange"); // 取得该input的label标签 var label = $('label[for=' + input.attr('id') + ']'); input.add(label).wrapAll(''); var rblistname = input.attr('name'); // 必要的浏览器不支持:hover伪类的标签 label.hover( function () { $(this).addClass('hover'); }, function () { $(this).removeClass('hover'); } ).on('updateState', function () { input.is(':checked') ? label.addClass('checked') : label.removeClass('checked'); }) .trigger('updateState') .mousedown(function () { if (!$(this).hasClass("checked")) { //将当前单选组中所有input的checked设置为false,jquery1.6以后,建议用prop,attr不能获得预期效果 $('input[name="' + rblistname + '"]').prop('checked', false); //将当前label对应的input的checked设置为true $(this).siblings('input').prop('checked', true); //取消当前单选组中所有label的checked样式 $('input[name="' + rblistname + '"]').siblings('label').removeClass('checked'); //给当前label添加checked样式 //$(this).trigger('updateState'); $(this).addClass('checked'); } }).click(function () { if (fn_change != null) { (eval(fn_change)); }; return false; }); } if ($(this).is('[type=checkbox]')) { var input = $(this); var fn_change = $(this).attr("onchange"); // 使用输入的ID得到相关的标签 var label = $('label[for=' + input.attr('id') + ']'); // 包裹在一个span输入+标签 input.add(label).wrapAll(''); label.trigger('updateState'); label.hover( function () { $(this).addClass('hover'); }, function () { $(this).removeClass('hover'); } ).on('updateState', function () { window.setTimeout(function () { input.is(':checked') ? label.addClass('checked') : label.removeClass('checked'); }, 100); }) .trigger('updateState') .click(function () { $(this).trigger('updateState'); if (fn_change != null) { (eval(fn_change)); }; }); } if ($(this).is('[type=file]')) { var input = $(this); // 使用输入的ID得到相关的标签 input.wrap('
'); input.before(''); var iw = opt.width; if (opt.width < 300) iw = 300; if (opt.width > 600) iw = 600; var p = input.parent(); p.css("width", iw); p.find(".lim").css("width", iw - 12 - 10 - 68); input.change(function () { var $txt = input.val(); /*默认上传控件的值*/ p.find(".lim").hide().text($txt).attr("title", $txt).animate({ opacity: 'show' }, "slow", $.easing.easein); }).hover(function () { p.find(".lir").addClass("over"); }, function () { p.find(".lir").removeClass("over"); }) } }); }; /*下面定义j_tip代码*/ (function ($) { $.j_tip = { _show: function (obj, type, spara) { var that = obj; that.removeClass().addClass("tipcontainer " + type).html("").append(""); var spantip = that.find("span"); spantip.removeClass().html(spara).addClass(type); } } jtip = function (obj, type, spara) { $.j_tip._show(obj, type, spara); } })(jQuery); (function ($) { $.j_pagebox = { _hide: function () { var iwinheight = $(window).height() + $(window).scrollTop(); $(".j_pagebox").stop().animate({ "opacity": 0, //"width": 0, //"right":0 "top": iwinheight }, 400, $.easeOutQuint, function () { $('.j_pagebox .dlgclose').hide(); $(".j_pagebox .dlgrecovery").show(); $(this).remove(); }); }, _show: function (title, dsc) { if ($(".j_pagebox").length<1) { var popuphtml = '
' + '
' + '
' + '
'; $('body').prepend(popuphtml); $(".j_pagebox .boxframe").attr("src", dsc).on("load", function () { //为.dlgframe内的页面添加样式,以显示不同的色调 var w_h = J_ResetIframe($(this).get(0), false); var wh = w_h.split("|"); var width = parseInt(wh[0]); var height = parseInt(wh[1]); var j_pagebox = $(this).parent().parent(); $(".dlgHead", j_pagebox).css("width", width); $(".dlgBody", j_pagebox).css({ 'width': width, 'height': height }); j_pagebox.css({ "width": $(".dlgBody", j_pagebox).outerWidth(), "height": $(".dlgBody", j_pagebox).outerHeight() + $(".dlgHead", j_pagebox).outerHeight() }); $.j_pagebox._transition(j_pagebox); }); $('.j_pagebox .dlgclose').click(function () { $.j_pagebox._hide(); }) $('.j_pagebox .dlgrecovery').click(function () { $.j_pagebox._transition($('.j_pagebox')); }) $(".j_pagebox .boxtitle").text(title); } else { $.j_pagebox._transition($(".j_pagebox")); } }, _transition: function (j_pagebox) { var iwinheight = $(window).height() + $(window).scrollTop(); //var iwinwidth = $(window).width() + $(window).scrollLeft(); var box_h = j_pagebox.outerHeight(); var box_w = j_pagebox.outerWidth(); j_pagebox.stop().css({ "opacity": 0, 'top': iwinheight, 'right': 4 }).animate({ "opacity": 1, 'top': iwinheight - box_h - 4 }, 400, $.easeInQuint, function () { $('.j_pagebox .dlgclose').show(); $(".j_pagebox .dlgrecovery").hide(); }); } } createpagebox = function (title,dsc) { $.j_pagebox._show(title, dsc); } })(jQuery);