$(function(){
	$('#top_slide').bxSlider({
		mode: 'fade',
		speed: 1000,
		pause: 5000,
		auto: true,
		controls: false,
		auto_direction: 'right',
		next_text: 'next image',
		prev_text: 'previous image',
		width: 467,
		wrapper_class: 'top_slide_container'
	});	
	
	$("#to_blog").hover(
		function(){
			$(this).fadeTo(500, 0.8);
		},
		function(){
			$(this).fadeTo(500, 1);
		}
	);
	
	$(".top_tip").css("display","none");
	$("#sitelogo").hover(
		function(){
			$(".top_tip").fadeTo("fast", 1);
		},
		function(){
			$(".top_tip").fadeTo("fast", 0);
		}
	);

/*
	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear();
*/
	$('#calendar').fullCalendar({
		header:{
			top:'title',
			bottom:'prev,next'
		},
		editable: false,
		height:250,
		buttonText:{
			today: '今月'
		},
		aspectRatio:10,
		titleFormat: {
			month: 'MMM yyyy'
		},
		monthNamesShort:[
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_1.png" width="80" height="65" alt="01"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_2.png" width="80" height="65" alt="02"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_3.png" width="80" height="65" alt="03"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_4.png" width="80" height="65" alt="04"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_5.png" width="80" height="65" alt="05"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_6.png" width="80" height="65" alt="06"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_7.png" width="80" height="65" alt="07"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_8.png" width="80" height="65" alt="08"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_9.png" width="80" height="65" alt="09"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_10.png" width="80" height="65" alt="10"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_11.png" width="80" height="65" alt="11"></span>',
			'<span style="float:left"><img src="http://www.h-and-g.co.jp/images/top_calender_12.png" width="80" height="65" alt="12"></span>'
		],
		dayNamesShort:[
			'<img src="http://www.h-and-g.co.jp/images/top_calender_sun.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_mon.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_tue.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_wed.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_thu.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_fri.png" width="25" height="14">',
			'<img src="http://www.h-and-g.co.jp/images/top_calender_sat.png" width="25" height="14">'
		],
		firstDay:0,
		events: function(start, end, callback) {
			$.getJSON('http://www.h-and-g.co.jp/schedule/calendar.php?'+ new Date().getTime(),function(result) {
				callback(result);
			});
		}
	});
});
