$(document).ready(function(){
    //national
    $("#show_national_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more national headlines") {
                var height1 = $("#main").height();
                $("#national_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less national headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#national_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more national headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
    
    //world
    $("#show_world_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more world headlines") {
                var height1 = $("#main").height();
                $("#world_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less world headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#world_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more world headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
    
    //business
    $("#show_business_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more business headlines") {
                var height1 = $("#main").height();
                $("#business_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less business headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#business_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more business headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
    
    //entertainment
    $("#show_entertainment_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more entertainment headlines") {
                var height1 = $("#main").height();
                $("#entertainment_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less entertainment headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#entertainment_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more entertainment headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
    
    //sport
    $("#show_sport_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more sport headlines") {
                var height1 = $("#main").height();
                $("#sport_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less sport headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#sport_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more sport headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
    
    //technology
    $("#show_technology_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more technology headlines") {
                var height1 = $("#main").height();
                $("#technology_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less technology headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#technology_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more technology headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );    
    
    //health
    $("#show_health_more").click( 
        function() {
            var x = $(this).text();
            if (x == "+ Show 10 more health headlines") {
                var height1 = $("#main").height();
                $("#health_breaking_more").slideDown("fast");
                $(this).text("-  Show 10 less technology headlines");
                $("#main").height(height1 + 220);
            } else {
                var height1 = $("#main").height();
                $("#health_breaking_more").slideUp("fast");
                $(this).text("+ Show 10 more health headlines");
                $("#main").height(height1 - 220);
            }            
        }
    );
});