use session or cookie to save .main class checkbox values and checked those accordingly when you come back and then use the following code:
<script type="text/javascript">
$(document).ready(function(){
$('.main').each(function(){
if($(this).is(':checked')){
var val = $(this).attr('alt');
$('#'+val).show();
}else{
var val = $(this).attr('alt');
$('#'+val).hide();
}
});
if($('.main').is(':checked')){
$(this).trigger('click');
}else{
//do nothing
}
$('.main').click(function(){
if($('.main').is(':checked')){
var val = $(this).attr('alt');
$('#'+val).show();
}else{
var val = $(this).attr('alt');
$('#'+val).hide();
}
});
});
</script>