(function(c){var d=[];c.fn.jdNewsScroll=function(e){e=c.extend({},arguments.callee.defaults,e);c(this).css({position:"relative",overflow:"hidden",width:e.divWidth,height:e.divHeight});c(this).find("ul").css({position:"relative","list-style-type":"none","font-size":e.fontSize,margin:"0px"});c(this).find("li").css({"line-height":"130%",margin:"0px",padding:"2px 10px 1px 10px"});c(this).each(function(){this.$settings=e;this.$pause=false;this.$counter=e.beginTime;c(this).hover(function(){c(this).jdNewsScrollPause(true)},function(){c(this).jdNewsScrollPause(false)});d.push(this)});return this};c.fn.jdNewsScroll.defaults={beginTime:10,fontSize:"9pt",divWidth:"100%",divHeight:"200px",lineHeight:"130%",delay:20,step:4};c.fn.jdNewsScrollPause=function(e){return this.each(function(){this.$pause=e})};function b(e){if(!this[0]){0}e=c.extend({margin:false},e||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(e.margin?(num(this,"marginTop")+num(this,"marginBottom")):0):this.height()+num(this,"borderTopWidth")+num(this,"borderBottomWidth")+num(this,"paddingTop")+num(this,"paddingBottom")+(e.margin?(num(this,"marginTop")+num(this,"marginBottom")):0)}setInterval(a,80);function a(){for(var f=0;f<d.length;f++){var g=d[f];if(g&&!g.$pause){if(g.$counter==0){var e=c("> ul",g)[0];if(!g.$steps){g.$steps=c("> li:first-child",e).outerHeight();g.$step=0}if((g.$steps+g.$step)<=0){g.$counter=g.$settings.delay;g.$steps=false;c(e).css("top","0").find("> li:last-child").after(c("> li:first-child",e));c("> *",e).not("li").remove()}else{g.$step-=g.$settings.step;if(-g.$step>g.$steps){g.$step=-g.$steps}e.style.top=g.$step+"px"}}else{g.$counter--}}}}})(jQuery);
