/** * created by administrator on 2015/9/6. */ /** * created by administrator on 2015/9/6. */ (function($) { /** * banner */ $(".slidebox").css({ 'width':document.documentelement.clientwidth, 'height':document.documentelement.clientwidth*545/1920+"px", }); $(".slidebox img").css({ 'height':document.documentelement.clientwidth*545/1920+"px", 'width':document.documentelement.clientwidth+"px" }); /** * index-about */ $(".index-about li:eq(2)").css("marginright",0); /** * 最顶部右侧 */ $(".g-hd .fast-box-ul li:eq(0)").css('background','none'); $(".g-hd .fast-box-ul li:gt(0)").hover(function(){ $(this).addclass('fast-box').stop(true); $(this).css('background','none'); $(this).next().css('background','none'); },function(){ if($(this).find('#bgdiv').css('display')=='block'){ $(this).addclass('fast-box').stop(true); }else{ $(this).removeclass('fast-box').stop(true) }; $(this).css({ 'background':'url(assets/images/hd-r-ico.jpg) no-repeat right center', 'background-position-x':'-104px' }); $(this).next().css({ 'background':'url(assets/images/hd-r-ico.jpg) no-repeat right center', 'background-position-x':'-104px' }); }); /** *底部 */ $(".footer .fast-box-ul li").hover(function(){ $(this).addclass('fast-box').stop(true); $(this).css({'background':'none',"z-index":20}); $(this).next().css('background','none'); },function(){ if($(this).find('#bgdiv2').css('display')=='block'){ $(this).addclass('fast-box').stop(true); }else{ $(this).removeclass('fast-box').stop(true) }; $(this).css({ 'background':'url(assets/images/footer-ico.jpg) no-repeat -104px center', "z-index":10 }); $(this).next().css({ 'background':'url(assets/images/footer-ico.jpg) no-repeat -104px center' }); }); /** * index-product */ $(".index-product li:eq(3)").css('paddingright',0); /** * foot 最右侧-联系我们 */ $(".foot .w1180 ul:eq(0)>li:last-child").css("width","235px"); /** * 导航 */ /* $(".nav .nav-1-box").children("li").hover(function(){ $(this).find('.nav-2-box').show(); $(this).addclass('active'); },function(){ $(this).find('.nav-2-box').hide(); $(this).removeclass('active'); }) */ $(function(){ var _this1=null; $('.nav-1-box>li').hover(function(){ _this1=$(this); _this1.find('.nav-2-box').show(); var _this2=null; _this1.find('.nav-2-box').find('li').hover(function(){ _this2=$(this); _this2.find('.nav-3-box').show(); _this2.find('.nav-3-box').hover(function(){ $(this).show(); },function(){ $(this).hide(); }); },function(){ _this2.find('.nav-3-box').hide(); }); },function(){ _this1.find('.nav-2-box').hide(); }); }); /** * 首页-可视柯恩 */ for(var i=1;i<=6;i++){ if(i==1){ $(".index-kske .f-fl .videol"+i+"").show(); }else{ $(".index-kske .f-fl .videol"+i+"").hide(); } } $(".index-kske .f-fr ul li.videor1").addclass("active"); $(".index-kske .f-fr ul li").hover(function(){ $(this).addclass("active"); $(this).siblings().removeclass("active"); $(".index-kske .f-fl .videol"+($(this).index()+1)+"").show().siblings().hide(); }); /** * */ $(".about-title-box li:eq(8)").css("marginright",0); /** * about banner */ var nybanw=document.documentelement.clientwidth; $(".ny-banner").css({ 'width':nybanw+"px", 'height':160*nybanw/1920+"px" }); $(".ny-banner img").css('width',document.documentelement.clientwidth); /** * 荣誉资质 */ $('#ryzz2 li').each(function(){ if($(this).index()>1 && ($(this).index()+1) % 4==0){ $(this).css("marginright",0); } }) if($('#ksken').length > 0){ /** * 可视柯恩 */ $('#ksken #layer-photos li').each(function(){ if($(this).index()>1 && ($(this).index()+1) % 3==0){ $(this).css("marginright",0); } }) }else{ /** * 文化掠影 */ $('#layer-photos li').each(function(){ if($(this).index()>1 && ($(this).index()+1) % 4==0){ $(this).css("marginright",0); } }) } /** * textarea 字数限制 */ $("#word").keyup(function(){ var len = $(this).val().length; if(len > 999){ $(this).val($(this).val().substring(0,1000)); } var num = 1000 - len; $("#wordnum").text(num); }); /** * 新闻列表 */ $(".news-list li").hover(function(){ $(this).addclass('active'); },function(){ $(this).removeclass('active') }) /** * 最新招聘列表 */ $('.zxzp-list tbody tr').each(function(){ if($(this).index()>0 && ($(this).index()+1) % 2==0){ $(this).addclass("active"); } }) /** * 柯恩风采 */ $('.kenfc li').each(function(){ $(this).hover(function(){ $(this).addclass("active"); },function(){ $(this).removeclass("active"); }); if($(this).index()>0 && ($(this).index()+1) % 4==0){ $(this).css("marginright",0); } }) /** * 产品列表分类 */ $('.product-list-class ul').css('width',$('.product-list-class li').length*124+"px"); $('.product-list li').each(function(){ if($(this).index()>0 && ($(this).index()+1) % 4==0){ $(this).css("marginright",0); } }); $('.product-list li').hover(function(){ $(this).find('.hover').show(); },function(){ $(this).find('.hover').hide(); }) $(".team-pic .smallimg ul").css('height',$(".team-pic .smallimg ul li").length*157+"px"); /** * 奋斗足迹 */ $(".history li").hover(function(){ $(this).addclass('active'); },function(){ $(this).removeclass('active'); }) })(jquery); /** * 在线销售qq客服 20160520 start */ function showdiv(thisobjid,thisbgid) { $("#" + thisbgid).css({ display: "block", height: $(document).height(),width: document.body.clientwidth,'margin-left':-((document.body.clientwidth-1180) / 2 + 1180-94) +'px','margin-top':'-50px'}); $("#" + thisobjid ).css("display", "block"); document.documentelement.scrolltop = 0; } function showdiv2(thisobjid,thisbgid) { $("#" + thisbgid).css({display: "block",height: $(document).height(),width: document.body.clientwidth,'margin-left':-((document.body.clientwidth-1180) / 2 + 1180-86) +'px','margin-top':-(document.body.clientheight-256) +'px'}); $("#" + thisobjid ).css("display", "block"); document.documentelement.scrolltop = 0; } function closediv(thisobjid,thisbgid) { $("#" + thisbgid).css("display", "none"); $("#" + thisobjid).css("display", "none"); } /** * 在线销售qq客服 20160520 end */ /** * banner */ jquery(".slidebox").slide( { maincell:".bd ul", effect:"fade",autoplay:true,trigger:"mouseover",easing:"easeoutcirc",delaytime:500,mouseoverstop:true,pnloop:true }); /** *banner下滚动新闻 */ jquery(".index-news").slide( { maincell:".bd ul",autopage:true,effect:"top",autoplay:true,scroll:1,vis:2,easing:"swing",delaytime:500,pnloop:true,trigger:"mouseover",mouseoverstop:true,prevcell:".index-prev",nextcell:".index-next" }); /** *友情链接 */ jquery(".picmarquee-left").slide( { maincell:".bd ul",autoplay:true,effect:"leftmarquee",vis:9,intertime:50,trigger:"click"}); /** * 走进科恩底部 */ jquery(".slidebox2").slide( { maincell:".bd ul", effect:"fade",autoplay:true,trigger:"mouseover",easing:"easeoutcirc",delaytime:500,mouseoverstop:true,pnloop:true,prevcell:".prev",nextcell:".next" }); /** * 团队风采 */ jquery(".team-pic").slide({ titcell: ".smallimg li", maincell: ".bigimg", effect: "fold", autoplay: true, delaytime: 900, intertime:5000, //pnloop: false, startfun: function(i, p) { if (i == 0) { jquery(".team-pic .sprev").click() } else if (i % 3 == 0) { jquery(".team-pic .snext").click() } } }); jquery(".team-pic .smallscroll").slide({ maincell: "ul", delaytime: 300, vis: 3, scroll: 1, effect: "top", autopage: true, prevcell: ".sprev", nextcell: ".snext", pnloop: false }); /*可视柯恩*/ //$("#player li").on('click',function(){ // var inx=$(this).index()+1; // layer.open({ // type: 1, // title: '', // area: ['600px', '410px'], // shadeclose: true, //点击遮罩关闭 // content: $('#players'+inx+'') // }); //}); //日期控件 if(document.getelementbyid("date1")){ !function(){ laydate.skin('danlan');//切换皮肤 }(); laydate({ elem: '#date1', format: 'yyyy-mm-dd', event: 'focus', min: laydate.now(), max: '2999-12-31', istime: true, festival: true, //显示节日 istoday: true }); } /*文化掠影*/ //if(document.getelementbyid("layer-photos")){ // $(".ryzz > li > img").on('click',function(){ // var inx=$(this).parent().index()+1; // layer.open({ // type: 1, // title: '', // area: ['620px', '505px'], // shadeclose: true, //点击遮罩关闭 // content: $('.photos'+inx+''), // success: function(layero, index){ // $('.photos'+inx+' .ad-gallery').adgallery({ // width: "600px", // height: "400px", // slideshow: { // autostart: true // } // }); // // // } // }); // }) //} /*荣誉资质*/ if(document.getelementbyid("ryzz2")){ layer.config({ extend: [ 'extend/layer.ext.js' ], shift: 1 }); layer.ready(function(){ //为了layer.ext.js加载完毕再执行 layer.photos({ photos: '#ryzz2', shift: 0, shadeclose: !1, closebtn: !0 }); }); } //最新职位:弹出一个页面层 $('#zuixin-zhiwei').on('click', function(){ layer.open({ type: 1, title: '', area: ['450px', '400px'], shadeclose: true, //点击遮罩关闭 content: $('#zuixin-layer') }); }); $(document).ready(function(){ /** * 文化掠影 */ $('#layer-photos>li').each(function(){ if($(this).find('span').width() >= 210){ $(this).find('p').css('text-align','left'); } }); }) // 列表页二三级菜单 // jquery(".slidetxtbox").slide({effect:"fold"});