$('#nav > a > img').hover(
	function () {
		$(this).addClass('active');
	},
	function () {
		$(this).removeClass('active');
	}
);

$('.dialog_close').bind('click',function (e) {
	$('.dialog').css('display','none');
})

$('input[type="text"]').focus(function (e) {
	if ($(this).hasClass('empty') && $(this).val().length != 0) {
		$(this).val('');
		$(this).removeClass('empty');
	}
});

$('input[type="text"]').blur(function (e) {
	if ($(this).val().length == 0) {
		switch ($(this).attr('name')) {
			case 'full_name': $(this).val('Name:'); break;
			case 'address': $(this).val('Address:'); break;
			case 'apt': $(this).val('Apt/Suite #:'); break;
			case 'city': $(this).val('City:'); break;
			case 'state': $(this).val('State:'); break;
			case 'zip': $(this).val('Zip:'); break;
			case 'phone': $(this).val('Phone:'); break;
			case 'email': $(this).val('Email Address:'); break;
		}
		$(this).addClass('empty');
	}
});

$('textarea').focus(function (e) {
	if ($(this).hasClass('empty') && $(this).text().length != 0) {
		$(this).text('');
		$(this).removeClass('empty');
	}
});

$('textarea').blur(function (e) {
	if ($(this).text().length == 0) {
		$(this).text('Brief Description of Your Legal Issue:');
		$(this).addClass('empty');
	}
});

setTimeout("$('#confirmation').fadeOut();",5000);

function openPrivacy() {
	$('.dialog').css('display','none');
	$('#privacy_dialog').css('display','block');
}

function openTestimonials() {
	$('.dialog').css('display','none');
	$('#testimonials_dialog').css('display','block');
}