// JavaScript Document

$(document).ready(function(){
	////////////////// CURVED CORNERS ///////////////////					   
	try { // this file is also included on the R25 webviewers; this block fails on those pages.
		var headingCurve="8px";
		var bottomHeadingCurve="5px";
		$("#mainNav,#rightCol, #homeWrapper").corner();	
		$("#mainNav h2:not(:first),#rightCol h3:not(:first)").corner("top "+headingCurve).corner("bottom "+bottomHeadingCurve);	
		$("#mainNav h2:first,#rightCol h3:first").corner("top cc:#f5f5f5 "+headingCurve).corner("bottom "+bottomHeadingCurve);
		$('.homeSection h3').corner("top cc:#F6EBB1 "+headingCurve).corner("bottom "+bottomHeadingCurve);
	} catch (err) {}
	
	
	////////////////// SEARCH //////////////////////////
	// Show UofM Search
	$('#searchUofMRadioContainer').css('display','inline');
	$('#searchOCMRadio').trigger('click');
	
	$('#searchRadios').click(function(){
									  
									  
									  
									  
		$('#searchRadios input:radio:checked').each(function(){
			if($(this).attr('id')=='searchUofMRadio'){
				//User clicked on the UofM radio
				$("input[name='client']").attr('value','searchumn');
				$("input[name='proxystylesheet']").attr('value','searchumn');
				$("input[name='site']").attr('name','site2');
				
			}
										
			else{
				//Assume user clicked on the OCM radio
				$("input[name='client']").attr('value','tc_classrooms');
				$("input[name='proxystylesheet']").attr('value','tc_classrooms');
				$("input[name='site2']").attr('name','site');
			}
		});							  		  
	});// end click function
	$('#searchOCMRadio').trigger('click');
	
});



