$(document).ready(function(){

			
		$('.ghost').hoverIntent(Glow, DeGlow);	
		
		$('.is_navBg li a,.is_navBgLower li a, .child').hoverIntent(menuGlow, menuDeGlow);
	  	  
$('.child, .ghost').click( function(e){

            //Check for already shown & prevent link processing... for now!
            
    if($(this).hasClass('current')) { return; }
            
            var show = $(this).attr('class').split(' '),
            showMe = $("#"+show[1]).removeClass('shown'),
            newHeight = showMe.css('height');
            
            $('#is_mainSection').animate({ height: newHeight }, 500);
            
            $(".shown").fadeOut(1000);
            showMe.fadeIn(1000);
            $('.is_navBg li a,.is_navBgLower li a, .ghost').removeClass('current');
            $('.'+show[1]).addClass('current');
            showMe.removeClass('hidden');
            showMe.addClass('shown');

    }); 
	
});

function Glow() { 
            var show = $(this).attr('class').split(' '),
            showMe = $("#"+show[1]).removeClass('shown'),
            newHeight = showMe.css('height');
            
            $('#is_mainSection').animate({ height: newHeight }, 500);
            
            $(".shown").fadeOut(1000);
            showMe.fadeIn(1000);
            $('.is_navBg li a,.is_navBgLower li a, .ghost').removeClass('current');
            $('.'+show[1]).addClass('current');
            showMe.removeClass('hidden');
            showMe.addClass('shown');
}
	
function DeGlow() { 
    var show = $(this).attr('class').split(' ');
	$(this).stop().animate({ opacity: 0.35 }, 500);
}

function menuGlow() {
            var show = $(this).attr('class').split(' '),
            showMe = $("#"+show[1]).removeClass('shown'),
            newHeight = showMe.css('height');
            
            $('#is_mainSection').animate({ height: newHeight }, 500);
            
            $(".shown").fadeOut(1000);
            showMe.fadeIn(1000);
            $('.is_navBg li a,.is_navBgLower li a, .ghost').removeClass('current');
            $('.'+show[1]).addClass('current');
            showMe.removeClass('hidden');
            showMe.addClass('shown');
}

function menuDeGlow() { 

}

