$(document).ready(function(e) { $('.nav-box ul li').mouseover(function(){ $(this).find('ul').show(); }).mouseleave(function(){ $(this).find('ul').hide(); }) $('.nav-box ul li ul').find('li:gt(0)').mouseover(function(){ $(this).css('background-color','#0e2d66'); $(this).find('span').css('color','#ffffff'); }).mouseleave(function(){ $(this).css('background-color','#0854aa'); $(this).find('span').css('color','#ffffff'); }) $('.nav-box ul').find('li:gt(0)').mouseover(function(){ $(this).find('font').css('color','#ffffff'); }).mouseleave(function(){ $(this).find('font').css('color','#ffffff'); }) len=$('.banmove a').length, cnow=0, cnext=1, time=4500, times=1000, over='', torf=true font='' for(i=1;i' } $('.banmun').html(font) over=settimeout(function(){ ple(cnow,cnext) },time) function ple(now,next){ torf=false $('.banmove a').eq(next).css('z-index','1001') $('.banmun font').removeclass('hover') $('.banmun font').eq(next).addclass('hover') $('.banmove a').eq(now).fadeout(times,function(){ $('.banmove a').eq(next).css('z-index','1002') $('.banmove a:gt('+next+'),.banmove a:lt('+next+')').css('z-index','1000').fadein(0) cnow=next next+1>=len?cnext=0:cnext=next+1 over=settimeout(function(){ ple(cnow,cnext) },time) torf=true }) } $('.banmun font').each(function(index){ $(this).click(function(){ if(index!=cnow){ while(torf==true){ cleartimeout(over) ple(cnow,index) } } }) }) move_class = '.pro-move'; time_clear = ''; prod_clear = ''; marg_left = 0; now_num = 0; nei_num = 4; //内框显示几个 len_num = math.abs($(move_class + ' a').length); one_img = math.abs($(move_class + ' a:eq(0) img').attr('width')); one_width = one_img + 20; $(move_class).html($(move_class).html()+$(move_class).html()+'
'); move_fun(); function move_fun(){ time_clear = window.settimeout(function(){ if(now_num == len_num*2-4){ now_num = len_num-4; move_left(1, one_width*now_num, 1); now_num ++; move_fun(); }else{ move_left(1, math.abs($(move_class).css('margin-left').replace('px','')), 1); now_num ++; move_fun(); } }, 3000); } function move_left(ic, jc, kc){ /*$(move_class).animate({marginleft:-(one_width*kc+jc)});*/ if(ic <= one_width){ window.settimeout(function(){ $(move_class).css('margin-left', -(ic*kc+jc)+'px'); ic = ic + 10; move_left(ic, jc, kc); }, 1) }else{ $(move_class).css('margin-left', -(one_width*kc+jc)+'px'); } } $('.pro-center,.pro-left,.pro-right').mouseover(function(){clearinterval(time_clear);}).mouseout(function(){move_fun();}) $('.pro-left').click(function(){ cleartimeout(prod_clear); prod_clear = window.settimeout(function(){ if(now_num == 0){ now_num = len_num; move_left(1, one_width*now_num, -1); now_num --; }else{ move_left(1, math.abs($(move_class).css('margin-left').replace('px','')), -1); now_num --; } }, 0); }) $('.pro-right').click(function(){ cleartimeout(prod_clear); prod_clear = window.settimeout(function(){ if(now_num == len_num*2-4){ now_num = len_num-4; move_left(1, one_width*now_num, 1); now_num ++; }else{ move_left(1, math.abs($(move_class).css('margin-left').replace('px','')), 1); now_num ++; } }, 0); }) if($('.pro-move').attr('display')==0){ $('.pro-move a').each(function(i,e) { $(this).find('h3').css('bottom','-40px'); $(this).mouseover(function(){ $(this).find('h3').animate({bottom:0}) }).mouseleave(function(){ $(this).find('h3').animate({bottom:-40}) }) }) } con_height = 0; con_height1 = $('.main-con-top:eq(0)').height(); con_height2 = $('.main-con-top:eq(1)').height(); con_height3 = $('.main-con-top:eq(2)').height(); if(con_height1 > con_height) con_height=con_height1; if(con_height2 > con_height) con_height=con_height2; if(con_height3 > con_height) con_height=con_height3; $('.main-con-top').height(con_height); $('.sidebar-con-left-nav ul li div strong').click(function(){ $(this).toggleclass('navdown'); $(this).parent('div').parent('li').find('ul').slidetoggle(); }) })