/*
	Handles the sliding news feed in the content secondary.
*/


$(function() {
    // Assign the positional classes to the right-hand nav.
    $("ul#nav-tertiary a.nav-secondary:first").addClass("here");    
    $("ul#nav-tertiary > li:first-child").addClass("first");
    $("ul#nav-tertiary > li:last-child").addClass("last");
    $("ul#nav-tertiary ul:last").addClass("last");
    $("ul#nav-tertiary ul > li:first-child").addClass("first");
    $("ul#nav-tertiary ul > li:last-child").addClass("last");

    // Set the active element if none.
    if ($("ul#nav-secondary > li > a.here").length == 0) {
        $("div#container.nav_multilevel ul#nav-secondary a.nav-secondary:first").addClass("here");
    }

    // Create the accordian.
    $("ul.nav-secondary").accordion({
        event: "mouseover",
        header: "a.nav-secondary:not(a.nav-secondary:only-child)",
        selectedClass: "here",
        active: ".here"
    });
});
