function tab_show( show, hide )
{
	li_show = jQuery( '#' + show );
	li_hide = jQuery( '#' + hide );
	
	li_show.addClass( 'selected' );
	li_hide.removeClass( 'selected' );
	
	id_show = li_show.attr( 'rel' );
	id_hide = li_hide.attr( 'rel' );
	
	jQuery( '#block-' + id_hide ).css( 'visibility', 'hidden' );
	jQuery( '#block-' + id_hide ).css( 'height', '0px' );
	jQuery( '#block-' + id_show ).css( 'visibility', 'visible' );
	jQuery( '#block-' + id_show ).css( 'height', 'auto' );
}
function tab_article_show( show, hide )
{
	li_show = jQuery( '#' + show );
	li_hide = jQuery( '#' + hide );
	
	li_show.addClass( 'selected' );
	li_hide.removeClass( 'selected' );
	
	id_show = li_show.attr( 'rel' );
	id_hide = li_hide.attr( 'rel' );
	
	jQuery( '#block-' + id_hide ).css( 'display', 'none' );
	jQuery( '#block-' + id_show ).css( 'display', 'block' );
}




$(function() {
  
	var li = $('.navigation_block > li');
	
	li
	.find('> ul')
		.hide()
	.end()
	.filter('.current')
		.find('> ul')
			.slideDown()
		.end()
	.end()
	.find('> a')
		.click( 
			function(e) {
				var nextUl = $(this).next('ul');
				if ( nextUl.length && !nextUl.is(':visible') ) {
					li.find('> ul:visible').slideUp();
					nextUl.slideDown();
					e.preventDefault();
				};
			}
		);
		
	$('.navigation_rubric.navigation_2329 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-110px -46px');
	});
		
	$('.navigation_rubric.navigation_3193 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-220px -46px');
	});
		
	$('.navigation_rubric.navigation_3200 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-307px -46px');
	});
		
	$('.navigation_rubric.navigation_3201 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-387px -46px');
	});
		
	$('.navigation_rubric.navigation_3202 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-544px -46px');
	});
		
	$('.navigation_rubric.navigation_3203 > ul').mouseenter( function() {
		$(this).prev('a').css('background-position', '-662px -46px');
	});
	
	$('.navigation_niv_1 > li > ul').mouseleave( function() {
		$(this).prev('a').removeAttr('style');
	});

}); 


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-3239722-4']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
