$(document).ready(function(){
							 
	
    $(".timing-row").hover(
        function () {
            $(this).toggleClass("hover");
        },
        function () {
            $(this).toggleClass("hover");
        }
        );
	
    $(".sub").hover(
        function () {
            $(this).addClass("hover");
        },
        function () {
            $(this).removeClass("hover");
        }
        );

	
	$("h6 #map_toggle").click( function() {
		if($(this).attr("status") == "open") {
			$(this).attr("status", "close");
			$(this).text("показать карту");
			$("#contact_map").css("display", "none");
		} else {
			$(this).attr("status", "open");
			$("#contact_map").css("display", "block");			
			$(this).text("скрыть карту");
		}
		
		$.cookie("contact_map", $(this).attr("status"));
	});
	
	if($.cookie("contact_map") == "open") {
		$("h6 #map_toggle").attr("status", "open");
		$("#contact_map").css("display", "block");			
		$("h6 #map_toggle").text("скрыть карту");		
	} else if($.cookie("contact_map") == "close"){
		$("h6 #map_toggle").attr("status", "close");
		$("h6 #map_toggle").text("показать карту");
		$("#contact_map").css("display", "none");
	}
	
	$(".gallery-name h1 a").hover(
		function(){$(".gallery-name h2 a").addClass('hover');},
		function(){$(".gallery-name h2 a").removeClass('hover');}
	);

	$(".gallery-name h2 a").hover(
		function(){$(".gallery-name h1 a").addClass('hover');},
		function(){$(".gallery-name h1 a").removeClass('hover');}
	);


    $(".timing-trainer .comment").hover(
        function () { $(".trainer", $(this).parent().parent()).toggleClass("hide"); },
        function () { $(".trainer", $(this).parent().parent()).toggleClass("hide"); }
    );
    $(".timing-level .comment").hover(
        function () { $(".level", $(this).parent().parent()).toggleClass("hide"); },
        function () { $(".level", $(this).parent().parent()).toggleClass("hide"); }
    );
    $(".timing-time .comment").hover(
        function () { $(".time", $(this).parent().parent()).toggleClass("hide"); },
        function () { $(".time", $(this).parent().parent()).toggleClass("hide"); }
    );
    $(".timing-name  .comment").hover(
        function () { $(".direction", $(this).parent().parent()).toggleClass("hide"); },
        function () { $(".direction", $(this).parent().parent()).toggleClass("hide"); }
    );


	$(".cn").hover(
      function () {
        $(this).addClass("hover");
      },
      function () {
        $(this).removeClass("hover");
      }
    );

    $(".news-main").hover(
      function () {
        $(this).toggleClass("news-main-hover");
      },
      function () {
        $(this).toggleClass("news-main-hover");
      }
    );


});

