</nav>
<nav id="main-nav" class="small">
<ul>
- <li id=course_link><a href="/schools" class="active"><em class="icon"></em>Courses</a></li>
+ <li><a href="/schools" id=school_link class="nav"><em class="icon"></em>Courses</a></li>
<li><a href="http://blog.finalsclub.org"><em class="icon"></em>Blog</a></li>
- <li id=archive_link><a href="/archive"><em class="icon"></em>Library</a></li>
- <li id=press_link><a href="/press"><em class="icon"></em>Press</a></li>
- <li id=register_link><a href="/register"><em class="icon"></em>Register</a></li>
- <li id=profile_link><a href="/profile"><em class="icon"></em>Profile</a></li>
+ <li><a href="/archive" id=archive_link class="nav"><em class="icon"></em>Library</a></li>
+ <li><a href="/press" id=press_link class="nav"><em class="icon"></em>Press</a></li>
+ <li><a href="/register" id=register_link class="nav"><em class="icon"></em>Register</a></li>
+ <li><a href="/profile" id=profile_link class="nav"><em class="icon"></em>Profile</a></li>
<!-- li><a href="#" class="donate"><em class="icon"></em><em class="lc yellow">Donate</em></a></li -->
</ul>
</nav>
}
},
run: function(name, path) {
+ $('.nav').removeClass('active');
checkUser(function() {
if (router.routes[name].useAjax) {
$.get(path, {cache: false}, function(data) {
router.add('home', false, function(cb) {
$('#learnsomething').unbind();
+ $('.nav').removeClass('active');
cb("home");
$('#learnsomething').click(function(e) {
$.get('/learn/random', function(data) {
// go to the page that lists the schools
router.add('schools', function(data, cb) {
-
+ $('#school_link').addClass('active');
var response = {
id: 'school',
data: data.schools
// go to the page that lists the courses for a specific school
router.add('school', function(data, cb) {
+ $('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_course').unbind();
$('#form_course').hide().unbind();
// go to the page that lists the lectures for a specific course
router.add('course', function(data, cb) {
+ $('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_lecture').unbind();
$('#form_lecture').hide().unbind();;
// go to the page that lists the note taking sessions for a specific lecture
router.add('lecture', function(data, cb) {
+ $('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_note').unbind();
$('#form_note').hide().unbind();;
// go to the page that lists the archived subject names
router.add('archive', function(data, cb) {
+ $('#archive_link').addClass('active');
var response = {
id: 'archive_subject',
router.add('archivesubject', function(data, cb) {
+ $('.nav').removeClass('active');
+ $('#archive_link').addClass('active');
var response = {
id: 'archive_course',
router.add('archivecourse', function(data, cb) {
+ $('#archive_link').addClass('active');
var response = {
id: 'archive_note',
router.add('archivenote', function(data, cb) {
+ $('#archive_link').addClass('active');
var response = {
id: 'archive_note_display',
// go to the account registration page
router.add('register', false, function(cb) {
+ $('#register_link').addClass('active');
$('#form_register').submit(function(e) {
e.preventDefault();
});
router.add('profile', false, function(cb) {
+ $('#profile_link').addClass('active');
var form = $('#form_profile');
$('input[type=password]','#form_profile').val('');
$('#affiliation').attr('value', user.affil);
// go to the press articles page
router.add('press', false, function(cb) {
+ $('#press_link').addClass('active');
cb("press");
});