function getScrollTop() { return document.compatMode=="CSS1Compat"?document.documentElement.scrollTop:document.body.scrollTop; } var Tip = { _speed: 1000, obj: function (){return $('#tip')}, _handle:null, hide: function () { if (parseInt(this.obj().css('height'))<3){ this.obj().css('display', 'none'); return ; } else this.obj().css('height', (parseInt(this.obj().css('height'))-3).toString()+"px"); setTimeout('Tip.hide()', 2); }, _top: function () { return parseInt($(window).height()+getScrollTop()-parseInt($("#tip").css('height')))+'px'; }, _bottom: function () { return '-'+getScrollTop()+'px'; }, show: function () { this.obj().css('bottom',this._bottom()); this.obj().slideDown(this._speed); setTimeout('Tip._run()', this._speed); }, _run: function () { this._handle = setInterval('Tip._change()', 2); }, _change: function() { this.obj().css('top', this._top()); }, start: function () { var tiphtml = ''; tiphtml += ''; tiphtml += '
'; tiphtml += '
'; tiphtml += '
切勿参与游戏代充值 谨防牵...
'; tiphtml += '    亲爱的蜀友们:近期官方收到玩家反映,在为他人代充值钻石后导致银行卡被冻结,同时还收到公安机关问询的情况。经官方了解详细经过如下:有...'; tiphtml += '
'; tiphtml += ''; tiphtml += '
'; $('body').prepend(tiphtml); } } $(document).ready(function(){ Tip.start(); setTimeout('Tip.show()', 200); });