/**********************************************************************************************\
RDWonlineWordCount - comprehensive behaviors
June 22, 2011

Written by Ronald D. Willis
2004-2012 Arducane Development.  All rights reserved.
\**********************************************************************************************/

$(function()
{
	restyleInputCheckboxesAndRadioButtons();

	$('#dropout').click(function()
	{ 
		var target = $('#options'), checked = $(this).is(':checked');

		if (checked == false)
		{
			target.show();	
		}
		else
		{
			target.hide();
		}
	});

	$('#url').unbind('blur').blur(function()
	{
		with($(this))
		{
			css({ 'border-color':'#C8D8EF', 'background':'#E8F8FF' });
			css('color', (val().length == 0 ? '#888888' : '#000000'));
		}
	})
	.focus(function()
	{
		$(this).css({ 'border-color':'#ABCDEF', 'background':'#FFFFFF', 'color' : '#000000' });
	});

	$('#reset').click(function()
	{
		$('input[type="checkbox"]').removeAttr('checked');
		$('input[type="text"]').val('');
		$('#options').hide();
		$('#dropout').find('input:checkbox').eq(0).attr('checked', 'checked');
	});	
});
