
/*----------------------------------------------

	Theme Name:parc fermé
	Theme URI:http://www.parc-ferme.net/
	Description:Contact JavaScript　07-10-2010 (mm-dd-yyyy)
	Version:ver. 1.0

----------------------------------------------*/




function thisYear() {
	weeks=new Array("日","月","火","水","木","金","土");
	today=new Date();
	y=today.getFullYear();
	m=today.getMonth()+1;
	d=today.getDate();
	w=weeks[today.getDay()];
	document.write(y);
	document.close();
}

function acclog()	{
	document.write("<img src='http://www.parc-ferme.net/cgi-local/acc/acclog.cgi?");
	document.write("referrer="+document.referrer+"&");
	document.write("width="+screen.width+"&");
	document.write("height="+screen.height+"&");
	document.write("color="+screen.colorDepth+"' />");
}



j$(document).ready(function() {
	j$('#globalNavi').find('a').each(function() {
		if( location.href.indexOf(this.href) != -1) {
			j$(this).parent('li').addClass('active');
		}
	});

	j$('#scrollPageTop a').click(function() {
		j$('#body').ScrollTo(1000, 'easeout');
		return false;
	});

	j$('#mail_author,#mail_email,#mail_email_confirm,#mail_subject').hover(
		function() {
			j$(this).addClass('hover');
		},
		function() {
			j$(this).removeClass('hover');
	});

	j$('#mail_author,#mail_email,#mail_email_confirm,#mail_subject').focus(function() {
		j$(this).addClass('focus');
	});

	j$('#mail_author,#mail_email,#mail_email_confirm,#mail_subject').blur(function(){
		j$(this).removeClass('focus');
	});

	j$('input[type="text"],textarea').hover(
		function(){
			j$(this).addClass('hover');
		},
		function(){
			j$(this).removeClass('hover');
	});

	j$('input[type="text"],textarea').focus(function() {
		j$(this).addClass('focus');
	});

	j$('input[type="text"],textarea').blur(function(){
		j$(this).removeClass('focus');
	});

	j$('#mail_preview').hover(
		function(){
			j$(this).addClass('hover');
		},
		function(){
			j$(this).removeClass('hover');
	});

	j$('#mail_cancel').hover(
		function(){
			j$(this).addClass('hover');
		},
		function(){
			j$(this).removeClass('hover');
	});

	j$('#mail_reset').hover(
		function(){
			j$(this).addClass('hover');
		},
		function(){
			j$(this).removeClass('hover');
	});

	j$('#mail_post').hover(
		function(){
			j$(this).addClass('hover');
		},
		function(){
			j$(this).removeClass('hover');
	});

// フォーカスで消える文字
	j$('#comment-text,#mail_text')
		.focus(function() {
			j$(this).val("");
		})
		.blur(function() {
			if (j$(this).val()=="") {
				j$(this).val("コメントをどうぞ")
			};
	});

// コンテンツエリアの角丸
	j$('#container').corner('16px');

// モジュールの角丸
	j$('.module').corner('10px');
	j$('.module-content').corner('10px bottom');
	j$('.widget-content-feed').corner('10px');

	j$('#globalNavi').autosprites({
		offset: '40px',
		activeState: true,
		activeSprites: true
	});

	j$('#social').autosprites({
		offset: '70px',
		activeState: true,
		activeSprites: true
	});

});

