$(document).ready(function() {

//menu
$('.top_menu ul li').last().addClass('end');
$('.top_menu ul li').first().addClass('first');

 $(".ankets .item, .bottom_block .item").hover(function () {
      $(this).toggleClass("hover");
    });

         var index = 0;
      $(".ankets .item").each(function (i) {
         index= i+1;
         if(index%4==0){
            $(this).addClass('end');
         }
     
});

   
});


$(function() {

 $(".left_menu ul, .top_menu ul").find("a").each(function(){
 if(location.href.indexOf(this.href) != -1){
 $(this).parent("li").addClass("open");
 }
 });
 });



function equalHeight(group) {
 tallest = 0;
 group.each(function() {
 thisHeight = $(this).height();
 if(thisHeight > tallest) {
 tallest = thisHeight;
 }
 });
 group.height(tallest);
}

$(window).load(function () {
 equalHeight($(".content.text .photo .item, .ankets .item"));
});

