function MainNav() {
   // alert('manin nav');
    var visible = false;

    $(function () {
        $.get(lang + '/menu/menulist', function (response) {
            $('li#menuClick ul').html(response);

            $('li#menuClick ul li').click(function () {
                
                var menuId = $(this).attr('data-id');
                
                if ($('#focus #menu').length > 0) {
                    boxShift.scrollSection('#' + menuId);
                }
                else {
                    var jump = boxShift.jump_calc("menu");
                    boxShift.shift(jump.dir, jump.steps, '#' + menuId);
                    return false;
                }
                
            });
        });
    });
	
	$('#nav').click(function() {
	    return false;
	});
	
	$('#nav').mouseover(function(e) {
	
		// display the nav
		if(visible) {
		
			$('#navMenu').animate({
				'top': '-300'
			}, 400, function() {
				visible = false;
			});
			
		} else {
		
			$('#navMenu').animate({
				'top': '65'
			}, 400, function() { 
				visible = true; 
			});
			
		}
		
		return false;
	});
	
	$('#navMenu').mouseleave(function(e) {
	
	    if(visible) {
	        $('#navMenu').animate({
	            'top': '-300'
	        }, 400, function() {
	            visible = false;
	        });
	    }
	
	    return false;
	});
}
