$(document).ready(function(){
	// Assign css width/height to specially classed elements
	$("div[class*='jq-width-']").each(function(){
		var dim_data = $(this).attr('class').match(/jq\-width\-(\d+)/);
		$(this).css('width',dim_data[1]+'px');
	});

	// Assign css width/height to specially classed elements
	$("div[class*='jq-height-']").each(function(){
		var dim_data = $(this).attr('class').match(/jq\-height\-(\d+)/);
		$(this).css('height',dim_data[1]+'px');
	});
	
	// Boomtown specs tables with colspans
	$('.specs td[colspan=4]').addClass('subhead');
	
	$('#accordion').accordion({
		active:0,
		autoHeight:false
	});
	
	// Add padding and border to testimonials
	$('.testimonial').wrapInner('<div class="testimonial-border" />');
	$('.testimonial-border').wrapInner('<div class="testimonial-padding" />');
	
	// Get rid of bottom margin on last testimonial
	$('.testimonial:last').css('margin-bottom',0);
	
	// Open external links in new window
	$("a.new-win").click(function(){
		window.open($(this).attr('href'));
		return false;
	});
	
});