$(document).ready(function(){

 $("div#homenews").load("_includes/init/pingSpotlightNews.cfm", function() { $("ul#rotator1 li:first-child").fadeIn("slow"); });
 $("div#homeevents").load("_includes/init/pingSpotlightEvent.cfm", function() { $("ul#rotator2 li:first-child").fadeIn("slow"); });
 $("div#homewebinars").load("_includes/init/pingSpotlightWebinar.cfm", function() { $("ul#rotator3 li:first-child").fadeIn("slow"); });
// $("ul#rotator3 li:first-child").fadeIn("slow");
 setInterval("rotateSpotlights()",10000);
 
});

function rotateSpotlights() {
  var isIE = navigator.appVersion.indexOf("MSIE");
  var arVersion = navigator.appVersion.split("MSIE");
  var version = parseFloat(arVersion[1]);

  if ((isIE == -1) || ((isIE > 1) && (version >= 7))) {
    $("#rotator1 li:eq("+rotator1current+")").hide();
    $("#rotator2 li:eq("+rotator2current+")").hide();
    $("#rotator3 li:eq("+rotator3current+")").hide();
    rotator1current = rotator1current + 1;
    rotator2current = rotator2current + 1;
    rotator3current = rotator3current + 1;
    if (rotator1current >= $("#rotator1").children().length) { rotator1current = 0;  }
    if (rotator2current >= $("#rotator2").children().length) { rotator2current = 0;  }
    if (rotator3current >= $("#rotator3").children().length) { rotator3current = 0;  }
    $("#rotator1 li:eq("+rotator1current+")").fadeIn("slow");
    $("#rotator2 li:eq("+rotator2current+")").fadeIn("slow");
    $("#rotator3 li:eq("+rotator3current+")").fadeIn("slow");
  }
}

