$j(document).ready(function() {
														
	$j('input:checkbox', this).each(function(){
		$j(this).addClass('jNiceHidden').wrap('<span></span>');
		var $wrapper = $j(this).parent();
		$wrapper.prepend('<a href="#" class="jNiceCheckbox"></a>');
		/* Click Handler */
		$j(this).siblings('a.jNiceCheckbox').click(function(){
				var $a = $j(this);
				var input = $a.siblings('input')[0];
				if (input.checked===true){
					input.checked = false;
					$a.removeClass('jNiceChecked');
				}
				else {
					input.checked = true;
					$a.addClass('jNiceChecked');
				}
				return false;
		});
		/* set the default state */
		if (this.checked){$j('a.jNiceCheckbox', $wrapper).addClass('jNiceChecked');}
	});
														
														
	$j('input:radio', this).each(function(){
		$input = $j(this);
		$input.addClass('jNiceHidden').wrap('<span class="jRadioWrapper"></span>');
		var $wrapper = $input.parent();
		$wrapper.prepend('<a href="#" class="jNiceRadio" rel="'+ this.name +'"></a>');
		/* Click Handler */
		$j('a.jNiceRadio', $wrapper).click(function(){
				var $a = $j(this);
				$a.siblings('input')[0].checked = true;
				$a.addClass('jNiceChecked');
				/* uncheck all others of same name */
				$j('a[rel="'+ $a.attr('rel') +'"]').not($a).each(function(){
					$j(this).removeClass('jNiceChecked').siblings('input')[0].checked=false;
				});
				
				/**/
				if($a.siblings('input')[0].id=='rad_lived_1'){
					 $j('#paddress').hide('slow');
				} else if($a.siblings('input')[0].id=='rad_lived_2'){
					 $j('#paddress').show('slow');
				}

				/**/
				if($a.siblings('input')[0].name=='question1'){
					if($a.siblings('input')[0].id=='question11'){
						 $j('#question1_followup').hide('slow');
					} else {
						 $j('#question1_followup').show('slow');
					}
				}
				
				/**/
				if($a.siblings('input')[0].name=='question7'){
					if($a.siblings('input')[0].id=='question71'){
						 $j('#question7_followup').hide('slow');
					} else {
						 $j('#question7_followup').show('slow');
					}
				}

				/**/
				if($a.siblings('input')[0].name=='question8'){
					if($a.siblings('input')[0].id=='question81'){
						 $j('#question8_followup').hide('slow');
					} else {
						 $j('#question8_followup').show('slow');
					}
				}

				/**/
				if($a.siblings('input')[0].name=='question10'){
					if($a.siblings('input')[0].id=='question101'){
						 $j('#question10_followup').show('slow');
					} else {
						 $j('#question10_followup').hide('slow');
					}
				}

				return false;
		});
		/* set the default state */
		if (this.checked){$j('a.jNiceRadio', $wrapper).addClass('jNiceChecked');}
	});
});

