﻿$(document).ready(function() {

    $("#accordion h3.menu-head").click(function() {
        $(this).css({ color: "#c51230", backgroundImage: "url(../images/arr-down.jpg)" }).next("div.menu-body").slideDown(500).siblings("div.menu-body").slideUp("normal");
        $(this).siblings("h3.menu-head").css({ color: "#6d6f71", backgroundImage: "url(../images/arr-right.jpg)", backgroundRepeat: "no-repeat" });
    }),
    jQuery.fn.collapse = function() {
        $(this).css({ color: "#c51230", backgroundImage: "url(../images/arr-down.jpg)" }).next("div.menu-body").show().siblings("div.menu-body").hide();
        $(this).siblings("h3.menu-head").css({ color: "#6d6f71", backgroundImage: "url(../images/arr-right.jpg)", backgroundRepeat: "no-repeat" });
    }

});

$(document).ready(function() {
    if (region != "") {
        $("#menu-head-" + region).collapse();
    } else if (rid != "") {
        $("#li-" + rid).parent().parent().prev().collapse();
    }
});