$(document).ready(function(){
	
	$("#key_fact").tooltip({ 
	    position: "bottom left", 
	    opacity: 0.9, 
	});
	
	
	// main vertical scroll
	$("#main").scrollable({
		// basic settings
		vertical: true,
		size: 1,
		clickable: false,
		// up/down keys will always control this scrollable
		keyboard: 'static',
		// assign left/right keys to the actively viewed scrollable
		onSeek: function(event, i) {
			horizontal.scrollable(i).focus();
		}
	// main navigator (thumbnail images)
	}).navigator("#main_navi");
	
	// horizontal scrollables. each one is circular and has its own navigator instance
	var horizontal = $(".scrollable").scrollable({size: 1}).circular().navigator(".navi");

	// when page loads setup keyboard focus on the first horzontal scrollable
	horizontal.eq(0).scrollable().focus();
	
	// select the thumbnails and make them trigger our overlay
	$("#triggers a").overlay({

		// each trigger uses the same overlay with the id "gallery"
		target: '#gallery',

		// optional exposing effect
		expose: '#f1f1f1'

	// let the gallery plugin do its magic!
	}).gallery({

		// the plugin accepts its own set of configuration options
		speed: 800
	});
	
	
});