﻿/// <reference path="http://ajax.microsoft.com/ajax/jquery/jquery-1.6-vsdoc.js" />

$(function () {
	content.init();
});


var content = function ($) {
	var $scroller,

	setupScroller = function () {
		$scroller = $(".scrollable");

		if (!$scroller.length) return;

		$scroller
			.scrollable({ circular: true, easing: "easeInOutExpo" })
			.navigator(".nav")
			.autoscroll({ autoplay: true, interval: 5000 });

		// when page loads setup keyboard focus on the first horzontal scrollable
		$scroller.eq(0).data("scrollable").focus();
	},

	setupExternalLinks = function () {
		$('a[rel=external]').click(function () { window.open(this.href); return false; });
	},

	init = function () {

		setupScroller();
		setupExternalLinks();

	};

	return { init: init };
} (jQuery);

