$(document).ready(function() {

// ===================
// NAV DROP-DOWN MENU
// ===================

//	$(".nav ul li").hover(function(){
//		$(this).addClass("hover");
//		$('ul:first',this).css('visibility', 'visible');
//	});
		

   
    $(".nav ul li").hover(function(){
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    }, function(){
		$(this).removeClass("hover");
		$('ul:first',this).css('visibility', 'hidden');
   });



// ===================
// ROUNDED CORNERS
// ===================
    $( '.block' ).corners();
    $( '.page-nav' ).corners();
    $( '#main' ).corners();
    $( '.entry-metadata' ).corners();

// ===================
// PUBLISHED WORK
// ===================

    // Hides all categories. Only articles listed by date are shown.
    $( '#news' ).hide();
    $( '#politics' ).hide();
    $( '#sports' ).hide();
    $( '#instructional' ).hide();

    // Hides everything except the 'news' category.
    $( 'a#show-date' ).click(function() {
	$( '#date' ).show();
	$( '#news' ).hide();
    $( '#politics' ).hide();
	$( '#sports' ).hide();
	$( '#instructional' ).hide();
	return false;
    });

    // Hides everything except the 'news' category.
    $( 'a#show-news' ).click(function() {
	$( '#news' ).show();
	$( '#politics' ).hide();
	$( '#date' ).hide();
	$( '#sports' ).hide();
	$( '#instructional' ).hide();
	return false;
    });

    // Hides everything except the 'sports' category.
    $( 'a#show-sports' ).click(function() {
	$( '#politics' ).hide();
	$( '#sports' ).show();
	$( '#date' ).hide();
	$( '#news' ).hide();
	$( '#instructional' ).hide();
	return false;
    });

    // Hides everything except the 'instructional' category.
    $( 'a#show-instructional' ).click(function() {
	$( '#politics' ).hide();
	$( '#instructional' ).show();
	$( '#date' ).hide();
	$( '#news' ).hide();
	$( '#sports' ).hide();
	return false;
    });
    
    // Hides everything except the 'politics' category.
    $( 'a#show-politics' ).click(function() {
	$( '#politics' ).show();
	$( '#instructional' ).hide();
	$( '#date' ).hide();
	$( '#news' ).hide();
	$( '#sports' ).hide();
	return false;
    });
    

// ========================================
// PAGE NAVIGATION
// ========================================

    // Shows everything.
    $( 'a#show-all' ).click(function() {
	$( '#quick' ).show();
	$( '#about' ).show();
	$( '#work' ).show();
	$( '#contact' ).show();
	$( '#testimonials' ).show();
	$( '#services' ).show();
	return false;
    });

    // Shows the "About" section and hides everything else.
    $( 'a#show-about' ).click(function() {
	$( '#about' ).show();
	$( '#services' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#quick' ).hide();
	return false;
    });

    // Shows the "Services" section and hides everything else.
	$( 'a#show-services' ).click(function() {
	$( '#services' ).show();
	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#quick' ).hide();
	return false;
    });

    // Shows the "Work" section and hides everything else.
	$( 'a#show-work' ).click(function() {
	$( '#work' ).show();
	$( '#about' ).hide();
	$( '#services' ).hide();
	$( '#testimonials' ).hide();
	$( '#quick' ).hide();
	return false;
    });

    // Shows the "Contact" section and hides everything else.
	$( 'a#show-contact' ).click(function() {
	$( '#contact' ).show();
	$( '#about' ).hide();
	$( '#services' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#quick' ).hide();
	return false;
    });

    // Shows the "Testimonials" section and hides everything else.
    $( 'a#show-testimonials' ).click(function() {
	$( '#testimonials' ).show();
	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#services' ).hide();
	$( '#quick' ).hide();
	return false;
    });

    // Shows the "Quick Facts" section and hides everything else.
    $( 'a#show-quick' ).click(function() {
	$( '#quick' ).show();
	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();
	return false;
    });

// ========================================
// COPYWRITING SERVICES
// ========================================


    // Shows website copy and hides everything else. 
    $( 'a#show-all' ).click(function() {
	$( '#consulting' ).show();
	$( '#web' ).show();
	$( '#white' ).show();
	$( '#other' ).show();
	$( '#pr' ).show();
	$( '#case' ).show();
	$( '#how' ).show();
 	$( '#services' ).show();
//  	$( '#about' ).hide();
//  	$( '#work' ).hide();
//  	$( '#testimonials' ).hide();
	return false;
    });

    // Shows consulting and hides everything else. 
    $( 'a#show-consulting' ).click(function() {
	$( '#consulting' ).show();
	$( '#web' ).hide();
	$( '#case' ).hide();
	$( '#white' ).hide();
	$( '#other' ).hide();
	$( '#pr' ).hide();
	$( '#how').hide();
// 	$( '#about' ).hide();
// 	$( '#work' ).hide();
// 	$( '#testimonials' ).hide();
// 	$( '#services' ).hide();
	return false;
    });

    // Shows website copy and hides everything else. 
    $( 'a#show-web' ).click(function() {
	$( '#web' ).show();
	$( '#consulting' ).hide();
	$( '#case' ).hide();
	$( '#white' ).hide();
	$( '#other' ).hide();
	$( '#pr' ).hide();
	$( '#how').hide();
/*	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();*/
	return false;
    });

    // Shows PR and hides everything else. 
    $( 'a#show-pr' ).click(function() {
	$( '#pr' ).show();
	$( '#consulting' ).hide();
	$( '#web' ).hide();
	$( '#white' ).hide();
	$( '#other' ).hide();
	$( '#case' ).hide();
	$( '#how').hide();
/*	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();*/
	return false;
    });

    // Shows cast studies and hides everything else. 
    $( 'a#show-case' ).click(function() {
	$( '#case' ).show();
	$( '#consulting' ).hide();
	$( '#web' ).hide();
	$( '#white' ).hide();
	$( '#other' ).hide();
	$( '#pr' ).hide();
	$( '#how').hide();
/*	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();*/
	return false;
    });

    // Shows white papers and hides everything else. 
    $( 'a#show-white' ).click(function() {
	$( '#white' ).show();
	$( '#consulting' ).hide();
	$( '#web' ).hide();
	$( '#case' ).hide();
	$( '#other' ).hide();
	$( '#pr' ).hide();
/*	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();*/
	return false;
    });

    // Shows other services and hides everything else. 
    $( 'a#show-other' ).click(function() {
	$( '#other' ).show();
	$( '#consulting' ).hide();
	$( '#web' ).hide();
	$( '#case' ).hide();
	$( '#how' ).hide();
	$( '#pr' ).hide();
/*	$( '#about' ).hide();
	$( '#work' ).hide();
	$( '#testimonials' ).hide();
	$( '#services' ).hide();*/
	return false;
    });

    // Shows the "how my services work" section and hides everything else. 
    $( 'a#show-how' ).click(function() {
	$( '#how' ).show();
	$( '#web' ).hide();
	$( '#case' ).hide();
	$( '#white' ).hide();
	$( '#other' ).hide();
	$( '#pr' ).hide();
	$( '#consulting').hide();
// 	$( '#about' ).hide();
// 	$( '#work' ).hide();
// 	$( '#testimonials' ).hide();
// 	$( '#services' ).hide();
	return false;
    });

});
