$(document).ready(function() { if ($.browser.msie || $.browser.opera) { $(".contentPicWrap, .pushItemContent, .verifyOrderWrap, .thankYouWrap, .cardWrap").each(function() { $(this).append(""); }); } if ($(".userWelcome").length > 0) { $("#userWrap").css("width", "280px").css("left", "677px"); } if ($("body").attr("id") == "homeBody") { $(".pushItemWrap, .homeFeeds").addClass("clearfix"); //$(".subHeading").text("Product Spotlight").prependTo($(".pushItemSub")).show(); //$(".pushItemSub").prepend($(".subHeading")); $(".pushItemContent:eq(2), .pushItemContent:eq(5), .pushItemContent:eq(8)").css("margin-right", "0"); //$("#headlineNav").css("margin-top", (($("#headlineNav").height() / -2) + 10) + "px").show(); $(".headlineText p").each(function() { var elHeight = $(this).height(); if (elHeight < 133) { var space = (134 - elHeight) / 2; $(this).css("margin-top", space + "px"); } }); headlineItems = $("#headlineWrap .headlineContent").hide().size(); $("#headlineWrap .headlineContent:eq(" + currHeadlineItem + ")").show(); $("#headlineNav li:eq(0)").addClass("active"); start_Int(); } $(".sideNavAuto").each(function() { $(this).css("height", ($(this).find(".sideNavContent").height() - 114 + "px")).css("margin-bottom", "145px"); if ($(this).height() < 114) { $(this).css("height", "0px"); } $(this).css("visibility", "visible"); }); $(".sideNavAuto:last").css("margin-bottom", "0"); //add a body class if it is a dealer signup page so we can activate the navlink //this is no longer working in signup.ascx.cs so we do it here until that works again if ($("body").attr("id") == "signUpBody" && $(".formTitle").text().indexOf("Company Information") != -1) { $("body").attr("ID", "myDealerAccountBody"); } if ($("body").attr("id") == "editHeadlineBody") { $(".itemGrid").live("mouseover mouseout", function() { $(".itemGrid tr:lt(5) td").css("background-color", "#FFE6B7"); }); } hoosierItems = $("#hooiserPicWrap .hoosierPic").hide().size(); $("#hooiserPicWrap .hoosierPic:eq(" + currHeadlineItem + ")").show(); start_Hoosier(); }); var headlineItems; var currHeadlineItem = 0; var intVal = ""; function tickHeadline() { $("#headlineWrap .headlineContent:eq(" + currHeadlineItem + ")").fadeOut("slow"); $("#headlineNav li:eq(" + currHeadlineItem + ")").removeClass("active"); currHeadlineItem = ++currHeadlineItem % headlineItems; $("#headlineNav li:eq(" + currHeadlineItem + ")").addClass("active"); $("#headlineWrap .headlineContent:eq(" + currHeadlineItem + ")").fadeIn("slow"); } function setHeadline(newItem) { stop_Int(); $("#headlineWrap .headlineContent:eq(" + currHeadlineItem + ")").hide(); $("#headlineNav li:eq(" + currHeadlineItem + ")").removeClass("active"); currHeadlineItem = newItem; $("#headlineNav li:eq(" + newItem + ")").addClass("active"); $("#headlineWrap .headlineContent:eq(" + currHeadlineItem + ")").show(); start_Int(); } function stop_Int() { if (intVal != "") { clearInterval(intVal); intVal = ""; } } function start_Int() { if (intVal == "") { intVal = setInterval("tickHeadline()", 10000); } else { stop_Int() } } var hoosierItems; var currHoosierItem = 0; var hoosVal = ""; function tickHooiserPic() { $("#hooiserPicWrap .hoosierPic:eq(" + currHoosierItem + ")").fadeOut("slow"); currHoosierItem = ++currHoosierItem % hoosierItems; $("#hooiserPicWrap .hoosierPic:eq(" + currHoosierItem + ")").fadeIn("slow"); } function start_Hoosier() { if (hoosVal == "") { hoosVal = setInterval("tickHooiserPic()", 5000); } else { stop_Hoosier(); } } function stop_Hoosier() { if (hoosVal != "") { clearInterval(hoosVal); hoosVal = ""; } }