$(function() {

	/* Apply fancybox to multiple items */
	
	$('a.gallery').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false,
		'titlePosition' : 'over'
	});
	
	// apply jquery ui boxes to paging nav
	
	$('div.subpage_nav a').each(function(index) {
		$(this).button({ });
	});
	
	// do the event box resizing if we are on the correct page
	// there's a problem wherein the typekit font substitution can shift words
	// onto the next line after this code runs
	/*
	if($('#events')) {
		var a = $('div.event_summary');
		var first = null;
		var second = null;
		for(var i = 0; i < a.length; i++) {
			var x = $(a[i]);
			if(first == null) {
				console.log('adding first '+i+' - '+x.height());
				first = x;
			}
			else {
				second = x;
				console.log('adding second '+i+' - '+x.height());
			}
			if(first != null && second != null) {
				console.log(first.height()+', '+second.height());
				if(first.height() >= second.height()) second.height(first.height());
				else first.height(second.height());
				first = null;
				second = null;
			}
		}
	}
	*/
	
});
