// JavaScript Document
$(document).ready(function(){
		
	var downloadId = "load1";	
   $('.ConsultNav li').mouseover(function(e){
		var navId = e.target.id;
		 
		document.getElementById(navId).style.cursor='pointer';
	     $("#"+navId).attr("class","selected");
		 
	 });
  
   $('.ConsultNav li').mouseout(function(e){
         var navIdout = e.target.id;
		 document.getElementById(navIdout).style.cursor='pointer';
		 
		 if(navIdout==downloadId){
		    $("#"+navIdout).attr("class","selected");
		  }else{
		     $("#"+navIdout).attr("class","");
		 }
		 
	 });
   
   $('.ConsultNav li').click(function(e){
		var soucer1 = e.target.id;
		downloadId = soucer1;
		for(var i=1;i<=5;i++){
		    $("#load"+i).attr("class","");
		}
		 document.getElementById(downloadId).style.cursor='pointer';
		 $("#"+downloadId).attr("class","selected");
		//window.location.href='course'+hrefvalue+'.html';
	
	 });
	
	
	
     $('.leftNavInfo Img').mouseover(function(e){
		var navId = e.target.id;
		 
		document.getElementById(navId).style.cursor='pointer';
	     $("#"+navId).attr({ 
           src: "images/"+navId+".jpg"
        });
		 
	 });
  
   $('.leftNavInfo Img').mouseout(function(e){
         var navIdout = e.target.id;
		 document.getElementById(navIdout).style.cursor='pointer';
		
		 if(navIdout==loadNavId){
		   
		  }else{
		    navR = navIdout.replace('1','2');
		     $("#"+navIdout).attr({ 
              src: "images/"+navR+".jpg"
           });
		 }
		 
	 });
   
   $('.leftNavInfo Img').click(function(e){
		var loadValue = e.target.id;
		for(var i=1;i<=3;i++){
		    $("#load1"+i).attr({ 
              src: "images/load2"+i+".jpg"
           });
		}
		 document.getElementById(loadValue).style.cursor='pointer';
		  $("#"+loadValue).attr({ 
              src: "images/"+loadValue+".jpg"
           });
		  if(loadValue=="load11"){
			   window.location.href='message.html';
			}
			if(loadValue=="load13"){
				 window.location.href='login.php';
			}
			if(loadValue=="load14"){
				 window.location.href='awards1.html';
			}
			if(loadValue=="load12"){
				window.location.href='photo.html';
				}
		//window.location.href='course'+hrefvalue+'.html';
	
	 });
});
