$(document).ready(function() {
    // Activates all 'Javascript ON' required elements by removing the class with "display:none;"
    $(".javascript_on").removeClass("javascript_on");

    // Dropdown box
    $("ul.sort_by").hover(
        // Switch the class to change to _on
        function(){
            $(this).removeClass("turned_off");
        },
        // Now change the class back to _off
        function(){
            $(this).addClass("turned_off");
        }
    );

    // Dropdown box
    $("div.sort_by").hover(
        // Removes the 'turned_off' class
        function(){
            $("ul.sort_by").removeClass("turned_off");
        },
        // Adds the 'turned_off' class
        function(){
            $("ul.sort_by").addClass("turned_off");
        }
    );

    // Home Page article toggling (slides the articles into tiny view or back to large view)
    $("a.orange_arrow").click(
        // 
        function(){
            //$(this).parent().parent().children(".blog_post_body").slideToggle(350);
            $(this).parent().parent().toggleClass("blog_tiny");
        }
    );

    // Comment toggling (full vs. mini post)
    $("a.link_arrow").click(
        //
        function(){
            // $(this).parent().parent().parent().parent().parent().parent().children(".hidden_comment").slideToggle(100);
            $(this).parent().parent().parent().parent().parent().parent().toggleClass("compact");
        }
    );
});
