sizing.js 945 Bytes
define(['jquery'], function($) {
    "use strict";

    var menuPosition = function () {
        var imageHeight, imageBottomPosition;
        var image = $('#home-image').offset();
        if(image) {
            imageHeight = $('#home-image').outerHeight(true);
            imageBottomPosition = $('html').height() - (image.top + imageHeight);

            if($('body').hasClass('logged-in')) {
                $('#primary-nav').parent().css('bottom', imageBottomPosition +80);

            } else {
                $('#primary-nav').parent().css('bottom', imageBottomPosition + 50);
            }
        }
        return false;
    };

    /**
     * Add delay before set the position
     */
//    setTimeout(function() {
//        menuPosition();
//
//    }, 200);

//    $(window).resize(function() {
//        /**
//         * Adjust main menu position when window size is changed.
//         */
//        menuPosition();
//    });


});