$(function(){ $(".nav").find("ul li").last().css("background","none"); $(".mobile_nav ul li").hover(function(){ $(this).children("div.lev2").stop(true,true).slidedown(300); $(this).addclass('hover') },function(){ $(this).children("div.lev2").stop(true,true).slideup(1); $(this).removeclass('hover') }) }); //分类选择固定 $(function(){ var nav=$(".header_module"); //得到导航对象 var win=$(window); //得到窗口对象 var sc=$(document);//得到document文档对象。 win.scroll(function(){ if(sc.scrolltop()>= 40){ $(".header_module").addclass("tpfix"); }else{ $(".header_module").removeclass("tpfix"); } }); }); //漂浮窗口 $(function(){ //获取要定位元素距离浏览器顶部的距离 var navh = $(window).width()/2; //滚动条事件 $(window).scroll(function(){ //获取滚动条的滑动距离 var scroh = $(this).scrolltop(); //滚动条的滑动距离大于等于定位元素距离浏览器顶部的距离,就固定,反之就不固定 if(scroh>=navh){ $(".bodyright dt").show(); }else if(scroh div") // .eq(index).show() // .siblings().hide(); // }) // }) //资质荣誉 // $(function(){ // var $div_li = $("div.inzzry_item ul li") // $div_li.mouseover(function(){ // $(this).addclass("aa") // .siblings().removeclass("aa"); // var index = $div_li.index(this); // $("div.inzzry_module_module > div.tempwrap") // .eq(index).show() // .siblings().hide(); // }) // }) $(function(){ $(".inzzry_module_module").find("ul li").eq(0).css("margin-left","0"); $("div.zscp_module_module ul").each(function(){ i=0; $(this).find("li").each(function(){ if(i % 4 == 0){ $(this).addclass("cpzs_eq0"); } i++; }) }) }) $(function(){ $(".xwdt_module_module").find("ul li").eq(0).addclass("xwdt_module_module_eq0"); $(".in_news li a").hover( function(){ $(".in_news li a .box_1").show(); $(".in_news li a .box_2").hide(); $(this).find(".box_1").hide(); $(this).find(".box_2").show(); }, function(){} ); }); //公司实力 jquery(function($){ $(".box .box_con .conbox ul li").hover(function(){ $(this).find(".scsl_title").css("display", "block "); $(this).find(".scsl_title").stop(true, false).animate({ bottom: 0 }) },function(){ $(this).find(".scsl_title").css("display", "none"); $(this).find(".scsl_title").stop(true, false).animate({ bottom: -45 }) }); }) //头部二维码 jquery(function($){ $(".cop ul li").hover(function(){ $(this).find(".header_second").css("display", "block "); $(this).find(".header_second").stop(true, false).animate({ bottom: 54 }) },function(){ $(this).find(".header_second").css("display", "none"); $(this).find(".header_second").stop(true, false).animate({ bottom: -54 }) }); }) //头部二维码 jquery(function($){ $(".dhx_lt ul li").hover(function(){ $(this).find(".header_second1").css("display", "block "); $(this).find(".header_second1").stop(true, false).animate({ top: 40 }) },function(){ $(this).find(".header_second1").css("display", "none"); $(this).find(".header_second1").stop(true, false).animate({ top: -40 }) }); }) $(function(){ $(".indzp ul li .rsp").hide(); $(".indzp ul li").hover(function(){ $(this).find(".rsp").stop().fadeto(500,0.5) $(this).find(".text").stop().animate({left:'0'}, {duration: 500}) }, function(){ $(this).find(".rsp").stop().fadeto(500,0) $(this).find(".text").stop().animate({left:'300'}, {duration: "fast"}) $(this).find(".text").animate({left:'-300'}, {duration: 0}) }); }); $(function(){ $(".abteam").find("ul li").last().addclass("zpwuteam"); $(".abteam ul li .rspteam").hide(); $(".abteam ul li").hover(function(){ $(this).find(".rspteam").stop().fadeto(500,0.5) $(this).find(".textteam").stop().animate({left:'0'}, {duration: 500}) }, function(){ $(this).find(".rspteam").stop().fadeto(500,0) $(this).find(".textteam").stop().animate({left:'300'}, {duration: "fast"}) $(this).find(".textteam").animate({left:'-300'}, {duration: 0}) }); }); $(function(){ $('.bodyright dd').hover(function(){ $(this).toggleclass('hover'); $(this).find("p").toggle(); $(this).find("div.pcdh_item").toggle(); }); }) $('.bodyright dt').click(function () { $('html,body').animate({ scrolltop : '0px' }, 300);//返回顶部所用的时间 返回顶部也可调用goto()函数 }); }); //精品推荐滚动 $(function(){ $(".hd_top").find("ul li").last().css("background","none"); $(".qing").find("ul.nav li").last().css("background","none"); $(".gjc_l").find("ul li").last().css("background","none"); $(".cpzs_module_module").find("ul li").eq(0).addclass("eq0"); $(".cpzs_module_module").find("ul li").eq(3).addclass("eq0"); $(".cpzs_module_module").find("ul li").eq(6).addclass("eq0"); $(".ingcal_module_module").find("ul li").eq(0).addclass("ingcal_eq0"); $(".cgal_module_module").find("ul li").eq(0).addclass("cgal_eq0"); $(".cgal_module_module").find("ul li").eq(4).addclass("cgal_eq0"); $(".ftgz_pic").find("dl dt").last().css("margin-right","0px"); $(".cpzs_nav").find("ul li").eq(0).addclass("eq0"); $(".gsjj_title").find("ul li").eq(0).addclass("eq0"); var $div_li = $("div.jptj_item_title ul li") $div_li.mouseover(function(){ $(this).addclass("selected") .siblings().removeclass("selected"); var index = $div_li.index(this); $("div.content12 > div") .eq(index).show() .siblings().hide(); }) }) //精品滑动 $(function(){ linum = $('.mainlist li').length;//图片数量 w = linum/2 * 232;//ul宽度 $('.piclist').css('width', '1000px');//ul宽度 $('.swaplist').html($('.mainlist').html());//复制内容 $('.og_next').click(function(){ if($('.swaplist,.mainlist').is(':animated')){ $('.swaplist,.mainlist').stop(true,true); } if($('.mainlist li').length>4){//多于4张图片 ml = parseint($('.mainlist').css('left'));//默认图片ul位置 sl = parseint($('.swaplist').css('left'));//交换图片ul位置 if(ml<=0 && ml>w*-1){//默认图片显示时 $('.swaplist').css({left: '0px'});//交换图片放在显示区域右侧 $('.mainlist').animate({left: ml - 970 + 'px'},'slow');//默认图片滚动 if(ml==(w-970)*-1){//默认图片最后一屏时 $('.swaplist').animate({left: '0px'},'slow');//交换图片滚动 } }else{//交换图片显示时 $('.mainlist').css({left: '0px'})//默认图片放在显示区域右 $('.swaplist').animate({left: sl - 970 + 'px'},'slow');//交换图片滚动 if(sl==(w-970)*-1){//交换图片最后一屏时 $('.mainlist').animate({left: '0px'},'slow');//默认图片滚动 } } } }) $('.og_prev').click(function(){ if($('.swaplist,.mainlist').is(':animated')){ $('.swaplist,.mainlist').stop(true,true); } if($('.mainlist li').length>4){ ml = parseint($('.mainlist').css('left')); sl = parseint($('.swaplist').css('left')); if(ml<=0 && ml>w*-1){ $('.swaplist').css({left: w * -1 + 'px'}); $('.mainlist').animate({left: ml + 970 + 'px'},'slow'); if(ml==0){ $('.swaplist').animate({left: (w - 945) * -1 + 'px'},'slow'); } }else{ $('.mainlist').css({left: (w - 945) * -1 + 'px'}); $('.swaplist').animate({left: sl + 970 + 'px'},'slow'); if(sl==0){ $('.mainlist').animate({left: '0px'},'slow'); } } } }); $('.goodlist').hover(function(){ $('.exchange',this).show(); },function(){ $('.exchange',this).hide(); }); }); //导航 jquery(function($){ $(".nav_module").find("ul li.yqlj-item").each(function(){ $(this).hover(function(){ $(this).addclass("fitem-hover"); },function(){ $(this).removeclass("fitem-hover"); }) }); }) jquery(function($){ $(".nav_module").find("ul li.yqlj-item .second ul li").each(function(){ $(this).hover(function(){ $(this).addclass("item-hover"); },function(){ $(this).removeclass("item-hover"); }) }); }) jquery(function($){ $(".nav_module").find("ul li.yqlj-item").eq(1).addclass("eq0"); }) jquery(function($){ $(".cpzx_module_module").find("ul li").each(function(){ $(this).hover(function(){ $(this).addclass("item-hover"); },function(){ $(this).removeclass("item-hover"); }) }); }) //banner图片切换 function mouseover_change(param){ this.mouse=param.mouse || null;/*鼠标出发对象*/ this.content=param.content || null;/*鼠标出发对象显示的内容*/ this.mousestyle=param.hover || null;/*鼠标出发时显示的内容*/ this.default_style=param.default_style || null;/*鼠标默认样式*/ this.default_show=param.default_show || 0;/*鼠标默认样式*/ /*函数容错处理****start*/ if($(this.mouse).length!=$(this.content).length){alert('mouseover_change函数传参错误,\n错误对象:【'+this.mouse+'】。');return;}; if($(this.mouse).length-1"+j+"")); }else{ $divshowflag.append($(""+j+"")); } } $("#banner .samestyle").css('opacity','0.3'); $("#banner .samestyle").hover(function (){ $(this).css('opacity','0.6'); },function (){ $(this).css('opacity','0.3'); }); $("#banner .pre").click(function (){ if(!$("#silder a:eq("+page+")").is(":animated")&&!$("#silder a:eq("+(page+1)+")").is(":animated")){ if(page==0){ $("#silder a").fadeout('slow'); $("#silder a:eq("+(pagecount-1)+")").fadein('slow'); page=pagecount-1; setnumflag(page); }else{ $("#silder a").fadeout('slow'); $("#silder a:eq("+(page-1)+")").fadein('slow'); page--; setnumflag(page); } } }); $("#banner .next").click(function (){ if(!$("#silder a:eq("+page+")").is(":animated")&&!$("#silder a:eq("+(page+1)+")").is(":animated")){ if((page+1)==pagecount){ $("#silder a").fadeout('slow'); $("#silder a:eq(0)").fadein('slow'); page=0; setnumflag(page); }else{ $("#silder a").fadeout('slow'); $("#silder a:eq("+(page+1)+")").fadein('slow'); page++; setnumflag(page); } } }); settimeout(startnext,5000); function startnext(){ setinterval(function (){ $("#banner .next").trigger('click'); },5000); } $(".fs_btn span").mouseover(function (){ if(!$("#silder a").is(":animated")&&$(this).attr('class')!=='on'){ $("#silder a").fadeout('slow'); $("#silder a:eq("+($(this).html())+")").fadein('slow'); setnumflag($(this).html()); } }) $(".fs_btn span").click(function (){ $(this).trigger('mouseover'); }); }); $(function (){ $("#top00 ul li:has(ul)").hover(function() { $(this).children('.showother').stop(true,true).slidedown(300); }, function() { $(this).children('.showother').stop(true,true).hide(); }); }); /* 名称:提示弹窗 使用方法:new carewindow({width:405,height:160,title:'提示信息',content:str,left:2,top:2});参数都是可选的 注意:等页面元素加载完毕时再调用! 传入参数obj是一对象,当然可以不传,例如: { width:405,**传入一个正的数字 height:160,**传入一个正的数字 title:'提示信息',**传入一个字符串 content:'如果你看到这个,说明您的操作有误!',**传入一个字符串 left:2, //2表示中间,默认就是2,数字越大越靠左,**传入一个正的数字 top:2 //2表示中间,默认就是2,数字越大越靠上,**传入一个正的数字 } */ function carewindow(obj){ obj=obj || {}; if(obj.width <405 || typeof obj.width == 'undefined'){ this.width=405; }else{ this.width=obj.width; } if(obj.height <160 || typeof obj.height == 'undefined'){ this.height=160; }else{ this.height=obj.height; } this.left=obj.left || 2; this.top=obj.top || 2; this.contentheight=this.height-104;//内容主体部分的高度 this.title=obj.title || '提示信息'; this.content=obj.content || '如果你看到这个,说明您的操作有误!'; this.html=this.sethtml();//返回创建html this.html.hide();//设置其为隐藏 this.inserthtml();//追加插入到body中去 this.setbasicstyle();//设置除大小之外的样式 this.setsize(this.width,this.height);//设置大小 this.addclickclose();//添加点击事件 this.html.show();//设置其显示 this.setevent(); } carewindow.prototype={ sethtml:function (){ var str= "
"+//shadedivbg为覆盖整个浏览器视口界面 "
"+//shadecontainer为弹出来的div的容器 "
"+//shadediv作为透明的背景 "
"+//shadedivc为中间弹出的内容 "

"+this.title+"

"+ "
"+ "

"+ this.content+ "

"+ "
"+ "
"+ "确定" "
"+ "
"+ "
"; return $(str);//返回创建的html对象 }, inserthtml:function (){ $("body").append(this.html); }, setbasicstyle:function (){ //遮住整个适口 $("#shadedivbg").css( { 'position':'absolute', 'top':'0px', 'left':'0px', 'margin':'0px', 'padding':'0px', 'background':'#fff', 'opacity':'0', 'z-index':'1000' } ); //弹出div的容器 $("#shadecontainer").css( { 'position':'absolute', 'width':this.width, 'height':this.height, 'margin':'0px', 'padding':'0px', 'z-index':'1001' } ); //做透明度用 $("#shadecontainer div.shadediv").css( { 'position':'absolute', 'width':this.width, 'height':this.height, 'top':'0px', 'left':'0px', 'background':'#000', 'opacity':'0.2', 'margin':'0px', 'padding':'0px', 'z-index':'1002' } ); //主体内容 $("#shadecontainer div.shadedivc").css( { 'position':'absolute', 'left':'9px', 'top':'9px', 'width':this.width-20, 'height':this.height-20, 'border':'1px solid #888', 'font-size':'14px', 'margin':'0px', 'padding':'0px', 'z-index':'1003' } ); $("#shadecontainer div.shadedivc h2").css( { 'background':"#f6f6f6", 'height':'30px', 'font-size':'14px', 'color':'#336699', 'line-height':'30px', 'text-indent':'10px', 'border':'none', 'margin':'0px', 'padding':'0px', 'z-index':'1004' } ); $("#shadecontainer div.shadedivc div.printcontent").css( { 'background':"#ffffff", 'height':this.contentheight, 'font-size':'13px', 'color':'#336699', 'border-top':'1px solid #cdcdcd', 'border-bottom':'1px solid #cdcdcd', 'color':'#454545', 'margin':'0px', 'padding':'0px', 'z-index':'1005' } ); $("#shadecontainer div.shadedivc div.printcontent p").css( { 'line-height':'150%', 'padding':'20px', 'margin':'0px', 'z-index':'1006' } ); $("#shadecontainer div.shadedivc div.printcontentbottom").css( { 'height':'52px', 'line-height':'50px', 'top':'250px', 'background':"#f6f6f6", 'margin':'0px', 'padding':'0px', 'z-index':'1007' } ); $("#shadecontainer div.shadedivc div.printcontentbottom a").css( { 'display':'inline', 'width':'48px', 'height':'28px', 'border-top':'1px solid #d8dfea', 'border-bottom':'1px solid #0e1f5b', 'border-left':'1px solid #d8dfea', 'border-right':'1px solid #0e1f5b', 'line-height':'28px', 'text-align':'center', 'float':'right', 'margin':'10px', 'padding':'0px', 'background':'#005eac', 'color':'#fff', 'cursor':'pointer', 'z-index':'10008' } ); }, setevent:function (){ var _this=this; $(window).bind("scroll",eventsetsize); $(window).bind("resize",eventsetsize); function eventsetsize(){ $("#shadedivbg").is("div") ? _this.setsize() : null; } }, setsize:function (){ $("#shadedivbg").css( { 'width':$(window).width(), 'height':$(window).height()+$(document).scrolltop() } ); $("#shadecontainer").css( { 'top':($(window).height()-this.height)/this.top+$(document).scrolltop(), 'left':($(window).width()-this.width)/this.left } ); }, addclickclose:function (){ var _this=this; $("#shadecontainer div.shadedivc div.printcontentbottom a").click(function (){ _this.hideme(); }); }, hideme:function (){ $("#shadedivbg").remove(); $("#shadecontainer").remove(); } }; (function($){ //拖拽插件,参数:id或object $.move = function(_this){ if(typeof(_this)=='object'){ _this=_this; }else{ _this=$("#"+_this); } if(!_this){return false;} _this.css({'position':'absolute'}).hover(function(){$(this).css("cursor","move");},function(){$(this).css("cursor","default");}) _this.mousedown(function(e){//e鼠标事件 var offset = $(this).offset(); var x = e.pagex - offset.left; var y = e.pagey - offset.top; //_this.css({'opacity':'0.3'}); $(document).bind("mousemove",function(ev){//绑定鼠标的移动事件,因为光标在div元素外面也要有效果,所以要用doucment的事件,而不用div元素的事件 _this.bind('selectstart',function(){return false;}); var _x = ev.pagex - x;//获得x轴方向移动的值 var _y = ev.pagey - y;//获得y轴方向移动的值 _this.css({'left':_x+"px",'top':_y+"px"}); }); }); $(document).mouseup(function(){ $(this).unbind("mousemove"); _this.css({'opacity':''}); }) }; })(jquery) /* $(function(){ $.move('m1'); }); */ function addfavorite(surl, stitle) { surl = encodeuri(surl); try{ window.external.addfavorite(surl, stitle); }catch(e) { try{ window.sidebar.addpanel(stitle, surl, ""); }catch (e) { new carewindow({'title':'温馨提示','content':'按住 ctrl 键再按 d 键即可,或手动在浏览器里进行设置.','width':400}); $.move('shadecontainer'); } } } //产品滚动 var speed_1 = 50; //速度(毫秒) var space_1 = 20; //每次移动(px) var pagewidth_1 = 1032 *1; //翻页宽度 var interval_1 = 8000; //翻页间隔时间 var fill_1 = 0; //整体移位 var movelock_1 = false; var movetimeobj_1; var moveway_1="right"; var comp_1 = 0; var autoplayobj_1=null; function getobj(objname){if(document.getelementbyid){return eval('document.getelementbyid("'+objname+'")')}else{return eval('document.all.'+objname)}} function autoplay_1(){clearinterval(autoplayobj_1);autoplayobj_1=setinterval('isl_godown_1();isl_stopdown_1();',interval_1)} function isl_goup_1(){if(movelock_1)return;clearinterval(autoplayobj_1);movelock_1=true;moveway_1="left";movetimeobj_1=setinterval('isl_scrup_1();',speed_1);} function isl_stopup_1(){if(moveway_1 == "right"){return};clearinterval(movetimeobj_1);if((getobj('isl_cont_1').scrollleft-fill_1)%pagewidth_1!=0){comp_1=fill_1-(getobj('isl_cont_1').scrollleft%pagewidth_1);compscr_1()}else{movelock_1=false} autoplay_1()} function isl_scrup_1(){if(getobj('isl_cont_1').scrollleft<=0){getobj('isl_cont_1').scrollleft=getobj('isl_cont_1').scrollleft+getobj('list1_1').offsetwidth} getobj('isl_cont_1').scrollleft-=space_1} function isl_godown_1(){clearinterval(movetimeobj_1);if(movelock_1)return;clearinterval(autoplayobj_1);movelock_1=true;moveway_1="right";isl_scrdown_1();movetimeobj_1=setinterval('isl_scrdown_1()',speed_1)} function isl_stopdown_1(){if(moveway_1 == "left"){return};clearinterval(movetimeobj_1);if(getobj('isl_cont_1').scrollleft%pagewidth_1-(fill_1>=0?fill_1:fill_1+1)!=0){comp_1=pagewidth_1-getobj('isl_cont_1').scrollleft%pagewidth_1+fill_1;compscr_1()}else{movelock_1=false} autoplay_1()} function isl_scrdown_1(){if(getobj('isl_cont_1').scrollleft>=getobj('list1_1').scrollwidth){getobj('isl_cont_1').scrollleft=getobj('isl_cont_1').scrollleft-getobj('list1_1').scrollwidth} getobj('isl_cont_1').scrollleft+=space_1} function compscr_1(){if(comp_1==0){movelock_1=false;return} var num,tempspeed=speed_1,tempspace=space_1;if(math.abs(comp_1)tempspace){comp_1-=tempspace;num=tempspace}else{num=comp_1;comp_1=0} getobj('isl_cont_1').scrollleft+=num;settimeout('compscr_1()',tempspeed)}} function picrun_ini(){ getobj("list2_1").innerhtml=getobj("list1_1").innerhtml; getobj('isl_cont_1').scrollleft=fill_1>=0?fill_1:getobj('list1_1').scrollwidth-math.abs(fill_1); getobj("isl_cont_1").onmouseover=function(){clearinterval(autoplayobj_1)} getobj("isl_cont_1").onmouseout=function(){autoplay_1()} autoplay_1(); } //带按钮的图片左右滚动效果 var speed = 10; //速度(毫秒) var space = 5; //每次移动(px) var pagewidth = 320; //翻页宽度 var fill = 0; //整体移位 var movelock = false; var movetimeobj; var comp = 0; var autoplayobj = null; getobj("list2").innerhtml = getobj("list1").innerhtml; getobj('isl_cont').scrollleft = fill; getobj("isl_cont").onmouseover = function(){clearinterval(autoplayobj);} getobj("isl_cont").onmouseout = function(){autoplay();} autoplay(); function getobj(objname){if(document.getelementbyid){return eval('document.getelementbyid("'+objname+'")')}else{return eval('document.all.'+objname)}} function autoplay(){ //自动滚动 clearinterval(autoplayobj); autoplayobj = setinterval('isl_godown();isl_stopdown();',3000); //间隔时间 } function isl_goup(){ //上翻开始 if(movelock) return; clearinterval(autoplayobj); movelock = true; movetimeobj = setinterval('isl_scrup();',speed); } function isl_stopup(){ //上翻停止 clearinterval(movetimeobj); if(getobj('isl_cont').scrollleft % pagewidth - fill != 0){ comp = fill - (getobj('isl_cont').scrollleft % pagewidth); compscr(); }else{ movelock = false; } autoplay(); } function isl_scrup(){ //上翻动作 if(getobj('isl_cont').scrollleft <= 0){getobj('isl_cont').scrollleft = getobj('isl_cont').scrollleft + getobj('list1').offsetwidth} getobj('isl_cont').scrollleft -= space ; } function isl_godown(){ //下翻 clearinterval(movetimeobj); if(movelock) return; clearinterval(autoplayobj); movelock = true; isl_scrdown(); movetimeobj = setinterval('isl_scrdown()',speed); } function isl_stopdown(){ //下翻停止 clearinterval(movetimeobj); if(getobj('isl_cont').scrollleft % pagewidth - fill != 0 ){ comp = pagewidth - getobj('isl_cont').scrollleft % pagewidth + fill; compscr(); }else{ movelock = false; } autoplay(); } function isl_scrdown(){ //下翻动作 if(getobj('isl_cont').scrollleft >= getobj('list1').scrollwidth){getobj('isl_cont').scrollleft = getobj('isl_cont').scrollleft - getobj('list1').scrollwidth;} getobj('isl_cont').scrollleft += space ; } function compscr(){ var num; if(comp == 0){movelock = false;return;} if(comp < 0){ //上翻 if(comp < -space){ comp += space; num = space; }else{ num = -comp; comp = 0; } getobj('isl_cont').scrollleft -= num; settimeout('compscr()',speed); }else{ //下翻 if(comp > space){ comp -= space; num = space; }else{ num = comp; comp = 0; } getobj('isl_cont').scrollleft += num; settimeout('compscr()',speed); } }