$(function() {
	//$(window).load(function() {});
	$('.xoxo > li').click(click_sidebar_menu);
});

function click_sidebar_menu() {
	if( $(this).children('ol').length ) {
		if( !$(this).children('.sidebar-menu-group-items').hasClass('sidebar-menu-group-items-active') ) {
			$('#socialHome').hide();
			$('.netWork').hide();
			$('.socialNetworkHome > ol').css('margin', '20px 0 0 15px');
			$('.home-sidebar-menu-fixed').css({height: '360px'});
			
			$('.sidebar-menu-group-items-active').slideUp('normal', function() {
				$(this).removeClass('sidebar-menu-group-items-active');
			});
			
			$(this).children('.sidebar-menu-group-items')
			.addClass('sidebar-menu-group-items-active')
			.slideDown('normal');
		}
		else {
			$('.sidebar-menu-group-items-active').slideUp('normal', function() {
				$(this).removeClass('sidebar-menu-group-items-active');
				$('.socialNetworkHome > ol').removeAttr('style');
				$('#socialHome').show();
				$('.netWork').show();
				$('.home-sidebar-menu-fixed').removeAttr('style');
			});
		}
	}
}
