(window).scroll(function(){ if($(this).scrollTop()>iscrolobj_top){ if(itimer){ clearTimeout(itimer); } itimer = setTimeout("scrint("+$(this).scrollTop()+")",50); }else{ if(itimer){ clearTimeout(itimer); } itimer = setTimeout(scrout,50); } }); } function scrint(h){ iscrolobj.addClass('index_bar_fixed'); $('.index_bar_height').show(0); checkheight(h); } function scrout(){ iscrolobj.removeClass('index_bar_fixed'); $('.index_bar_height').hide(0); iscrolobj.children('a').removeClass('hover'); } function getheightArr(){ scroll_height_arr.length=0; for(var i=1;i<6;i++){ scroll_height_arr.push($('#title_'+i).offset().top-100); } } function checkheight(height){ for(var i=scroll_height_arr.length;i>=0;i--){ if(height>scroll_height_arr[i]){ iscrolobj.children('a').eq(i).addClass('hover').siblings('a').removeClass('hover'); return; } } } function bindclick2(){ iscrolobj.children('a').each(function(i){ $(this).click(function(){ $('body,html').animate({scrollTop:scroll_height_arr[i]+100}); }) }); } $('#pro_title li').each(function(i){ $(this).click(function(){ $('#pro_scroll_con .scrollCon').hide(0).eq(i).show(0); $(this).addClass('hover').siblings('li').removeClass('hover'); }); }); function bindproscroll(){ $('#pro_scroll_con').find('.scrollCon').each(function(i){ if(i==2){ new setScroll($(this),$(this).children('.btn_left'),$(this).children('.btn_right'),277,4); }else{ new setScroll($(this),$(this).children('.btn_left'),$(this).children('.btn_right'),369,3); } }); } //indexflash('#banner li','#banner_cur ul','li'); var index_flash_obj = setScroll_flash('#banner',null,null,null,1); index_flash_obj.bindclick = function(){ var i = this.i; $('#banner_cur li').mouseover(function(){ var index = $(this).index(); $(this).addClass('hover').siblings().removeClass('hover'); index_flash_obj.i = index; index_flash_obj.show() }) } index_flash_obj.bindclick();