$(document).ready(function(){
  /*$('a[href*="#"]').click(function() {
  if (location.pathname == this.pathname && location.host == this.host) {
    var target = $(this.hash);
    var correction = 30;
	  target = target.size() && target || $("[name=" + this.hash.slice(1) +']');
	  if (target.size()) {
      $('html,body').animate({
    	scrollTop: ($(target).offset().top-correction)
      }, 1000);
	    return false;
	       }
	    };
		
  });*/
  
	$(".scroll-link,.top").click(function() {
	   var elementClicked = $(this).attr("href");
	   var destination = $(elementClicked).offset().top;
	   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 1000 );
	   return false;
	});
  
  $("#team article li").each(function (i) {
    i = i+1;
    $(this).addClass("item_"+i);
  });
  $("#services li h3").each(function(){
		var currentTallest = 0;
    $("#services li h3").each(function(i){
			if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
		});
		$("#services li h3").css({'height': currentTallest}); 
  });
  
});
