// JavaScript Document
$(document).ready(function(){

	activateAvailableAt();
	activateProspectusDownload();
});

function activateNav()
{
	 $("#head_nav_full_time").click(function () {
	 
	 	if ($("#head_fulltime_selectionarrow").is(":hidden"))
				{$("#head_fulltime_selectionarrow").show();
				 $("#head_course_popup").show();
}
			
		else
				 {$("#head_fulltime_selectionarrow").hide();
			 $("#head_course_popup").hide();}
									
   });	
     
	
}

function activateAvailableAt()
{
	if( $(".search_courses_availableat").length >0)
	{
		
		$(".search_courses_availableat").each(function(index) {
    		    		
    		$(this).mouseenter(function () {
					 
				$("#course_available_popup"+$(this).attr("rel")).show();
																				
			});	
					    
				   
       	   $(this).mouseleave(function () {
					 
			  	 $("#course_available_popup"+$(this).attr("rel")).hide();
																				
		 });		
		
		   $("#course_available_popup"+$(this).attr("rel")).mouseenter(function () {
					 
	
				$(this).show();
																				
		   });	
				    
	 	   $("#course_available_popup"+$(this).attr("rel")).mouseleave(function () {
					 
				$(this).hide();
														
		   });	

  		});			    
	}
}

function activateProspectusDownload()
{

	if( $("#prospectus_link").length >0)
	{
					 $("#prospectus_link").mouseenter(function () {
					 
					 	$("#prospectus_popup").show();
																				
				    });	
				    
				     $("#prospectus_popup").mouseenter(function () {
					 
								$("#prospectus_popup").show();
														
				    });	
				    
				     $("#prospectus_link").mouseleave(function () {
					 
					 	$("#prospectus_popup").hide();
																				
				    });	
				    
				     $("#prospectus_popup").mouseleave(function () {
					 
								$("#prospectus_popup").hide();
														
				    });	


    }
}


