$(document).ready(function() {
    //get some height
    $("#sidemenuT").height($("body").height());
    $("#bgDiv").height($(document).height() - 50);    

    //rounded corner
    $(".CurrentPage").corner();
    $(".pn_bubble").corner();
    $(".information").corner();
    $(".success").corner();
    $(".fail").corner();

    $("[id$='_CurrentPage']").hover(function () {
        $(this).animate({ backgroundColor: '#FAD60A', color: '#990000' }, { queue: false, duration: 500 });
    }, function () {
        $(this).animate({ backgroundColor: '#990000', color: '#fae3e3' }, { queue: false, duration: 500 });
    });
    
    //Background Change Effects
    $("#bg1").click(function() {
        $("#bgDiv").fadeOut("fast");
        $("#bgDiv").css({ display: "none" });
        $("#bgDiv").css({ backgroundImage: "url(images/bg_main1.gif)" });
        $("#bgDiv").fadeIn("slow");
    });

    $("#bg2").click(function() {
        $("#bgDiv").fadeOut("fast");
        $("#bgDiv").css({ display: "none" });
        $("#bgDiv").css({ backgroundImage: "url(images/bg_main2.gif)" });
        $("#bgDiv").fadeIn("slow");
    });

    $("#bg3").click(function() {
        $("#bgDiv").fadeOut("fast");
        $("#bgDiv").css({ display: "none" });
        $("#bgDiv").css({ backgroundImage: "url(images/bg_main3.gif)" });
        $("#bgDiv").fadeIn("slow");
    });

    //sliding box images effects

    $('.install_row1').hover(function() {
        $(".cover", this).stop().animate({ top: '60px' }, { queue: false, duration: 160 });
    }, function() {
        $(".cover", this).stop().animate({ top: '131px' }, { queue: false, duration: 160 });
    });


    //color menu effects
    $(".hoverBtn").hover(function () {
        $(this).stop().animate({ backgroundColor: "#F0F0F0", color: "#111111" }, 200);
    }, function () {
        $(this).stop().animate({ backgroundColor: "#0f0f0f", color: "#afafaf" }, 200);
    });
    $(".hoverBtn").click(function () {
        window.location.replace($(this).attr("title"));
    });

    $(".BottomMenu").hover(function () {
        $(this).css("background-color", "#ff9900");
        $(this).css("color", "#000000");
    }, function () {
        $(this).css("background-color", "transparent");
        $(this).css("color", "#ffffff");
    });
        
});



function MM_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
    }
}
