$(function() {	
	$("div.scrollable").scrollable({
		size: 3
	});
	
	/*
	adjust the position of the navigational components (carousel) 
	by increasing the left margin of the prev link
	
	margin for prev link =  ( {width of the viewer} - {total width of navigation} ) / 2
	total width of navigation = {width of the navigation} + ( {width of prev link} * 2 ) + ( {margin from prev link} * 2 )
	*/
	var photo_viewer_width = 442;
	var navi_width = (photo_viewer_width - ($("div.navi").width() + ($("a.next, a.nextPage").width() * 2) + (17 * 2) ) )/2;	
	
	//IE-6 fix
	if ( (jQuery.browser.msie && jQuery.browser.version < 7)) { 
		//navi_width -= 60; //adjust the margin
		
		navi_width -= navi_width/2;

	}
	
	$("a.prev, a.prevPage").css({marginLeft: navi_width});
		
	//disable the next link if the # of images (in items) is equal OR less than the # of visible elements on the scroll bar
	if($("div.items div").size() <= 3) { $("a.next, a.nextPage").addClass("disabled"); }		
	
	
});
