function article_hits(){ var article_waid= encodeuricomponent($("#article_waid").val()); $.ajax({ type: "post", url: "../../do/wms/article_hits.php?waid="+article_waid, datatype: "html", success: function(msg){ $("#article_hits").html(msg); } }); } $(document).ready(function(){ article_hits(); }); ////////////////////////////图片不间断横向滚动开始////////////////////////////////////////////// function scrollobj(scontainerid,selementid,ispeed,idirection){ scrollleft=function(){(this.selement.offsetwidth-this.scontainer.scrollleft<=0)?this.scontainer.scrollleft-=this.selement.offsetwidth:this.scontainer.scrollleft++;} scrollright=function(){(this.scontainer.scrollleft<=0)?this.scontainer.scrollleft+=this.selement.offsetwidth:this.scontainer.scrollleft--;} scrollup=function(){(this.selement.offsetheight-this.scontainer.scrolltop<=0)?this.scontainer.scrolltop-=this.selement.offsetheight:this.scontainer.scrolltop++;} scrolldown=function(){(this.scontainer.scrolltop<=0)?this.scontainer.scrolltop+=this.selement.offsetheight:this.scontainer.scrolltop--;} this.scontainer=document.getelementbyid(scontainerid); this.selement=document.getelementbyid(selementid); this.ispeed=ispeed; this.selement2=this.selement.parentnode.appendchild(this.selement.clonenode(true)); switch(idirection){ case "right":this.doscroll=scrollright;break; case "up":this.doscroll=scrollup;break; case "down":this.doscroll=scrolldown;break; default: this.doscroll=scrollleft; } var thisobj=this; thisobj.loopscroll=setinterval(function(){thisobj.doscroll()},thisobj.ispeed); thisobj.scontainer.onmouseover=function() {window.clearinterval(thisobj.loopscroll)}; thisobj.scontainer.onmouseout=function() {thisobj.loopscroll=window.setinterval(function(){thisobj.doscroll()},thisobj.ispeed)}; } ///////////////////////////图片不间断横向滚动结束//////////////////////////// // left_small var t = count = n = 0; $(function(){ $(".big_img a:not(:first)").hide(); $(".link_nav a:not(:first)").hide(); $num_nav = $(".num_nav span"); $big_img = $(".big_img a"); count = $big_img.length; t = setinterval("showauto()", 3800); $num_nav.click(function(){ var num_nav = $(".num_nav span").index(this); $(this).addclass("selected").siblings().removeclass("selected"); $big_img.filter(":visible").fadeout(800).parent().children().eq(num_nav).fadein(1300); $(".link_nav a").filter(":visible").fadeout(800).parent().children().eq(num_nav).fadein(1300); }); $(".img_nav").hover(function(){clearinterval(t)}, function(){t = setinterval("showauto()", 3800);}); }) function showauto() { n = n >= 4 ? 0 : (n + 1); $num_nav.eq(n).trigger('click'); } // top_big var top_t = top_count = top_n = 0; $(function(){ $(".top_big_img a:not(:first)").hide(); $(".top_link_nav a:not(:first)").hide(); $top_num_nav = $(".top_num_nav span"); $top_big_img = $(".top_big_img a"); top_count = $top_big_img.length; top_t = setinterval("top_showauto()", 3800); $top_num_nav.click(function(){ var top_num_nav = $(".top_num_nav span").index(this); $(this).addclass("selected").siblings().removeclass("selected"); $top_big_img.filter(":visible").fadeout(800).parent().children().eq(top_num_nav).fadein(1300); $(".top_link_nav a").filter(":visible").fadeout(800).parent().children().eq(top_num_nav).fadein(1300); }); $(".top_image").hover(function(){clearinterval(t)}, function(){t = setinterval("top_showauto()", 3800);}); }) function top_showauto() { top_n = top_n >= 4 ? 0 : (top_n + 1); $top_num_nav.eq(top_n).trigger('click'); } ///////////////////////////小焦点图结束/////////////////////////////////////