$(document).ready(function() {
	//Feature Box (home)
	$('#feature-box li').removeClass('selected');
	$('#feature-box li:first').addClass('selected');
	$('#feature-box li').hover(function () {
		//hover over
		$('#feature-box li').removeClass('selected');
		$(this).addClass('selected');
		this.blur();
		return false;
	},function () {
		//hover out
	});
	
	//Feature Sidebar Buttons
	$('#feature-buttons li a img').hover(function() {
		$(this).animate({top: '-36px'}, "fast");
	},function () {
		$(this).animate({top: '0'}, "fast");
	});
		
	//Contact Form (footer)
	$('#contact form label').hide();
	$('#contact form input:text:not(:hidden)').each(function () {
		var label = $(this).siblings('label').html();
		var label = $.string(label).strip().stripTags().capitalize().str;
		$(this).attr('value',label);
		$(this).addClass('dim');
	});
	$('#contact form input:text:not(:hidden)').focus(function () {
		var label = $(this).siblings('label').html();
		var label = $.string(label).strip().stripTags().capitalize().str;
		if ($(this).attr('value') == label) {
			$(this).attr('value','');
			$(this).removeClass('dim');
		}
	});
	$('#contact form input:text:not(:hidden)').blur(function () {
		if ($(this).attr('value') == '') {
			var label = $(this).siblings('label').html();
			var label = $.string(label).strip().stripTags().capitalize().str;
			$(this).attr('value',label);
			$(this).addClass('dim');
		}
	});
	$('#contact form textarea:not(:hidden)').each(function () {
		var label = $(this).siblings('label').html();
		var label = $.string(label).strip().stripTags().capitalize().str;
		$(this).html(label);
		$(this).addClass('dim');
	});
	$('#contact form textarea:not(:hidden)').focus(function () {
		var label = $(this).siblings('label').html();
		var label = $.string(label).strip().stripTags().capitalize().str;
		if ($(this).html() == label) {
			$(this).html('');
			$(this).removeClass('dim');
		}
	});
	$('#contact form textarea:not(:hidden)').blur(function () {
		if ($(this).val().str == '') { //fix problem with not resetting after a user modifies contents
			var label = $(this).siblings('label').html();
			var label = $.string(label).strip().stripTags().capitalize().str;
			$(this).html(label);
			$(this).addClass('dim');
		}
	});
	
	//Newsletter Signup Form
	$('#vertical-response label#email_address_label').hide();
	$('#vertical-response input#email_address').addClass('textbox');
	$('#vertical-response input#vs_response').addClass('button');
});