// Initial load
$(document).ready(function() {
    
    $("#navigation dt").hover(
        function() {
            $(this).css("background-color", "#000");
        }, function() {
            $("#navigation dt:even").css("background-color", "#333");
            $("#navigation dt:odd").css("background-color", "#535353");
        }
    );

    // Implements click functionality for expandable navigation sections
    // Otherwise like 'Home' it simply links to desired page    
    $("#navigation dt a[href=\"#\"]").click(function() {
        $(this).parent().siblings().slideToggle("fast");
        return false;
    });
        
    setTimeout(function() {
        var e = $("#navigation a[href=" + location.pathname + "]");
        e.parents("dl:first").children("dd").slideDown("fast");
    }, 500);
    
    $('#registration-popup').click(function() {
        var url = $(this).attr('href');
        var popup = window.open(url, 'Kellyn Registration', 'height=550,width=500');
        if (window.focus) {popup.focus()};
        return false;
    });
});