jQuery(function() {
	// open all offsite links in a new window
	jQuery('a:not([href*=' + window.location.protocol + '//' + window.location.host + '/])')
		.not('[href^=#]')
		.not('[href^=/]')
		.not('[href=""]')
		.not('.thickbox')
			.addClass('external')
			.click(function(){
				window.open(this.href); // pop a new window
				return false; // return false to keep the actual link click from actuating
	});	
	// slide toggle the allowed tags on the comment form
	jQuery('abbr#allowed-tags-def').click(function(){
		jQuery('p#allowed-tags').slideToggle();
	});
	// make a pretty search url
	jQuery('#searchform').submit(function(){
		var s = jQuery(this).find('input#s').val();
		var url = window.location.protocol + '//' + window.location.host + '/search/' + s + '/';
		window.location.href = url;
		return false;
	});
});