jQuery(document).ready(function($) {

	if(!$.cookie("no_region_block") || $.cookie("no_region_block")!=1) {
		$('#ipinfo').show();
	}

	$('.table_hover td').hover(
		function() {
			$(this).css('background-color', '#EDEEF1');

			table = $(this).parent().parent().parent();
			id = table.attr("id");
			if(id) {
				$('#'+id+' tr:nth-child(' + ($(this).parent().index()+1) + ') td:lt(' + $(this).index() + ')').css('background-color', '#EDEEF1');
				$('#'+id+' tr:lt(' + $(this).parent().index() + ') td:nth-child(' + ($(this).index()+1) + ')').css('background-color', '#EDEEF1');
			}
		},
		function() {
			$(this).css('background-color', 'transparent');

			table = $(this).parent().parent().parent();
			id = table.attr("id");
			
			if(id) {
				$('#'+id+' tr:nth-child(' + ($(this).parent().index()+1) + ') td:lt(' + $(this).index() + ')').css('background-color', 'transparent');
				$('#'+id+' tr:lt(' + $(this).parent().index() + ') td:nth-child(' + ($(this).index()+1) + ')').css('background-color', 'transparent');
			}
			
		}
	);

	$('.row_hover tr').hover(
		function() {
			$(this).css('background-color', '#EDEEF1');

			$(this).children().css('background-color', '#EDEEF1');
		},
		function() {
			$(this).css('background-color', 'transparent');

			$(this).children().css('background-color', 'transparent');
			
		}
	);

	if($('#list_action').length && $('#list_action').html()=='<div id="garant"></div>') {
		$('#isaction h2').html('');
	}

	$('#close').click(
		function() {
			$('#ipinfo').hide();
			$.cookie("no_region_block", 1, {
				path: "/"
			});
		}
	)

});
