$(document).ready(function() {

// horizontal scrollables. each one is circular and has its own navigator instance
var horizontal = $(".scrollable").scrollable({ circular: true }).navigator(".navi").autoscroll({autoplay: true,interval: 12000, steps: 1 });
jQuery('#main_navi').jcarousel({
		scroll: 1
    });

// main vertical scroll
var root = $("#main").scrollable({

	// basic settings
	vertical: true,
	
	keyboard: false,
	onBeforeSeek: function(event, i) {
			$("#main_navi a").removeClass("active");
			$("#main_navi li").eq(i).find("a").addClass("active");
			horizontal.eq(i).data("scrollable").seekTo(0);
	},
	
	onSeek: function(event, i) {
		
	}
	
}).navigator("#main_navi");


$(".page").hover(
	function () {
		$('.mainPhotoCaption').fadeIn('fast');
	},
	function () {
		$(".mainPhotoCaption").fadeOut('fast');
	}
);


$("#main_navi li:first a").addClass("active");
$(".btnContainer a").click(function() {
	var address = $(this).attr("href");
	window.open(address,'_self');
	return false;
});
	
});


