﻿var hCarousel;

jQuery.noConflict();

Event.observe(window, "load", function (event)
{
  hCarousel = new UI.Carousel("horizontal_carousel", { scrollInc: 4 });

  new PeriodicalExecuter(function (pe)
  {
    // We've reached the end, go back to start
    if (hCarousel.currentIndex() === hCarousel.elements.length - 1)
    {
      hCarousel.scrollTo(0);
    }
    else
    {
      hCarousel.scrollTo(hCarousel.currentIndex() + 1);
    }

  }, 5);
});

jQuery(function ($)
{
  $(".tweet").tweet({
    username: "prosoccerkeeper",
    join_text: "auto",
    avatar_size: 32,
    count: 4,
    auto_join_text_default: "we said,",
    auto_join_text_ed: "we",
    auto_join_text_ing: "we were",
    auto_join_text_reply: "we replied to",
    auto_join_text_url: "we were checking out",
    loading_text: "loading tweets..."
  });
});

