function checkValue(item)
{
	if(!item)
		item = this
	if(item.value == item.defaultValue)
	{
		item.value = "";
	}
	else if(item.value=="")
	{
		item.value = item.defaultValue;
	}
}

$(function () {
	$("#course-provider").data('default-height', $("#course-provider").height());
	$("#dental-professional").data('default-height', $("#dental-professional").height());
	
	
	$(".hidden-fields, .hidden-fields .leftPart, .hidden-fields .rightPart").height(0).hide();
	
	/*$("#dent-yes").click(function () {
		$(".hidden-fields").animate(
			{opacity: 1, height: $(".hidden-fields").data('default-height')},
			500,
			'swing'
		);
	});
	
	$("#dent-no").click(function () {
		
	});*/
	
	function closeFields()
	{
		$(".hidden-fields").removeClass('selected');
		$(".hidden-fields, .hidden-fields .leftPart, .hidden-fields .rightPart").animate(
			{opacity: 0, height: 0},
			500,
			'swing'
		);
	}
	
	$("#dent-yes").click(function () {
		closeFields();
		$(this).addClass('selected');
		
		$("#course-provider, #course-provider .leftPart, #course-provider .rightPart").animate(
			{opacity: 1, height: $("#course-provider").data('default-height')},
			500,
			'swing',
			function () {
				$("#dental-professional").hide();	
			}
		);
	});
	
	$("#dent-no").click(function () {				  
		closeFields();
		
		$(this).addClass('selected');
		$("#dental-professional, #dental-professional .leftPart, #dental-professional .rightPart").animate(
			{opacity: 1, height: $("#dental-professional").data('default-height')},
			500,
			'swing',
			function () {
				$("#course-provider").hide();
			}
		);
	});
});
