if (window.navigator.platform == 'iPhone' && document.body.id == 'home_page') {
  msg = "Would you like to use the mobile version of Theta Chi?"
  if (confirm(msg)) {
    path = window.location.pathname;
    window.location.replace("http://ox-beta.mit.edu" + path);
  }
}

function bold_link(type) {
    eval("$(\"li[name='" + type + "']\").css('fontWeight', 'bold')");
}

jQuery(function($) {
  /* Navigation */
  if ($('#navigation')) {
    var nav_resting_width = "-70px";
    var nav_hover_width = "0px";
    var body_class_name = document.body.className
    var delay = 400;

    $('#navigation > li').each(function(e) {
      if (this.className == body_class_name) {
        $('a', this).animate({marginLeft:nav_hover_width}, 600);
      }
      else {
        $(this).hover(function() {
          $('a', this).animate({marginLeft:nav_hover_width}, 200);
        },
        function () {
          $('a', this).animate({marginLeft:nav_resting_width}, 200);
        });
      }
    });
  }

  if ($("body").attr("class") == 'home_page') {
    $('#navigation > li').each(function(e) {
      $('a', this)
        .fadeTo(delay, .8)
        .animate({marginLeft:nav_hover_width}, 200)
        .animate({marginLeft:nav_resting_width}, 200);
      delay += 100;
    });
  }

});