var phasesTableID = "";
var coursePhotosTableID = "";
var currentSectionName = "";


function setPhasesTableID(value) {
    phasesTableID = value;
}

function setCoursePhotosTableID(value) {
    coursePhotosTableID = value;
}



jQuery(function() {
  jQuery("#nav img").hover(function() {
    if(jQuery(this).attr("src").indexOf(jQuery(this).attr("src_on")) == -1) jQuery(this).attr("src", jQuery(this).attr("src_on"));
  }, function() { 
    if(jQuery(this).attr("src").indexOf(jQuery(this).attr("src_on")) > -1 && (jQuery(this).attr("name") == "" || currentSectionName.toLowerCase().indexOf(jQuery(this).attr("name"))==-1)) {  jQuery(this).attr("src", jQuery(this).attr("src_off")); }
  });
	
	jQuery("#courses_main img").hover(function() {
    jQuery(this).attr("src", jQuery(this).attr("src_on"));
  }, function() {
    jQuery(this).attr("src", jQuery(this).attr("src_off"));
  });
	
	jQuery("#"+phasesTableID+" img").hover(function() {
    jQuery(this).attr("src", jQuery(this).attr("src_on"));
  }, function() {
    jQuery(this).attr("src", jQuery(this).attr("src_off"));
  });
  
	jQuery("div.swapContent img").hover(function() { 
    jQuery(this).attr("src", jQuery(this).attr("src_on"));
  }, function() {
    jQuery(this).attr("src", jQuery(this).attr("src_off"));
  });
  
  jQuery("div.course_content img").hover(function() { 
    jQuery(this).attr("src", jQuery(this).attr("src_on"));
  }, function() {
    jQuery(this).attr("src", jQuery(this).attr("src_off"));
  });
});


function addJs() {
	if (arguments.length>0) files=arguments;
	if (typeof files!="undefined"){
		for(var i=0;i<files.length;i++){
			document.writeln("<script src='/javascript/twd/"+files[i]+".js' type='text/javascript'></script>");
		}
	}
}