// JavaScript Document

$(function(){
		       
	 
	 		$('#softDev').click(function(){
									 var eduVis=$('#edu').is(':visible');
									 var sofVis=$('#dev').is(':visible');
									 $('#eduDev').html("<a href=\"#\" class=\"navLink\">EDUCATIONAL TRAINING ></a>");
									 $('#softDev').html("<a href=\"#\" class=\"navLink\">SOFTWARE DEVELOPMENT -</a>");
									 
									 $(this).removeClass('redHighLight');
									  $('#softDev').addClass('redSelected');
									 $("#eduDev").removeClass('redSelected');
									 $("#eduDev").removeClass('redHighLight');
									 $("#eduDev > *").removeClass('redHighLight');
									 
									 
									 $("#softDev > *").unbind('mouseover').unbind('mouseout');
									 $("#eduDev > *").bind('mouseover',over).bind('mouseout',out);

									if(sofVis){
						
									}
									else if(!sofVis && eduVis){
						
									$('#edu').slideUp("fast");
									$('#dev').slideDown("fast");
									}
									else{
										$('#dev').slideDown("fast");
									
									}
									
									});
			$('#eduDev').click(function(){
									var eduVis=$('#edu').is(':visible');
									 var sofVis=$('#dev').is(':visible');
									 $('#eduDev').html("<a href=\"#\" class=\"navLink\">EDUCATIONAL TRAINING -</a>");
									  $('#softDev').html("<a href=\"#\" class=\"navLink\">SOFTWARE DEVELOPMENT ></a>");
									 
									 $(this).removeClass('redHighLight');
									 $('#eduDev').addClass('redSelected');
									 $("#softDev").removeClass('redSelected');
									  $("#softDev").removeClass('redHighLight');
									   $("#softDev>*").removeClass('redHighLight');
									  
									  
									  $("#eduDev > *").unbind('mouseover').unbind('mouseout');
									 $("#softDev > *").bind('mouseover',over).bind('mouseout',out);

									if(eduVis){
										
									}
									else if(!eduVis && sofVis){
									$('#dev').slideUp("fast");
									$('#edu').slideDown("fast");
									
									}
									else{
										$('#edu').slideDown("fast");
									}
								
								
										 });

			 			 $('.navLink').bind('mouseover', over).bind('mouseout', out);


			 
			 $('.newsArticle').hover(function(){
										  $(this).css("background-color", "#CCCCCC");
										 //$(this).parent("div").addClass('redHighLight');
										 },
								function(){
									$(this).css("background-color", "#FFFFFF");
									//$(this).parent("div").removeClass('redHighLight');
								});
			 
			 
			 function over(){
				 	  $(this).addClass('redHighLight');
					$(this).parent("div").addClass('redHighLight');
			 }
			 
			 function out(){
				 $(this).removeClass('redHighLight');
				 $(this).parent("div").removeClass('redHighLight');
			 }
			 
			 
			 function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

			 
			 
			 
			 
			 
 });
