$(function(){
	$('.smb_sdbr_arch_year').click(function(e){
		/*var l = e.target;
		var t = '';
		for(var i in l){
			t += i+': '+l[i]+'\n';	
		}
		alert(t);*/
		if(e.target.classList == 'smb_sdbr_arch_year'){
			if($(this).find('.smb_sdbr_arch_months').is(':visible')){
				$(this).find('.smb_sdbr_arch_months').hide();
				$(this).find('.smb_sdbr_arch_posts').hide();
				$(this).find('.smb_icon_down').addClass('smb_icon_right').removeClass('smb_icon_down');
			}else{
				$(this).find('.smb_sdbr_arch_months').show();
				$(this).children('.smb_icon_right').addClass('smb_icon_down').removeClass('smb_icon_right');
				$(this).siblings().find('.smb_sdbr_arch_months').hide();
				$(this).siblings().find('.smb_sdbr_arch_posts').hide();
				$(this).siblings().find('.smb_icon_down').addClass('smb_icon_right').removeClass('smb_icon_down');
			}
		}
	});
	$('.smb_sdbr_arch_month').click(function(e){
		if(e.target.classList == 'smb_sdbr_arch_month'){
			if($(this).find('.smb_sdbr_arch_posts').is(':visible')){
				$(this).find('.smb_sdbr_arch_posts').hide();
				$(this).find('.smb_icon_down').addClass('smb_icon_right').removeClass('smb_icon_down');
			}else{
				$(this).children('.smb_icon_right').addClass('smb_icon_down').removeClass('smb_icon_right');
				$(this).find('.smb_sdbr_arch_posts').show();
				$(this).siblings().find('.smb_sdbr_arch_posts').hide();
				$(this).siblings().find('.smb_icon_down').addClass('smb_icon_right').removeClass('smb_icon_down');
			}
		}
	});
});
