﻿function onloadEvHandler() 
{
    var menustyle = "color_a";
    var menustyleSel = "color_publisher";

    $("#mn_top").corner("top 5px");
    $("#mn_bottom").corner("bottom 5px");

    $("#divInfo").corner("5px");
    $("#divExamples").corner("5px");

    $("#btn_big").mouseover(function() {
        $("#btn_left").removeClass('p_bt_l').addClass('p_bt_l_over');
        $("#btn_center").removeClass('p_bt_c').addClass('p_bt_c_over');
        $("#btn_right").removeClass('p_bt_r').addClass('p_bt_r_over');
    });

    $("#btn_big").mouseout(function() {

        $("#btn_left").removeClass('p_bt_l_over').removeClass('p_bt_l_press').addClass('p_bt_l');
        $("#btn_center").removeClass('p_bt_c_over').removeClass('p_bt_c_press').addClass('p_bt_c');
        $("#btn_right").removeClass('p_bt_r_over').removeClass('p_bt_r_press').addClass('p_bt_r');
    });

    $("#btn_big").mousedown(function() {
        $("#btn_left").removeClass('p_bt_l').removeClass('p_bt_l_over').addClass('p_bt_l_press');
        $("#btn_center").removeClass('p_bt_c').removeClass('p_bt_c_over').addClass('p_bt_c_press');
        $("#btn_right").removeClass('p_bt_l').removeClass('p_bt_r_over').addClass('p_bt_r_press');
    });

    $("#btn_big").mouseup(function() {
        btnBigObj.click(); //THis object variable is defined on the aspx page.
    });


    $("div[id*=li_opt]").each(
                function() {
                    $(this).click(function() { changeMenu($(this), menustyle, menustyleSel); });
                    $(this).corner();
                }
            );

    $("#navPrev").click(function() { navigate('P', menustyle, menustyleSel); });
    $("#navNext").click(function() { navigate('N', menustyle, menustyleSel); });
    $("a[id*=a_link]").each(
                function() {
                    if ($(this)[0].href != "") {
                        $(this).mouseover(function() { $(this).addClass("mouseover"); });
                        $(this).mouseout(function() { $(this).removeClass("mouseover"); });
                    }
                }
            );

    function parse_fragment() {
        changeMenubyId($jq.fragment(true).id, menustyle, menustyleSel);
    };
    $jq.fragmentChange(true);
    $jq(document).bind("fragmentChange.id", function() {
        changeMenubyId($jq.fragment().id, menustyle, menustyleSel);
    });
    if ($jq.fragment().id) {
        $jq(document).trigger("fragmentChange.id");
    }
    else
        $jq.setFragment({ "id": "2" });

};
