/* Author: 

 */

$(function() {

    $(window).resize(function() {
        verticalCentering();
    });

    function verticalCentering() {
        topMargin = ($(window).height() - $('#container').height()) / 2;
        if (topMargin < 10) {
            topMargin = 10;
        }
        $('#container').css({'margin-top':topMargin});
    }

    verticalCentering();

    $('#top_animation').css("opacity", "0");
    $('#top_animation .logo').css("opacity", "0");

    $('#top_animation').animate({
                opacity: 1
            }, 1500, function() {
                $('#top_animation .logo').animate({
                    marginTop: "15px",
                    opacity: 1
                }, 800);
            });

    $('.message img').css("opacity", "0");
    $('.message img').each(function (i) {
        var delayTime = i * 1000;
        $(this).delay(delayTime).animate({
            opacity: 1
        }, 1000);
    });


    $('.scroll-pane').jScrollPane();


    $('#main_nav img,#brand_nav img,#recruit .right img, #brand_link img, #lm_commingsoon #store_link img').hover(
            function () {
                var onSrc = $(this).attr('src').replace('.png', '_o.png');
                $(this).attr('src', onSrc);
            },
            function () {
                var offSrc = $(this).attr('src').replace('_o.png', '.png');
                $(this).attr('src', offSrc);
            }
    );

});






















