
if(window['console'] === undefined) window.console = { log: function() {} };

var landes = function() {
	return {
        journal_nav_width : 157
        ,journal_nav_height : 13
        ,journal_exp_height : 346
        ,journal_exp_width : 700
        ,landes_feature_speed : 15
        ,current_login_session : false
        ,init : function() {
            row = 0;
            col = 0;


            $('#landes_main_nav_journals').attr('href', '#');
            $('#landes_main_nav_books').attr('href', '#');

            $('.landes_search_check').click(function(a,b,c) {
                    $('.landes_search_check').not('#'+$(this).attr('id')).attr('checked', false);
                });

            $('.landes_main_menu').superfish({
                    dropShadows:false,
                    autoArrows:false
                }); 

            landes.periodized_authcheck();
        }
        ,menu_hide : function() {
            $("#journalList_div").fadeOut('fast');
        }

        ,authcheck : function() {
            $.post("/authcheck/", function(a) {
                    if(a == 'ok') {
                        landes.current_login_session = true;
                    }
                    else if(a != 'ok') {
                        if(landes.current_login_session === true) {
                            document.location.href = "/";
                        }
                        else {
                            clearTimeout(landes.periodized_authcheck_timeout);
                        }
                    }
                });
        }

        ,periodized_authcheck : function() {
            landes.authcheck();
            landes.periodized_authcheck_timeout = setTimeout(landes.periodized_authcheck, 60000);
        }
    }
}();
$(landes.init); 
 
