﻿

$(document).ready(function() {




$("#randomImages").cycle( { timeout: 12000, speed: 2000 });
    $(".rightMenuItemDiv").hover(
                function() {
                    $(this).children("div").stop(true, true);
                    $(this).children("div").fadeTo("normal", 1);
                },
                function() {
                    $(this).children("div").fadeTo("normal", .6);

                });
    $(".rightMenuItemDiv").click(function() {
        //alert("me");
        //$(this).children("a").click();
    });
    //$("#learnMore").click(showLearn);
    initPage();
});

function fadeOutLoader() {
    //$("#logo").animate({ top: "6px", right: "-10px" }, 2000, "swing", function() {
    $("#logo").fadeOut("slow");
        $("#coverDiv").fadeOut("slow", finishLoad);
}

function finishLoad() {
    $("#logo").css("top", "6px");
    $("#logo").css("right", "-10px");
    $("#logo").fadeIn("slow");
    $(".blue").fadeIn("slow");
    //$("#blue1").animate({ marginLeft: "70px" }, 500, "swing", function() {
     //   $("#blue2").animate({ marginLeft: "0px" }, 500, "swing", function() {
     //       $("#blue3").animate({ marginLeft: "0px" }, 500, "swing", function() {
     //           $("#blue4").animate({ marginLeft: "0px" }, 500, "swing", function() { });
     //       });
     //   });
    //});
    $("#navHeaderDiv").children("img").show();
    $("#randomImages").slideDown("slow");
    $("#flyInDiv").show();
    $("#flyInDiv").animate({ marginLeft: "80px" }, 1000, "swing", function() {
        $("#learnMore").fadeIn("slow");
    });
    $("#backgroundImage").fadeIn("slow");

}

function showLearn() {
    $(this).css("background-image", "url(/images/arrowDown.gif)");
    $("#moreBack").slideDown();
    $("#moreContainer").show();
    $("#more").slideDown("slow");
    $(this).unbind('click');
    $(this).click(hideLearn);
}

function hideLearn() {
    $(this).css("background-image", "url(/images/arrow.gif)");
    $("#more").slideUp("slow", function() { $("#moreBack").hide(); });
    $("#moreBack").slideUp();
    $(this).unbind('click');
    $(this).click(showLearn);
}
    