//菜单导航
$(document).ready(function() {
/*Jquery Mmenu*/
$("#menu").mmenu({
"extensions": [
"effect-menu-slide",
"effect-listitems-slide",
"pagedim-black"
],
"offCanvas": {
position: "right"
}
}).css("opacity", "1");
});
$('*').unbind('mouseenter').unbind('mouseleave');
$(function () {
$("img").each(function () {
if ($(this).attr("src").length == 0 || $(this).attr("src").toLowerCase().indexOf("nopic") != -1) {
$(this).attr("src", "zanwu.png"/*tpa=http://www.slgzsb.com/UpLoadFile/zanwu.png*/).removeAttr("height").removeAttr("width").removeAttr("style");
return true;
}
})
});
/*ie判断*/
function iePrompt() {
function createMent() {
var promptMent = "
";
$("body").append(promptMent);
$(".prompt").slideDown("slow");
$(".prompt_close,.prompt").click(function () {
$(".prompt").slideUp('300');
})
}
if (navigator.appName == "Microsoft Internet Explorer") {
var browser = navigator.appName
var b_version = navigator.appVersion
var version = b_version.split(";");
var trim_Version = version[1].replace(/[ ]/g, "");
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") {
createMent();
}
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") {
createMent();
}
else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE8.0") {
createMent();
}
}
}
iePrompt();
$('.home-about .home-bottom .left .item:odd').addClass("odd");
$('.about2 ul li:even').addClass("even");
$('.home-news .home-bottom .right ul li:last-child').css('margin-bottom','0');
$('.header .nav ul li .subnav1 dl dd:last-child').addClass('last');
$(function(){
//产品选项卡
$(".home-product .home-bottom ul li").eq(0).addClass("sel");
$(".home-product .home-bottom .list-show .list-info").eq(0).show();
$(".home-product .home-bottom ul li").hover(function(){
$(this).addClass("sel").siblings().removeClass("sel");
var _this = $(".home-product .home-bottom ul li").index(this);
$(".home-product .home-bottom .list-show .list-info").eq(_this).show().siblings().hide();
});
})
$(function () {
$('.dianji').click(function (e) {
dropSwift($(this), '.xiala');
e.stopPropagation();
});
function dropSwift(dom, drop) {
dom.next().slideToggle();
dom.parent().siblings().find('.icon').removeClass('iconRotate');
dom.parent().siblings().find(drop).slideUp();
var iconChevron = dom.find('.icon');
if (iconChevron.hasClass('iconRotate')) {
iconChevron.removeClass('iconRotate');
} else {
iconChevron.addClass('iconRotate');
}
}
})
// search
$(document).ready(function () {
$(function () {
$("#search").click(function (e) {
e.stopPropagation();
})
$("#search1").click(function (e) {
e.stopPropagation();
})
$("#search-closed").click(function () {
$("#search-main").stop().slideUp({
duration: 300,
easing: "swing"
})
$("#search-btn").removeClass("active");
})
$("#search-closed1").click(function () {
$("#search-main1").stop().slideUp({
duration: 300,
easing: "swing"
})
$("#search-btn1").removeClass("active");
})
$("#search-btn1").click(function (e) {
e.stopPropagation();
$(this).toggleClass("active");
$("#search-main1").stop().slideToggle({
duration: 500,
// easing: "easeOutElastic"
})
})
$("#search-btn").click(function (e) {
e.stopPropagation();
$(this).toggleClass("active");
$("#search-main").stop().slideToggle({
duration: 500,
// easing: "easeOutElastic"
})
})
$(".search-type").click(function (e) {
e.stopPropagation();
$("#search-type-chose").stop().slideToggle({
duration: 800,
// easing: "easeOutElastic"
})
})
$("#search-type-chose li").click(function () {
$(this).addClass("active").siblings().removeClass("active");
$("#search-type-this").text($(this).html());
$(this).parent().stop().hide();
$("#search-text").focus();
})
//
$(document).on("click", function () {
$("#search-type-chose,#search-main").hide();
$("#search-btn").removeClass("active");
});
})
});
$('.home-app .home-bottom .app-info .left li:odd').addClass('odd');
$('.history .history-info ul li:even').addClass('even');
$('.history .history-info ul li:odd').addClass('odd');
$(function(){
//产品选项卡
$(".home-app .home-bottom .app-info .left li").eq(0).addClass("sel");
$(".home-app .home-bottom .app-info .right .info").eq(0).show();
$(".home-app .home-bottom .app-info .left li").hover(function(){
$(this).addClass("sel").siblings().removeClass("sel");
var _this = $(".home-app .home-bottom .app-info .left li").index(this);
$(".home-app .home-bottom .app-info .right .info").eq(_this).show().siblings().hide();
});
})
$(function(){
//产品选项卡
$(".home-news .home-bottom .left .top ul li").eq(0).addClass("sel");
$(".home-news .home-bottom .left .show .info").eq(0).show();
$(".home-news .home-bottom .left .top ul li").hover(function(){
$(this).addClass("sel").siblings().removeClass("sel");
var _this = $(".home-news .home-bottom .left .top ul li").index(this);
$(".home-news .home-bottom .left .show .info").eq(_this).show().siblings().hide();
});
})
$(".btn_srh").click(function () {
if ($.trim($(".inp_srh").val()) == "" || $.trim($(".inp_srh").val()) == "输入您要搜索的关键字") {
layer.msg("请输入搜索关键词")
$(".inp_srh").focus();
return false;
} else {
window.location.href = "search.shtml-keyword=.htm"/*tpa=http://www.slgzsb.com/search.shtml?keyword=*/ + escape($.trim($(".inp_srh").val()));
}
})
$(".inp_srh").keydown(function (event) {
if (event.keyCode == 13) {
$(".btn_srh").click();
}
})