$(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("