

$(function(){
	var colorArr = ['#ffffff', '#fcf2b3', '#e9d4bd', '#e8eec8', '#d1e9f1', '#f9e9e3'];

	$('#EventCalendar a.scroll').each(function(){
		var color = eval($(this).attr('href').charAt(8));
		$(this).hover(
			function(){ $(this).stop().animate({ backgroundColor: colorArr[color]}, 400);},
			function(){ $(this).stop().animate({ backgroundColor: colorArr[0]}, 400);}
		);
	});

	$('div.evtSection').find('ul.clearfix li').each(function(){
		if( $(this).width() > 680){
			$(this).css('whiteSpace','normal');
		}
	});

});

$.fn.extend({
	'spEventHomeSeisei':function(){
		var $spEventHomeTbBorder = $('<span id="b1"></span><span id="b2"></span><span id="b3"></span><span id="b4"></span>').hide();
		$(this).append($spEventHomeTbBorder);
//		$(this).find('#b2, #b4').height( $(this).height()-8 );
		$('#spEventHomeTbBox th a').hover(
			function(){ $spEventHomeTbBorder .stop().fadeTo(300,0.5);},
			function(){ $spEventHomeTbBorder .stop().fadeTo(300,0);}
		);
	}
});




//	var scrollToOffset = -310;
//$(function(){
//
//	var $evtAnc =$('a.evt_scroll');
//	var $htmlbody =$('html, body');
//	var $EventCalendarArea = $('#EventCalendarArea');
//	var $EventCalendar = $('#EventCalendar');
//	var $evtSection = $('div.evtSection');
//	var colorArr = ['#ffffff', '#fcf2b3', '#e9d4bd', '#e8eec8', '#d1e9f1', '#f9e9e3'];
//
//	$evtAnc.click(function(){
//		$.scrollTo( $(this).attr('href'),800,{ offset:{top:scrollToOffset}, axis:'y', easing:'easeOutExpo'} );
//		return false;
//	}).each(function(){
//		var color = eval($(this).attr('href').charAt(8));
//		$(this).hover(
//			function(){ $(this).stop().animate({ backgroundColor: colorArr[color]}, 400);},
//			function(){ $(this).stop().animate({ backgroundColor: colorArr[0]}, 400);}
//		);
//	});
//
//	$(window).scroll(function(){
//		if( $htmlbody.scrollTop() > $EventCalendarArea.offset().top ){
//			$EventCalendar.css('position','fixed');
//		}else{
//			$EventCalendar.css('position','static');
//		}
//	});
//
//	$evtSection.find('ul.clearfix li').each(function(){
//		if( $(this).width() > 680){
//			$(this).css('whiteSpace','normal');
//		}
//	});
//});



