/* *小兵CMS MR. WANG */ //导航下拉菜单 $(function(){ $(".navgation>li").hover(function(){ $(this).find(".line").stop().fadeIn(); $(this).find(".sub_menu").stop().slideDown(300); //$(this).find(".line").animate({ width:"160px",left:"-10px"}); $(this).find("a").eq(0).addClass("on"); },function(){ $(this).find(".sub_menu").stop().slideUp(); $(this).find("a").eq(0).removeClass("on"); //$(this).find(".line").animate({ width:"140",left:0}); $(this).find(".line").fadeOut(); }) //alert( $('.flicker-example').length) $('.flicker-example').flicker();//slide }) //内页左导航控制 $(document).ready(function(){ $(".parent_list>li").click(function(){ $(this).parent().siblings().find(">li").removeClass("on");//重置 $(this).parent().siblings().find(">li i").removeClass("j_t_2"); $(this).addClass("on"); $(this).parent().siblings("ul").find("ul").slideUp() $(this).siblings("ul").slideToggle(); $(this).find("i").toggleClass("j_t_2"); }) var $quickNav = $("#quickNav"); if($quickNav.size()){ //alert() for(i=0;i<$quickNav.find("li").size();i++){ $quickNav.find("li").eq(i).find("a i").addClass("ico-"+(i+1)); } } }) //index slide // JavaScript Document // 说明 :用 Javascript 实现锚点(Anchor)间平滑跳转 // 转换为数字 function intval(v) { v = parseInt(v); return isNaN(v) ? 0 : v; } // 获取元素信息 function getPos(e) { var l = 0; var t = 0; var w = intval(e.style.width); var h = intval(e.style.height); var wb = e.offsetWidth; var hb = e.offsetHeight; while (e.offsetParent){ l += e.offsetLeft + (e.currentStyle?intval(e.currentStyle.borderLeftWidth):0); t += e.offsetTop + (e.currentStyle?intval(e.currentStyle.borderTopWidth):0); e = e.offsetParent; } l += e.offsetLeft + (e.currentStyle?intval(e.currentStyle.borderLeftWidth):0); t += e.offsetTop + (e.currentStyle?intval(e.currentStyle.borderTopWidth):0); return {x:l, y:t, w:w, h:h, wb:wb, hb:hb}; } // 获取滚动条信息 function getScroll() { var t, l, w, h; if (document.documentElement && document.documentElement.scrollTop) { t = document.documentElement.scrollTop; l = document.documentElement.scrollLeft; w = document.documentElement.scrollWidth; h = document.documentElement.scrollHeight; } else if (document.body) { t = document.body.scrollTop; l = document.body.scrollLeft; w = document.body.scrollWidth; h = document.body.scrollHeight; } return { t: t, l: l, w: w, h: h }; } // 锚点(Anchor)间平滑跳转 function scroller(el, duration) { if(typeof el != 'object') { el = document.getElementById(el); } if(!el) return; var z = this; z.el = el; z.p = getPos(el); z.s = getScroll(); z.clear = function(){window.clearInterval(z.timer);z.timer=null}; z.t=(new Date).getTime(); z.step = function(){ var t = (new Date).getTime(); var p = (t - z.t) / duration; if (t >= duration + z.t) { z.clear(); window.setTimeout(function(){z.scroll(z.p.y, z.p.x)},13); } else { st = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.p.y-z.s.t) + z.s.t; sl = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.p.x-z.s.l) + z.s.l; z.scroll(st, sl); } }; z.scroll = function (t, l){window.scrollTo(l, t)}; z.timer = window.setInterval(function(){z.step();},13); } $(function(){ /*tab标签切换*/ function tabs_items(tabTit,on,tabCon){ $(tabCon).each(function(){ $(this).children().eq(0).show(); }); $(tabTit).each(function(){ $(this).children().eq(0).addClass(on); }); $(tabTit).children().hover(function(){ $(this).addClass(on).siblings().removeClass(on); var index = $(tabTit).children().index(this); $(tabCon).children().eq(index).show().siblings().hide(); }); } //tabs_items(".parameter","on",".parameter_con");//产品参数tab //tabs_items(".cate","active",".cate-style");//首页分类tab }) $(function(){ if($(".cate-style li").length) $(".cate-style li").find('img').zoomImgRollover(); if($(".case-style li").length) $(".case-style li").find('img').zoomImgRollover(); if($(".pro_list li").length) $(".pro_list li").find('img').zoomImgRollover(); if($(".case_list li").length) $(".case_list li").find('img').zoomImgRollover(); if($(".honor_list li").length) $(".honor_list li").find('img').zoomImgRollover(); if($(".team_list li").length) $(".team_list li").find('img').zoomImgRollover(); }) //首页产品分类控制 $(function(){ $('.productcate_list li').hover(function(){ $(this).find("i").stop().animate({"top":"20px"}) $(this).find("img").stop().fadeIn(600); //$(this).find("img").stop().fadeIn(600).rotate3Di('flip', 250) },function(){ $(this).find("i").stop().animate({"top":"62px"}) $(this).find("img").stop().fadeOut(300); //$(this).find("img").stop().fadeOut(600).rotate3Di('unflip', 500); }) }) //首页滚动控制 window.onload = function(){ scrollNotice = new ScrollPic(); scrollNotice.scrollContId = "notice_w"; //图片容器ID scrollNotice.arrLeftId = "notice_l"; //左按钮ID scrollNotice.arrRightId = "notice_r"; //右按钮ID scrollNotice.frameWidth = 375; //图片容器宽度 scrollNotice.pageWidth = 375; //每张图片宽度 scrollNotice.speed = 5; //移动速度(单位毫秒,越小越快) scrollNotice.space = 20; //每次移动像素(单位px,越大越快) scrollNotice.autoPlay = true; //自动播放 scrollNotice.autoPlayTime = 3; //自动播放间隔时间(秒) scrollNotice.initialize(); //初始化  //滚动控制 scrollPic_01 = new ScrollPic(); scrollPic_01.scrollContId = "partnerlist"; //图片容器ID scrollPic_01.arrLeftId = "prevBtn"; //左按钮ID scrollPic_01.arrRightId = "nextBtn"; //右按钮ID scrollPic_01.frameWidth = 920; //图片容器宽度 scrollPic_01.pageWidth = 151; //每张图片宽度 scrollPic_01.speed = 5; //移动速度(单位毫秒,越小越快) scrollPic_01.space = 20; //每次移动像素(单位px,越大越快) scrollPic_01.autoPlay = true; //自动播放 scrollPic_01.autoPlayTime = 3; //自动播放间隔时间(秒) scrollPic_01.initialize(); //初始化 }