$(function(){
    
    //changes the tertiary nav when a user clicks on a secondary nav link associated with a set of tertiary nav links
    $('.drop-trigger').click(function(){
        var _this = $(this);
        var tertNavId = '#' + _this.attr('id').replace('-t', '-l');
        
        $('.drop-trigger').removeClass('active');
        _this.addClass('active');
        
        $('#tertiary-nav ul').hide();
        $(tertNavId).fadeIn('fast');
        
        return false;    
    });

    $('.account-drop-trigger').click(function(){
        $('.account-options:visible').slideUp('fast');
        $('.account-options:hidden').slideDown('fast');
        
        return false;
    });

});

$(document).ready(function() {
    $('#search_textbox').focus(function(){
    	if(this.value == 'Search'){
    		this.value = '';
    	}
    	return false;
    });
    
    $('#search_textbox').blur(function(){
    	if(this.value == ''){
    		this.value = 'Search';
    	}
    	return false;
    });    	
});
