function toggleRadio(radio){
	var radio_id = radio.split("_");
	
	var yes = radio_id[0]+'_yes';
	var no = radio_id[0]+'_no';
	
	if(radio_id[1] == 'yes'){
		$("#"+yes).removeClass('unchk');
		$("#"+yes).removeClass('chk');
		$("#"+yes).addClass('chk');
		
		$("#"+no).removeClass('unchk');
		$("#"+no).removeClass('chk');
		$("#"+no).addClass('unchk');
		
	}else{
		$("#"+no).removeClass('unchk');
		$("#"+no).removeClass('chk');
		$("#"+no).addClass('chk');
		
		$("#"+yes).removeClass('unchk');
		$("#"+yes).removeClass('chk');
		$("#"+yes).addClass('unchk');
	}
	
	
}

function init_toggleRadio(){
	$(".chk").click(function(){
			var thisid = $(this).attr('id');
			toggleRadio(thisid);
	});
	
	$(".unchk").click(function(){
			var thisid = $(this).attr('id');
			toggleRadio(thisid);
	});
}

function changeVideo(vname){
	var obj = '<object width="628" height="378"><param name="movie" value="http://www.youtube.com/v/'+vname+'&hl=en_US&fs=1&rel=0&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+vname+'&hl=en_US&fs=1&rel=0&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="628" height="378"></embed></object>';
	$("#videoplayer").html(obj);
}

$(document).ready(function(){
	init_toggleRadio();
	$(document).pngFix();
});
