jQuery(function($){
	/*$v=$(".shm").overlay({ 
	    expose: { 
	        color: '#333', 
	        loadSpeed: 200, 
	        opacity: 0.9 
	    },
		api: true
	});*/
	
	$('.changetr').change(function()
	{
		$val='tak';
		$il=0;
		if( (typeof($(this).attr('rel')) != 'undefined' ) && $(this).attr('rel')!='')
		{
			$vv=$(this).attr('rel').split('|');
			if($vv[0]) $val=$vv[0];
			if($vv[1]) $il=parseInt($vv[1])-1;
		}
		
		for (i = 0; i <= $il; i++)
		{
			$d = $(this).parents('tr').eq(0).nextAll('tr').eq(i);
			if ($(this).val() == $val)
			{
				$d.show();
			}
			else
			{
				$d.hide();
			}
		}
	}).change();
	
	$('#osw1, #osw2').change(function()
	{
		if($('#osw1').attr('checked') && $('#osw2').attr('checked')) $('#formall input, #formall select').attr('disabled',false);
		else $('#formall input, #formall select').attr('disabled',true);
	}).change();

	$('.copy').click(function(){
		$('#prawa').toggle();
	});

});
