// Initiate Shadowbox, using preferred behavior
Shadowbox.init({
	handleOversize: 'resize',
	viewportPadding: 40,
	continuous: true,
	counterType: 'skip',
	language: js_language,
	players: ['img', 'html', 'swf'],
	onOpen: function(galleryElement)
	{
		
		$("#sb-wrapper-inner").unbind('click');
		
		if (Shadowbox.gallery.length > 1)
			$("#sb-wrapper-inner").css('cursor', 'pointer');
		else
			$("#sb-wrapper-inner").css('cursor', 'default');
			
	},
	onChange: function(galleryElement)
	{
		
		$("#sb-wrapper-inner").unbind('click');
		
	},
	onFinish: function(galleryElement)
	{
		
		if (Shadowbox.gallery.length > 1)
			$("#sb-wrapper-inner").unbind('click').click(function(){ Shadowbox.next(); });
		else
			$("#sb-wrapper-inner").unbind('click');
			
	}
});
