function showbg(e) { var t = $("#flashs .btn span").index($("#flashs .btn span.cur")); t < 0 && (t = 0), $("#flashs .btn span.cur").css("opacity", .7).removeClass("cur"), $("#flashbg" + t).css({ opacity: 0, "z-index": 1 }), $("#flashbg" + showIndex).css({ "z-index": 2 }), $("#flashbg" + showIndex).animate({ opacity: 1 }, 500), $("#flashs .btn span").eq(showIndex).css("opacity", 1).addClass("cur") } var showIndex = 1, h = $("#flashs div.bgitem").css("opacity", 0).length, btn = "