var itlxt = {
proban: function(obj) {
var bigid = obj + ' .big .swiper-container';
var smallid = obj + ' .small .swiper-container';
var pagenum = 4;
$(smallid + ' .swiper-slide').eq(0).addclass('active-nav');
var bigsw = new swiper(bigid, {
simulatetouch: false,
});
var smallsw = new swiper(smallid, {
simulatetouch: false,
slidesperview: pagenum,
spacebetween: 6,
navigation: {
nextel: '.arrow-right',
prevel: '.arrow-left',
},
});
$(obj + ' .arrow-left').on('click', function(e) {
e.preventdefault();
smallsw.slideprev();
});
$(obj + ' .arrow-right').on('click', function(e) {
e.preventdefault();
smallsw.slidenext();
});
$(smallid + ' .swiper-slide').each(function(index) {
$(this).click(function() {
$(this).addclass('active-nav').siblings().removeclass('active-nav');
bigsw.slideto(index, 0, false);
});
});
},
picfd: function(obj) {
$(obj).click(function() {
var dqpic = $(this).find('img').attr("src");
var html = '';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
$("body").append(html);
$('.tan_pic').click(function() {
$('.tan_pic').remove();
});
return false;
});
}
};
$(function() {
// backtop
$('.backtop').fadeout();
$(window).scroll(function() {
if ($(this).scrolltop() != 0) {
$('.backtop').fadein();
} else {
$('.backtop').fadeout();
}
});
$('.backtop').click(function() {
$('html,body').animate({ 'scrolltop': 0 }, 500);
});
// nav
$('nav li').each(function(index) {
$(this).hover(function() {
if ($(this).find(".sub a").size() != 0) {
$(this).find(".sub").filter(":not(:animated)").slidedown(150);
};
}, function() {
$(this).find(".sub").slideup(100);
});
});
// banner
var banner = new swiper('.banner', {
loop: true,
autoheight: true,
autoplay: {
delay: 5000,
disableoninteraction: false,
},
pagination: {
el: '.banner_num',
clickable: true,
},
navigation: {
nextel: '.banner_next',
prevel: '.banner_prev',
}
});
// in_gsry
jquery(".in_gsry").slide({ maincell: ".xun", titcell: ".tab li", effect: "fold" });
// in_news
jquery(".in_news .gund").slide({ maincell: "ul", autoplay: true, effect: "topmarquee", vis: 3, intertime: 50, trigger: "click" });
jquery(".in_news .boxbig").slide({ maincell: ".xun", titcell: ".tit span", targetcell: ".tit a", effect: "fold", delaytime: 200 });
// in_pro
jquery(".in_pro").slide({ maincell: ".xun", titcell: ".tab li", targetcell: ".more", delaytime: 200 });
});
// 鍔犲叆鏀惰棌
function addfavorite(surl, stitle) { try { window.external.addfavorite(surl, stitle); } catch (e) { try { window.sidebar.addpanel(stitle, surl, ""); } catch (e) { alert("鍔犲叆鏀惰棌澶辫触锛岃浣跨敤ctrl+d杩涜娣诲姞"); } } }
// searchjs
function searchjs() {
if ($("#search_inp").val() == '') {
alert("鎼滅储鍏抽敭璇嶄笉鑳戒负绌猴紒");
$("#search_inp").focus();
return false;
};
};
// messdd
function messdd() {
if ($("#messdd_name").val() == '') {
alert("鑱旂郴浜轰笉鑳戒负绌猴紒");
$("#messdd_name").focus();
return false;
};
if ($("#messdd_tel").val() == '') {
alert("鎵嬫満鍙风爜涓嶈兘涓虹┖锛?);
$("#messdd_tel").focus();
return false;
};
if (!$("#messdd_tel").val().match(/^1(3|4|5|7|8)\d{9}$/i)) {
alert("璇锋纭~鍐欐墜鏈哄彿");
$("#messdd_tel").focus();
return false;
}
if ($("#messdd_body").val() == '') {
alert("璇︽儏鍐呭涓嶈兘涓虹┖锛?);
$("#messdd_body").focus();
return false;
};
if ($("#messdd_body").val() == '') {
alert("璇︽儏鍐呭涓嶈兘涓虹┖锛?);
$("#messdd_body").focus();
return false;
};
if ($("#messdd_code").val() == '') {
alert("楠岃瘉鐮佷笉鑳戒负绌猴紒");
$("#messdd_code").focus();
return false;
};
};