$(document).ready(function () {

  $('nav').affix({
    offset: {
      top: $('header').outerHeight()
    }
  });

  $('nav').on('affix.bs.affix', function (){
    $('body').css('margin-top', $('nav').height() + parseInt($('nav').css('margin-bottom')));
  });

  $('nav').on('affix-top.bs.affix', function (){
    $('body').css('margin-top', 0);
  });

  var themeMenu = $('.resume-dropdown-menu > li > a');

  themeMenu.on('click', function() {
    event.preventDefault();
    var themeColor = $(this).attr('id');
    console.log(themeColor);
    var themeColorClass = "theme-" + themeColor;
    console.log(themeColorClass);
    $('body').addClass(themeColorClass);
  });

});

$(document).ready(function () {

  var $body = $('body');
  var $nav = $('nav');
  var $header = $('header');
  var $themeMenu = $('.resume-dropdown-menu > li > a');

  $nav.affix({
    offset: {
      top: $header.outerHeight()
    }
  });

  $nav.on('affix.bs.affix', function (){
    $body.css('margin-top', $nav.height() + parseInt($nav.css('margin-bottom')));
  });

  $nav.on('affix-top.bs.affix', function (){
    $body.css('margin-top', 0);
  });

  $themeMenu.on('click', function() {

    $body.attr('class', '');

    var themeColor = $(this).attr('id');
    var themeColorClass = "theme-" + themeColor;
    $body.addClass(themeColorClass);

    event.preventDefault();

  });

});

add change theme color js