$(document).ready(function() {

	var items = $(".scrollable").scrollable({item: 'a', size: 4}).circular().find("a").overlay({

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

		// optional exposing effect with custom color
		expose: '#111',

		// clicking outside the overlay does not close it
		closeOnClick: false

	// gallery plugin
	}).gallery({
	
		// do not use the same disabled class name as scrollable
		disabledClass: 'inactive',
		
	});
	
	// portfolio hyperlinks
	$('#portfolio_nav').find('a').click(function(){
			
		// grab href from link
		var section = $(this).attr('href');
		
		// cross reference href with thumbnail id to get thumbnail index
		var id = $('.scrollable a').index($(section)[0]);
		
		// scroll to index
		$(".scrollable").scrollable().seekTo(id);
		
		return false;

	});
	
});