/*
* @Author: anchen
* @Date: 2018-06-29 13:34:01
* @Last Modified by: anchen
* @Last Modified time: 2018-07-02 17:05:16
*/
$(document).ready(function() {
var _winw = $(window).width();
if (_winw > 960) {
$('.nav > ul > li').hover(function() {
$(this).addClass('on');
// $('.ul-navlt').each(function(index, el) {
// $(this).find("li").filter(':first').addClass('on');
// });
// $('.ul-navlt > li').hover(function() {
// $(this).addClass('on');
// }, function() {
// $(this).removeClass('on').siblings('li').removeClass('on');
// });
// $('.ul-navlt').mouseleave(function(event) {
// $(this).find('li').eq(0).addClass('on');
// });
}, function() {
$(this).removeClass('on');
});
} else {
$('.nav .v1').click(function() {
$(this).toggleClass('on');
$(this).siblings('.snav-g1').stop().slideToggle();
$(this).parents('li').siblings('li').find('.snav-g1').stop().slideUp();
$(this).parents('li').siblings('li').find('.v1').removeClass('on');
return false;
});
$('.ul-navlt .v2').click(function() {
$(this).toggleClass('on');
$(this).siblings('.snav-con').stop().slideToggle();
$(this).parents('li').siblings('li').find('.snav-con').stop().slideUp();
$(this).parents('li').siblings('li').find('.v2').removeClass('on');
return false;
});
}
$('.menuBtn').append('');
$('.menuBtn').click(function(event) {
$('.nav').stop().slideToggle();
$(this).toggleClass('open');
var _winw = $(window).width();
var _winh = $(window).height();
if ($(this).hasClass('open')) {
$('body').addClass('open');
} else {
$('body').removeClass('open');
}
});
$('.snav li > a').click(function(event) {
$(this).parents('li').stop().toggleClass('on');
$(this).siblings('dl').stop().slideToggle();
$(this).parents('li').siblings('li').removeClass('on').find('dl').slideUp();
});
// $(window).scroll(function() {
// if($(window).scrollTop() >= 100){
// $(".snav").addClass('on');
// }else{
// $(".snav").removeClass('on');
// }
// });
// $(window).scroll(function () {
// var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
// var documentheight = parseFloat($(document).height());
// if (documentheight - totalheight < 200) {
// $('.ul-slidenav').addClass('sl_f');
// }else{
// $('.ul-slidenav').removeClass('sl_f');
// }
// });
$('.fd-txt .btn,.list-h1 .contact .item2.msg').click(function(event) {
/* Act on the event */
$('.sl-pop').fadeIn();
event.stopPropagation();
});
$('.sl-pop .box').click(function(event) {
event.stopPropagation();
});
$('body').click(function(event) {
$('.sl-pop').fadeOut();
});
$('.box-inp .a1').click(function(event) {
$(this).hide().siblings('.hd-so').show().animate({
width: '180px'
}, 600);
});
// gotop
$(".js-top").click(function() {
$("html,body").animate({
scrollTop: 0
}, 500);
});
$('.sl-pop .close').click(function(event) {
$('.sl-pop').fadeOut();
});
window._bd_share_config = {
"common": {
"bdSnsKey": {},
"bdText": "",
"bdMini": "2",
"bdMiniList": false,
"bdPic": "",
"bdStyle": "0",
"bdSize": "16"
},
"share": {}
};
with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
});