jQuery(document).ready(function($) {

	// images in the content are forced into particular sizes
	$('#content div.twocolumns div.content-block img').attr(
		'width', '218',
		'height', '187'
	);

	// wrap images in their respective divs so they look all pretty like
	$('#content div.twocolumns div.content-block img.alignright').wrap('<div class="img-holder alignright"><div class="holder"><div class="frame">');
	$('#content div.twocolumns div.content-block img.alignleft').wrap('<div class="img-holder alignleft"><div class="holder"><div class="frame">');
	
	// copy an image's alt tag into the <a> title for fancybox
	$("a:has('img')").each(function(){
		aboutimage = $(this).find('img').attr('alt');
		$(this).attr('title',aboutimage);
		return false;
	});
	
	// manipulate the wp generated gallery
	$('.wp-generated-gallery a, .menu-box a').each(function(){
		$(this).attr('rel','gallery');
		return false;
	});

	// fancybox
	$("a.fancybox, .wp-generated-gallery a, .menu-box a").fancybox({
		'titlePosition'	:	'over'
	});
	$('small:last').remove();
	
	// date picker
	$(function() {
		$("#datepicker").datepicker();
	});
	
	// menu images
	$('.menu-box a').attr('class','link');

});
