/* Bryan Kwon */
$(function() {
    
/* dropdown menu */                 
    $('#nav li').hover(function(){
        $(this).addClass('hover');
        $('ul:first', this).css('visibility', 'visible');
    }, function(){
        $(this).removeClass('hover');
        $('ul:first', this).css('visibility', 'hidden');
    });
	

/* home page slides */
if($('body#home').length > 0) {
	$('#homeBanners').cycle({
	    timeout: 6000,
	    speed: 1000,
	    fx: 'fade'
	});
}

/* if subpages, */
if($('body#sub').length) {
	$('#nav > ul > li').removeClass('active');
	var thisSub = $('#sidebar h2').text().toLowerCase().replace(/ /g,'').replace(/&/g,'');
	
	// remove ul#subNav if there is no list items within
	if(!$('#subNav li').length) {
		$('#subNav').remove();
	}
	
	if(!$('#header #subBanner').hasClass()) {
		$('#header #subBanner').addClass(thisSub);
	}
	
}
    
});

