$(document).ready(function() {
  $(function() {
    
    function timedCount(current)
    {
      current = current;
      if(current >= 10) {
        var current = 0;
      }
      $(".hots").hide();
		$(".hot" + current).show();
      t = setTimeout(function() {timedCount(current+1);},7000);

    }
    t=setTimeout(function() {timedCount(1);},7000);    
    
    $(".hotselection a").click(function(e) {
      var what = $(this).html()-1;
      $(".hots").hide();

		$(".hot" + what).show();
        clearTimeout(t);

      t = setTimeout(function() {timedCount(what+1);},7000);
      return false;
    });
    
    $(".switch a").click(function(e) {
      $(".top5items").hide();
      $(".switch a").removeClass("selected");
      $(this).addClass("selected");
      var what = $(this).attr("rel");
      $(".top5item" + what).show();
      return false;
    });

    $(".switch2 a").click(function(e) {
      $(".top5items2").hide();
      $(".switch2 a").removeClass("selected");
      $(this).addClass("selected");
      var what = $(this).attr("rel");
      $(".top5item2" + what).show();
      return false;
    });

    $(".switch3 a").click(function(e) {
      $(".top5items3").hide();
      $(".switch3 a").removeClass("selected");
      $(this).addClass("selected");
      var what = $(this).attr("rel");
      $(".top5item3" + what).show();
      return false;
    });

  })
})