var isSupportTouch = $(window).width() <= 1024; var getCirWidth,getCirWidthUl; $(function () { $(".menuPhone").click(function () { if ($(".nav ul").is(":hidden")) { $(".nav ul").slideDown(); } else { $(".nav ul").slideUp(); } }) if ($(".menuPhone").is(":visible")) { $(".nav ul li").click(function () { $(this).find("dl").show(); $(this).siblings().find("dl").hide(); }) } $(".le02_box li").width($(".le02_box").width()); var getRfUl = $(".le02_box ul"); var movePosition = $(".le02_box li:eq(0)").width(); $(".le02_r").click(function () { if (!getRfUl.is(":animated")) { getRfUl.stop().animate({ "left": "-=" + movePosition }, function () { getRfUl.css("left", 0); $(".le02_box ul li:first").appendTo(getRfUl); }); } }) $(".le02_l").click(function () { if (!getRfUl.is(":animated")) { $(".le02_box ul li:last").prependTo(getRfUl); getRfUl.css("left", movePosition * -1); getRfUl.stop().animate({ "left": "+=" + movePosition }); } }) $(".home04_main li").click(function () { if (!$(".home04_main li").is(":animated")) { $(this).stop().animate({ "width": "50%" }); $(this).siblings().stop().animate({ "width": "12.5%" }); $(this).find(".home04_box").fadeIn(); $(this).siblings().find(".home04_box").fadeOut(); $(this).find("h5").fadeOut(); $(this).siblings().find("h5").fadeIn(); } }) try{ $('.banner_list').bxSlider({ auto: true, autoControls: true }); var getbxSize = $(".dev_main_txt > ul > li").size(); for (var i = 0; i < getbxSize; i++) { $('.banner'+i).bxSlider({ auto: false, autoControls: false }); } } catch (e) { } $(".home04_main li img").css({ "width": $(".main").width() * 0.5, "height": $(".main").width() * 0.5 * 0.75 }); $(".home04_box").width($(".home04_main").width()*0.5*0.6); var bookNum = 0; var bookSize = $(".book_bottom_main li").size(); if ($(".header_search_menu").is(":hidden")) { $(".book_box_bottom li").width(($(".book_box_bottom").width() - 80) / 5); } else { $(".book_box_bottom li").width(($(".book_box_bottom").width() - 40) / 3); } $(".book_main_box img").width($(".book_main").width()); var nBook = $(".book_box_bottom li").width() + 20; var nWrap = $(".book_main_box img").width(); $(".book_bottom_l").hide(); $(".book_left_menu").hide(); $(".book_bottom_r,.book_right_menu").click(function () { if (bookNum >= bookSize - 1) { } else { bookNum++; bookFunc(bookNum); } }) $(".book_bottom_l,.book_left_menu").click(function () { if (bookNum <= 0) { } else { bookNum--; bookFunc(bookNum); } }) $(".book_bottom_main li").click(function () { var nIndex = $(".book_bottom_main li").index(this); bookFunc(nIndex); bookNum = nIndex; }) function bookFunc(nIndex) { if ($(".header_search_menu").is(":hidden")) { if (nIndex > 1 && nIndex < bookSize - 2) { $(".book_bottom_main ul").stop().animate({ "left": (nBook * nIndex * -1) + nBook * 2 }); } else if (nIndex <= 1) { $(".book_bottom_main ul").stop().animate({ "left": 0 }); } else if (nIndex >= bookSize - 2) { $(".book_bottom_main ul").stop().animate({ "left": nBook * bookSize * -1 + nBook * 5 }); } } else { if (nIndex > 1 && nIndex < bookSize - 2) { $(".book_bottom_main ul").stop().animate({ "left": (nBook * nIndex * -1) + nBook * 1 }); } else if (nIndex <= 1) { $(".book_bottom_main ul").stop().animate({ "left": 0 }); } else if (nIndex >= bookSize - 2) { $(".book_bottom_main ul").stop().animate({ "left": nBook * bookSize * -1 + nBook * 3 }); } } $(".book_main_box").stop().animate({ "left": nWrap * nIndex * -1 }); $(".book_bottom_main li:eq(" + nIndex + ") span").hide(); $(".book_bottom_main li:eq(" + nIndex + ")").siblings().find("span").show(); if (nIndex == 0) { $(".book_bottom_l").hide(); $(".book_left_menu").hide(); } else if (nIndex == bookSize - 1) { $(".book_bottom_r").hide(); $(".book_right_menu").hide(); } else { $(".book_bottom_l").show(); $(".book_left_menu").show(); $(".book_bottom_r").show(); $(".book_right_menu").show(); } } }) $(function () { imgratio()//初始化图片ratio //窗口改变大小回调ratio; var rtime = new Date(); var timeout = false; var delta = 200; $(window).resize(function () { rtime = new Date(); if (timeout === false) { timeout = true; setTimeout(resizeend, delta); //resize只回调最后一次 } }); function resizeend() { //window.resize回调 if (new Date() - rtime < delta) { setTimeout(resizeend, delta); } else { timeout = false; imgratio()//ratio } } // }) //无图图像 var nullimg = 'images/error.png'; function lod(t) { t.onerror = null; t.src = nullimg } $(function () { $(".ratio-img").each(function () { if ($(this).attr("src") == "") { $(this).attr({ "src": nullimg }) } }) }) function imgratio() {//图片 ratio方法调用 $(".ratio-img").each(function (index, element) { if ($(this).is(":visible")) { $(this).css({ height: Math.floor($(this).width() * $(this).data("ratio")) }); if($(".phone_menu").is(":hidden")){ getCirWidth=$(".star_product_part2_box").width()*0.25; getCirWidthUl=getCirWidth*7; $(".star_product_part2_box ul").width(getCirWidthUl); $(".star_product_part2_box li").width($(".star_product_part2_box").width()*0.25); }else{ getCirWidth=$(".star_product_part2_box").width()*0.5; getCirWidthUl=getCirWidth*7; $(".star_product_part2_box ul").width(getCirWidthUl); $(".star_product_part2_box li").width($(".star_product_part2_box").width()*0.5); } //$(".star_product_part2_box ul").width($(".star_product_part2_box").width()*0.25); } }); } function doPrint() { bdhtml = window.document.body.innerHTML; sprnstr = ""; eprnstr = ""; prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17); prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); OpenWindow = window.open(""); OpenWindow.document.write("