/*
======== table of content. =================================

summary: init idTabs

============================================================
*/

new function(){
	
	var tab = '#monthly_calendar .navi';
	
	if ( $ ) {
		$(document).ready( function() {
			
			var today = new Date();
			var mon = today.getMonth() + 1;
			var def = '#month_'+mon;
			
			$(tab).
				children( 'ul' ).
					children( 'li' ).
						children( 'a' ).
							filter("[href='"+def+"']").
								addClass('selected');
			
			$(tab).idTabs( function( id, list, set ){
				$('a',set).
					removeClass('selected').
					filter("[href='"+id+"']",set).
						addClass('selected');
				
				var i;
				for ( i in list ) {
					$(list[ i ]).hide();
				}
				
				$(id).show();
				return false;
			});
		});
	}
}

