function slide()
{
	$('div.titleBox').show();
	$('div.titleBox').next('div').hide();
	
	//if($.cookie(this.className) !== '')
	//	$('div.info').show();
	
	$.each($('div.titleBox'), function()
	{
		var cookie = $.cookie(this.className);
		if(cookie !== null && String(cookie).length > 0)
		{
			var oSliders = cookie.replace(' ','').split(' ');
			for(var i=0; i<oSliders.length; i++)
			{
				$('#'+oSliders[i].replace(' ','')).show();
			}
		}
	});

	$('div.titleBox').click(
		function()
		{
			var section = $(this).next('div');
			var sectionId = section.attr('id');
			if(section.is(':visible'))
			{
				section.slideUp('fast');
				$.cookie(this.className, $.cookie(this.className).replace(' '+sectionId,''));
			}
			else
			{
				section.slideDown('fast');
				if($.cookie(this.className) !== null)
					$.cookie(this.className, $.cookie(this.className)+' '+sectionId);
				else					
					$.cookie(this.className, ' '+sectionId);
			}
			if(($.cookie('titleBox') !== '') && ($.cookie('titleBox') !== null))
				$('div.info').fadeIn('fast');
			else
				$('div.info').fadeOut('fast');
		}
	);
	
	$('div.katalog').click(
		function()
		{
			var cookie = $.cookie('titleBox');
			if(cookie !== null && String(cookie).length > 0)
			{
				var oSliders = cookie.replace(' ','').split(' ');
				for(var i=0; i<oSliders.length; i++)
				{
					$('#'+oSliders[i].replace(' ','')).slideUp('fast');
				}
				$.cookie('titleBox', '');
			}
			$('div.info').fadeOut('fast');
		}
	);
}

function check()
{
	if(($.cookie('titleBox') !== '') && ($.cookie('titleBox') !== null))
		$('div.info').show();
}

function xxx() {
	$.localScroll();
}

$(document).ready(function() {slide();check();xxx();});