
/*
----------------------------------------------------------------------------------------------------

	ก ๎{๎๑
		- ์ 	:	Copyright(c) Apullo.com. All Rights Reserved.
		- ์ฌา	:	Lภ๏ะAvR@cๅm
		- ์ฌ๚	:	2008/06/04
		- XV๚	:	

	ก t@C๎๑
		- ผฬ
			 คส

		- Tv
			 hCเลคสปณ๊้JavaScript

		- RAt@C
			 jQuery 1.2 +


	ก ฮuEU
		- Microsoft Internet Explorer
			 6	:	
			 7	:	

		- MozillaFirefox
			 1.0	:	
			 1.5	:	
			 2.0	:	

		- Opera
			 9.25	:	

		- Apple Safari
			 3.04 :	ขmF

	ก XV๐

----------------------------------------------------------------------------------------------------
*/


/*
 คส
---------------------------------------------------------------------------------------------------- */
$(function(){
	//eจqฬAฎ
	$('input[@parent][type=checkbox]').click(function(){
		$('input[@child=' + $(this).attr('parent') + '][type=checkbox]').attr('checked', $(this).attr('checked'));
	});

	//qจeฬAฎ
	$('input[@child][type=checkbox]').click(function(){
		if ($(this).attr('checked')) {
			if ($('input[@child=' + $(this).attr('child') + '][type=checkbox]:checked').length == $('input[@child=' + $(this).attr('child') + '][type=checkbox]').length) $('input[@parent=' + $(this).attr('child') + '][type=checkbox]').attr('checked', $(this).attr('checked'));
		}
		if (!$(this).attr('checked')) $('input[@parent=' + $(this).attr('child') + '][type=checkbox]').attr('checked', $(this).attr('checked'));
	});
});


