//File dirroot/catalog/catalog_new.js
//Author Sean Behan
//Date 11/11/08
//Description This file is responsible for 
//2) popups that displays more info about course credits and the credit type

$jq(document).ready(function()
{   
	$jq('span.description').hide();
    
	//handle the popups
    $jq('a.popup').click(function()
	{  //alert to test
		
	});
	
	$jq('a.credit_type').click(function()
	{  //credit type info
	
		var desc= $jq(this).siblings('.description');
		var id= $jq('.id', parent).text();
		
		gc_confirm(desc.html(), function() {
			window.location= $jq('#enroll_link').attr('href') + '&credit=' + id;
		}, 'Register', 'Close');
		
		return false;
	   
	});
	// Added by Ron Stewart on July 24, 2009:
	// This function hides and reveals course
	// information based on which instance is selected
	$jq('input.instances-radio-list').click(function(event)
	{
		$jq('div.course-info-teacher').hide();
		$jq('div.sidebar-box-credits').hide();
		var $tgt = $(event.target);
		var target = jQuery(event.target);
		document.getElementById('course' + $jq(target).attr("id")).style.display = "";
		document.getElementById('credit' + $jq(target).attr("id")).style.display = "";
		document.getElementById('radioCredit1' + $jq(target).attr("id")).checked = true;
	});

    $jq('a.date_information').click(function()
    {  //credit type info
       
    });

});
