function gbksub(obj,tit,type,w,h){ layer.open({ type: type, title: tit, area: [w, h], content: obj, scrollbar: false }); } $(function () { _cj.init(); var gt = $('#gotop').click(function () { $('html,body').animate({ scrolltop: 0 }, 300); return false; }); $(window) .scroll(function () { if (_cj.toplock != null) $(window).scrolltop(_cj.toplock); if (gt.length > 0) { if ($(window).scrolltop() > 50) gt.fadein(300); else gt.fadeout(200); } }); }); var _cj = { init: function (e) { _cj.me = false; if (typeof e == 'undefined') e = $(document); _cj.me = true; }, }