function adjust_banner_buttons() { var buttons = $(".kmsprefix_banner_button"); if (!buttons) return; var width = $(window).width(); if (width > 1500) { buttons.css("right", (width - 1500) / 2 + 10 + "px"); } else { buttons.css("right", "10px"); } } $('.nav_list').hover( function () { var $this = $(this), w = $this.width(), tid = $this.data('tid') || 0; cleartimeout(tid); $this.find('.down_ul').width(w).show(); }, function () { var $this = $(this); var tid = settimeout(function () { $this.find('.down_ul').hide(); }, 350); $this.data('tid', tid); } ); $(document).ready(function () { $(window).resize(function () { adjust_banner_buttons(); }); $("#banner").kinmaxshow({ height: 450 }); adjust_banner_buttons(); $(".block-top-content").each(function () { $(this).find("span").css("font-size", "12px"); $(this).find("img").attr("width", "180").attr("width", "120"); $(this).find("p").css("font-size", "12px"); $(this).find("div").css("font-size", "12px"); $(this).find("font").css("font-size", "12px"); }); $(".block-top-single-content").each(function () { $(this).find("span").css("font-size", "12px"); $(this).find("p").css("font-size", "12px"); $(this).find("div").css("font-size", "12px"); $(this).find("font").css("font-size", "12px"); }); $(".tabmenu li").hover(function () { var $this = $(this), $lilist = $(".tabmenu li"), $contlist = $(".news_list"), num = $this.attr("datanum"); $lilist.removeclass("on"); $this.addclass("on"); $contlist.hide(); $("#tabbox" + num).show(); }); $(".p_tabmenu li").hover( function () { var $this = $(this), $lilist = $(".p_tabmenu li"), $contlist = $(".itempic"), num = $this.attr("datanum"); $lilist.removeclass("on"); $this.addclass("on"); $contlist.hide(); $("#product_item" + num).show(); } ); $("#area").change(function () { if ($("#area").val() == "china") { location.href = "/market"; } else if ($("#area").val() == "anhui") { location.href = "/market/anhui"; } }); for (var i = 1; i < 7; ++i) { $("#product_item" + i).jcarousellite({ btnnext: ".next" + i, btnprev: ".previous" + i, visible: 4, circular: false }); } });