// JavaScript Document
$(document).ready (function() {

$('#radio3').click(function(){
		
		hideRentalInformation();	
  	})
 $('#radio3:checked').each(function(){
		hideRentalInformation();	
  })
$('#radio4').click(function(){
		showRentalInformation();	
  	})
 $('#radio4:checked').each(function(){
		showRentalInformation();	
  })
//employment
$('#radio7').click(function(){		
		hideSelfEmployedInfo();	
		showEmployeeInfo();
  	})
 $('#radio7:checked').each(function(){
		hideSelfEmployedInfo();	
		showEmployeeInfo();
  })

$('#radio8').click(function(){
		hideEmployeeInfo();
		showSelfEmployedInfo();	
  	})
 $('#radio8:checked').each(function(){
		hideEmployeeInfo();
		showSelfEmployedInfo();	
  })
 $('#radio9').click(function(){
		showPetInfo();	
  	})
 $('#radio9:checked').each(function(){		
		showPetInfo();	
  })
  $('#radio10').click(function(){
		hidePetInfo();	
  	})
 $('#radio10:checked').each(function(){		
		hidePetInfo();	
  })


 
 

});

function hideRentalInformation(){
	hide($('#landlord_row'));
	hide($('#landlord_contacts_row'));
	hide($('#rent_per_month'));
	return;
}


function showRentalInformation(){
	show($('#landlord_row'));
	show($('#landlord_contacts_row'));
	show($('#rent_per_month'));
	return;
}

function hideEmployeeInfo(){
	hide($('#employee_company_row'));
	hide($('#com_date_row'));
	hide($('#wage_row'));
	hide($('#contact_row'));
	hide($('#contact_tel_row'));
	hide($('#other_income_row'));
	hide($('#monthly_row'));
}

function showEmployeeInfo(){
	show($('#employee_company_row'));
	show($('#com_date_row'));
	show($('#wage_row'));
	show($('#contact_row'));
	show($('#contact_tel_row'));
	show($('#other_income_row'));
	show($('#monthly_row'));
	
	
	
}
function hideSelfEmployedInfo(){
	hide($('#self_employed_row'));
	hide($('#self_employed_company_row'));
	hide($('#self_employed_abn_row'));
	hide($('#self_employed_accountant_row'));
	hide($('#self_employed_telephone_row'));
}

function showSelfEmployedInfo(){
	show($('#self_employed_row'));
	show($('#self_employed_company_row'));
	show($('#self_employed_abn_row'));
	show($('#self_employed_accountant_row'));
	show($('#self_employed_telephone_row'));
}
function hidePetInfo(){
	hide($('#pet_row'));
}

function showPetInfo(){
	show($('#pet_row'));

}



function hide(temp){
	temp.css('display','none');
}

function show(temp){
	temp.css('display','');
}
