jQuery.fn.fadeToggle = function(speed, easing, callback) { 
	return this.animate({opacity: 'toggle'}, speed, easing, callback); 
};
$(document).ready(initCacc);

function initCacc(){
	$('.leftbox ul').hide();
	$('.leftbox li.active').parent().slideDown();
	$('.leftbox.active ul').slideDown();
	//$('.leftbox h2 span a').click(toggleLeftboxUl);
	//$('.leftbox.active h2 span a').click();
}

function toggleLeftboxUl(e){
	if(!$(this).parents('.leftbox').children('ul').length){
		return true;
	}
	if($(this).parents('.leftbox.contacts').length) return true;
	e.preventDefault();
	$('.leftbox ul').slideUp();
	$(this).parents('.leftbox').children('ul').slideToggle();
}
