var ids = null; var next = true; var stepNum = 1; var picTime = null; var opacityNum = 0; //var makerShow = var makerShow = function () { clearTimeout(picTime); $(".pages span").removeClass("span_hover") $(".pages span[ids=" + (stepNum - 1) + "]").addClass("span_hover"); if (opacityNum == 0) { opacityNum = 1; } else { opacityNum = 0; } $(".makerShow").css("backgroundImage", "url('kximage/picIndex" + stepNum + ".png')"); $(".makerShow .step").fadeIn("slow", function () { stepNum++; if (stepNum > 3) { stepNum = 1; picTime = setTimeout(function () { if (next) { makerShow() } }, 2000); } if(next){ picTime=setTimeout(function(){ if(next){ makerShow() } },2000); } }); makerShow(); $(".pages span").mouseover(function () { next = false; ids = $(this).attr("ids"); $(".makerShow .step").stop().css({ "backgroundPosition": "" + (-1150 * (ids)) }); $(".pages span").removeClass("span_hover") $(this).addClass("span_hover"); if (parseInt(ids) == 0 && (stepNum == 1 || stepNum == 4)) { } else if (parseInt(ids) == 1 && stepNum == 2) { } else if (parseInt(ids) == 2 && stepNum == 3) { } else { stepNum = parseInt(ids) + 1; } makerShow(); }).mouseout(function () { next = true; $(".makerShow .step").stop(); setTimeout(function () { if (next) { makerShow(); } }, 2000); }); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //var makerShow = function () { // clearTimeout(picTime); // $(".pages span").removeClass("span_hover") // $(".pages span[ids=" + (stepNum - 1) + "]").addClass("span_hover"); // if (opacityNum == 0) { // opacityNum = 1; // } else { // opacityNum = 0; // } // $(".makerShow").css("backgroundImage", "url('kximage/picIndex" + stepNum + ".png')"); // // // // $(".makerShow .step").stop().animate({ // opacity: 1 // }, 1000, function () { // stepNum++; // if (stepNum > 3) { // stepNum = 1; // picTime = setTimeout(function () { // if (next) { // makerShow() // } // }, 2000); // } // if (next) { // picTime = setTimeout(function () { // if (next) { // makerShow() // } // }, 2000); // } // }); //} //makerShow(); //$(".pages span").mouseover(function () { // next = false; // ids = $(this).attr("ids"); // $(".makerShow .step").stop().css({ "backgroundPosition": "" + (-1150 * (ids)) }); // $(".pages span").removeClass("span_hover") // $(this).addClass("span_hover"); // if (parseInt(ids) == 0 && (stepNum == 1 || stepNum == 4)) { // } else if (parseInt(ids) == 1 && stepNum == 2) { // } else if (parseInt(ids) == 2 && stepNum == 3) { // } else { // stepNum = parseInt(ids) + 1; // } // makerShow(); //}).mouseout(function () { // next = true; // $(".makerShow .step").stop(); // setTimeout(function () { // if (next) { // makerShow(); // } // }, 2000); //}); window.nextPic = false; var options = []; var time3 = null; var runPic = function (i, isNext) { if (i == options.length) { i = 0; } $("#m_MinImg1,#m_MinImg2,#m_MinImg21,#m_MinImg3,#m_MinImg31,#m_MinImg32,#m_MinImg33,#m_MinImg34").css("z-index", "99"); $("#" + options[i]).show(); $("#" + options[i]).animate({ opacity: 1, "z-index": 100 }, 1, function () { }); if (time3) clearTimeout(time3); if (isNext) { i++; time3 = setTimeout(function () { if (isNext) { runPic(i, isNext); } }, 3000); } } window.nextTime = true; $(".m_Min,.m_right").mouseover(function () { if (window.nextTime) { clearTimeout(time3); var ids = $(this).attr("ids"); if (ids == 0) { $("#m_MinDiv1").hide(); $("#m_MinImg1").show(); $("#m_MinImg1").animate({ opacity: 1, "z-index": 100 }, 500); } else if (ids == 1) { $("#m_MinImg2,#m_MinImg21").show(); $("#m_MinDiv2").hide(); clearTimeout(time3); options = ["m_MinImg2", "m_MinImg21"]; runPic(0, true); } else if (ids == 2) { $(".s1").show(); $("#m_MinDiv3").hide(); clearTimeout(time3); options = ["m_MinImg3", "m_MinImg31", "m_MinImg32", "m_MinImg33", "m_MinImg34"]; runPic(0, true); $(".m_right>.step3").css("z-index", "110"); $(".m_right>.step3").show(); } } }).mouseout(function () { clearTimeout(time3); $("#m_MinDiv1,#m_MinDiv2,#m_MinDiv3").show(); $("#m_MinImg1,#m_MinImg2,#m_MinImg21,#m_MinImg3,#m_MinImg31,#m_MinImg32,#m_MinImg33,#m_MinImg34").css("z-index", "99"); }); $(".s1").mouseover(function () { window.nextTime = false; clearTimeout(time3); var ids = $(this).attr("ids"); runPic(ids, false); }).mouseout(function () { window.nextTime = true; }); var menu = ["KXIndex.aspx", "KXIndex.aspx", "KXDownload.aspx", "KXPhone.aspx", "KXFlowSoft.aspx", "KXHoldAll.aspx", "KXSecurity.aspx","regi.aspx"]; $(".header a,.header>img,.floor_line a, .tools img, .tools a,.customer a,#zhulucontent ul li a,.care ul li a").click(function () { var ids = $(this).attr("ids"); //attr:属性。 if (ids == 6) { // window.open(menu[ids], "ads"); location.href = ("regi.aspx"); } else if (ids == 7) { location.href = "#"; //试用中心的链接后续再补。+ } else if (ids == 8) { window.open("http://bbs.shuat.com/", "ads"); } else if (ids == 9) { location.href = "KXHepl.aspx"; //在当前浏览的页面打开新的链接。 } else if (ids == 10) { $("#hidIframe").attr("src", 'http://b.qq.com/webc.htm?new=0&sid=4008388029&eid=218808P8z8p8p8R8y8Q8R&o=www.shuat.com&q=7&ref=' + document.location); //document.location:当前页的url。 } else { location.href = menu[ids] + location.search; } }); var mp3Info = [{ hr: "1、发布流量任务视频教程", span: "", label: "说明:10分钟视频介绍让亲快速了解KX电商平台,建议新手亲,务必要认真看完哦。(温馨提示:如不能正常播放,请复制链接用其它浏览器打开播放)" }, { hr: "2、发销量任务视频教程", span: "", label: "说明:10分钟视频介绍让亲快速了解KX电商平台,建议新手亲,务必要认真看完哦。(温馨提示:如不能正常播放,请复制链接用其它浏览器打开播放)" }, { hr: "3、接销量任务视频教程", span: "", label: "说明:10分钟视频介绍让亲快速了解KX电商平台,建议新手亲,务必要认真看完哦。 (温馨提示:如不能正常播放,请复制链接用其它浏览器打开播放)"}]; $(".mp3 a").click(function () { if ($(this).attr("ids")) { flashPlayer("http://112.124.119.39:8990/mp3/sp" + $(this).attr("ids") + ".mp4", 950, 400); $(".mp3 a").removeClass("a_selected"); $(this).addClass("a_selected"); var info = $(".hepl_bg .hepl_content"); info.find("label")[0].innerText = mp3Info[$(this).attr("ids")].hr; info.find("span[ids=0]")[0].innerText = mp3Info[$(this).attr("ids")].span; info.find("span[ids=1]")[0].innerHTML = mp3Info[$(this).attr("ids")].label; } }); $("#mp3_left,#mp3_right").click(function () { var ids = $(this).attr("ids"); if (ids == "l") { if ($(".a_selected")[0].previousElementSibling) $(".a_selected")[0].previousElementSibling.click(); } else if (ids == "r") { if ($(".a_selected")[0].nextElementSibling) $(".a_selected")[0].nextElementSibling.click(); } }); $(".btn_left_bottom .search,.btn_left_bottom .train").click(function () { var className = $(this).attr("class"); var ids = $(this).attr("ids"); if (className == "train") { $(".btn_left_bottom .search").css({ "color": "#FFFFFF", "backgroundColor": "#2fbf64" }); $(".FS_makerShow").css("background-image", "url('kximage/FS_slideshow2.png')"); } else if (className == "search"){ $(".btn_left_bottom .train").css({ "color": "#FFFFFF", "backgroundColor": "#2fbf64" }); $(".FS_makerShow").css("background-image", "url('kximage/FS_slideshow1.png')"); } $(this).css({ "color": "#2fbf64", "backgroundColor": "transparent" }); $(".btn_left_right").hide(); $(".btn_left_right[ids=" + ids + "]").show(); }); $(".btn_left_bottom .detection,.btn_left_bottom .buyller,.btn_left_bottom .seller,.HA_makerShow #1,.HA_makerShow #2,.HA_makerShow #3").click(function () { var className = $(this).attr("class"); var ids = $(this).attr("ids"); if (className == "detection") { $(".btn_left_bottom .buyller,.btn_left_bottom .seller").css({ "color": "#FFFFFF", "backgroundColor": "#a06236" }); $(".HA_makerShow").css("background-image", "url('kximage/HA_d1.png')"); } else if (className == "buyller") { $(".btn_left_bottom .detection,.btn_left_bottom .seller").css({ "color": "#FFFFFF", "backgroundColor": "#a06236" }); $(".HA_makerShow").css("background-image", "url('kximage/HA_d2.png')"); } else if (className == "seller") { $(".btn_left_bottom .detection,.btn_left_bottom .buyller").css({ "color": "#FFFFFF", "backgroundColor": "#a06236" }); $(".HA_makerShow").css("background-image", "url('kximage/HA_d3.png')"); } $(this).css({ "color": "#a06236", "backgroundColor": "transparent" }); $(".btn_left_right").hide(); $(".btn_left_right[ids=" + ids + "]").show(); });