var RuS_LastAnim;

function RuS_Accordion() {
	$j(".RuS_Accordion_Holder > .RuS_Accordion_Header").click(function (e) {
	        var h = $j(e.target).next().children().height();

	        $j(".RuS_Accordion_Folder").animate({
	                height:         "0px",
	                opacity:        0.2
	        }, 250);

	        if (e.target != RuS_LastAnim) {
	                $j(e.target).next().animate({
	                        height:         h + "px",
	                        opacity:        1
	                }, 500);

	                RuS_LastAnim = e.target;
	        } else {
	                RuS_LastAnim = false;
	        }
	});

}

function RuS_Accordion_Open(opened) {
	if (opened) {
	        var h = opened.next().children().height();

	        opened.next().animate({
                        height:         h + "px",
                        opacity:        1
                }, 500);
	}
}
