$(document).ready( function() {
              
  /* scroll activate */
  var $scrollID = $('.content-scroll');
  $scrollID.jScrollPane({showArrows:true, scrollbarWidth:20, dragMaxHeight:88, animateTo:true});
   $(".side-slider-links a").each(function () {
    var LinkNum = $(this).parent(".side-slider-links").children("a").index(this);
    var LinkTopPos = $(".content-scroll h3:eq("+LinkNum+")").offset().top - 250;
    $(this).attr("val", ""+ LinkTopPos +"");
  });
  
  $('.side-slider-links a').bind('click',  function() {
    var LinkTopPos2 = parseInt($(this).attr("val"));
    $scrollID[0].scrollTo(LinkTopPos2);
    return false;
    }
  ); 

  /* team */
  $(".side-slider-team a").click( function() {
    var Name = $(this).find(".name").html();
    var Occupation = $(this).find(".occupation").html();
     $("body").append("<div class='overlay-bg'></div><div class='overlay-pop'><span class='name'>"+ Name +"</span><span class='occupation'>"+ Occupation +"</span></div>");
    $(".overlay-bg, .overlay-pop").click( function() { closeOverlay(); });
  });

  function closeOverlay() {
    $(".overlay-bg").animate({opacity : 0 }, "slow", function() { $(this).remove() });
    $(".overlay-pop").animate({opacity : 0 }, "slow", function() { $(this).remove() });
  };

});


    


