// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

var $j = jQuery.noConflict();

function update_answers(elm_id) {
	// removing all checked options
	$j('a.q_selceted').removeClass("q_selceted");
	$j("input:checked").removeAttr("checked");

	// adding new check option
	$j('#' + elm_id ).addClass("q_selceted")
					 .find('~ input[type="checkbox"]').attr("checked","checked"); 
}