$(document).ready(function() {
	description();
});


/* Browser check */
IS_DOM = (document.getElementById) ? true : false;
IS_IE = (document.all) ? true : false;
IS_IE50 = (navigator.userAgent.indexOf("IE 5.0") != -1);
IS_Mac = (navigator.appVersion.indexOf("Mac") != -1);



// Get an ID 
function getThis(sId)
{
	var oObject;
	oObject = false;
	
	if (IS_DOM) {
		if (document.getElementById(sId)) {
			oObject = document.getElementById(sId);
		}
	}
	
	return oObject;
}

/* Show/Hide Select box*/
$(document).ready(function() {
//  	$("div.select").addClass("hasJS");
//	  $("div.hasJS").show();
//	 
//	$("a.showSelect").toggle(function(){
//	     $(".selectList") .slideDown("normal")
//	   },function(){
//	     $(".selectList") .slideUp("normal")
//	   });
	 
//		$("#cusSelect1SelectArea").toggle(function(){
//			$("#cusSelect1Options").removeClass('select-options-invisible').addClass('select-options-visible');
//		},function(){
//		  $("#cusSelect1Options").removeClass('select-options-visible').addClass('select-options-invisible');
//		});

		$("#toggle").toggle(function(){
			$("#cusSelect1Options").slideDown("normal");
		},function(){
		  $("#cusSelect1Options").slideUp("normal");
		});
 });

/* Show/Hide Overlay */
$(document).ready(function(){
	$('div.classSchedule').hide();
	
  	$("a.showOverlay").click(function(){
	   $(".classSchedule").addClass("overlay").fadeIn("slow");
	 });
	 
	 $("a.hideOverlay").click(function(){
	   $(".overlay").fadeOut("slow");
	 });
 }); 


/* Show today's date */
function todayStr() {
var today=new Date();
return today.getMonth()+1+"/"+today.getDate()+"/"+(today.getYear() + 1900);
}
 
 
 /* Show/Hide Class schedule class desc overlay */
 function description() {
	
	$("a.classDesc").click(function(e) {
	
		if ( $(this).next().attr('instructor') == 'true' )
		{
			return false;
		}
		e.preventDefault();
		
		if ($.browser.msie)
		{
			// if ( $(this).next().attr('instructor') == 'true' )
			// {
				// $('.desc').css('left', '105px');
			// }
			// else
			// {
				$('.desc').css('left', '230px');
			// }
		}
				
		if (!$(this).next().children("p.classDescription").html())
		{
			sTitle = this.title;
			
			$(this).next().children("p.classDescription").html(sTitle);
		}
		$(".desc").hide();
		$(this).next().show();
	});
	
	$("a.closeBtn").click(function(e) {
		e.preventDefault();
		$(this).parent().hide();

	});
 } 
 

