$(document).ready(function() {
						   
     var reg=/_thumbs\/(.*)$/;
     $("img[src*='_thumbs']").each(function(){          
           arr=reg.exec($(this).attr('src'));
          if(arr[1]){
               $(this).wrap('<a class="lightview" rel="superbox[image]" href="/uploads/'+ arr[1] +'"></a>');
          }
     });						   
				
$('.header .menu ul li').last().addClass('end');
         var index = 0;
      $(".category .item").each(function (i) {
         index= i+1;
         if(index%3==0){
            $(this).addClass('no_pad');
         }
      });
	  
    $("ul.dropdown li").hover(function(){
    
        $('ul:first',this).css('display', 'block');
    
    }, function(){
    
        $('ul:first',this).css('display', 'none');
    
    });
    
					$(".kopat").click(function () {
      $('.noch').fadeOut("1200");

    });
	 
	 $(".open_block").hover(function () {
    $(this).addClass("hover");
  },
  function () {
    $(this).removeClass("hover");
  });
$(".flexcroll").attr("id", function (arr) {
          return "mycustomscrol" + arr;
        })
 
 
 	 $(".category .item .cont_cat").hover(function () {
    $(this).addClass("hover");
  },
  function () {
    $(this).removeClass("hover");
  });
	 
	 
	 
	 
 	 $(".dropdown").hover(function () {
    $(this).addClass("hover");
  },
  function () {
    $(this).removeClass("hover");
  });	
	 
	 
   
});
$(function() {
				var $elem = $('#content');
				
				$('#nav_down').fadeIn('slow');  
				
							$(".pokemon").click(function () {
      $('.fishka').toggleClass("show");
    });
													$(".zakopat span").click(function () {
      $('.fishka').removeClass("show");
    });
							
							$(".pokemon").click(function () {
      $('.noch').fadeIn("1200");
    });
				
				$('#nav_down').click(
					function (e) {
						$('html, body').animate({scrollTop: $elem.height()}, 800);
		

						
					}
				);
					$('#nav_downs').click(
					function (e) {
						$('html, body').animate({scrollTop: $elem.height()}, 800);
		

						
					}
				);
							
            });


$(document).ready(function() {
  if($('#contact').length) {
    $('#contact').ketchup();
  }
 
});

$(function() {

 $(".left_menu ul, .top_menu").find("a").each(function(){
 if(location.href.indexOf(this.href) != -1){
 $(this).addClass("active");
 $(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($(".block_list .item"));
});


