/* Flash Tags
==================================================================================================== */
/* Flash Plugin Check
---------------------------------------------------------------------------------------------------- */
var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
  for (var i = 0; i < words.length; ++i) {
    if (isNaN(parseInt(words[i]))) continue;
    var MM_PluginVersion = words[i];
  }
  var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
  document.write('<scr' + 'ipt language="VBScript"\> \n');	//FS hide this from IE4.5 Mac by splitting the tag
  document.write('on error resume next \n');
  document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
  document.write('</scr' + 'ipt\> \n');
}

/* Write Flash Tags
---------------------------------------------------------------------------------------------------- */
function flashTagsTop() {
  var flashFileName = "common/swf/index"
  if (MM_FlashCanPlay) {
    //document.write('<p>');
    AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','970','height','400','src',flashFileName,'quality','high','pluginspage','http://www.adobe.com/go/getflashplayer','imageTop',flashFileName,'wmode','transparent' ); //end AC code
    //document.write('</p>');
  } else {
    document.write('<p><img src="'+flashFileName+'.jpg" alt="" width="970" height="312" /></p>');
    document.write('<blockquote class="fontSmall">');
    document.write('<p class="fontCaution"><strong>x</strong> Flashムービーが再生できません！</p>');
    document.write('<p>Flashムービーをご覧になるためには、最新のAdobe Flash Playerのダウンロードが必要となります。</p>');
    document.write('<ul><li><a href="http://www.adobe.com/go/getflashplayer" target="_blank">Adobe Flash Playerのダウンロード</a></li></ul>');
    document.write('</blockquote>');
  }
}
  
// 文字サイズ切り替え　Cookie使用
$(function(){
	$("#contents").css("font-size",$.cookie('fsize'));
});
function font(size){
	$("#contents").css("font-size",size);
	$.cookie("fsize",size,{expires:30,path:'/'});
}

/*
// ナビゲーショ
$(function(){
	if ($.browser.msie && $.browser.version < 7) return; 
		$('#navigation li')
		.removeClass('highlight')
		.find('a')
		.append('<span class="hover" />').each(function () {
			var $span = $('> span.hover', this).css('opacity', 0);
			$(this).hover(function () {
				$span.stop().fadeTo(350, 1);// on hover
			}, function () {
				$span.stop().fadeTo(350, 0);// off hover
			});
	});
});
$(function(){
	$('#navigation').find("li").hover(
	function(){	
		var n = $('#navigation').find("li").index(this);
		imgLoad('http://www.nishimoto-house.co.jp/common/image/common/nav_hover'+(n)+'.jpg',n)
		function imgLoad (url,n) {
			a = $("#navigation").find("li").eq(n);
			$('<img />').attr('src', url).appendTo(a)
	    	.load(function () { $(this).fadeIn(); })
	    	.error(function () { $(this).remove(); });
		}
	},
	function(){
		$("#navigation li img").remove();
	});
	
	$("#rc_banners a:eq(1),#rc_banners a:eq(2)").click(function(event){
		event.preventDefault();
		var clickedHref = $(this).attr("href")
		window.open(clickedHref,'_blank','location=no,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,width=950,height=600')
	});
	$("#rc_banners a:eq(3)").attr('target','_blank');
	$("#campaign").find("div.clearFix").find("a").click(function(event){
		event.preventDefault();
		var clickedHref = $(this).attr("href")
		window.open(clickedHref,'_blank','location=no,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,width=600,height=500')
	});
	
	$("h3.step4 + p#complete img").css("top","-50px");
	$(".to-voice + p#complete img").css("top","-50px");
});*/



/*
$(function(){
	var n = new Date();
	var ny = n.getYear();
	if (ny < 2000) { ny += 1900; };
	var nyn = ny+1;
	var nm = n.getMonth() +1;
	//var nm = 12;
	var nmn = nm+1;
	$("select.jcalendar-select-year").append($("<option>"+ny+"</option>").attr("value",ny));
	$("select.jcalendar-select-year").append($("<option>"+nyn+"</option>").attr("value",nyn));

	//$("select.jcalendar-select-month").append($("<option>"+nm+"</option>").attr({value:nm}));

	if(nm==12){
		$("select.jcalendar-select-year").append($("<option>"+nyn+"</option>").attr({value:nyn}));
	//	$("select.jcalendar-select-month").append($("<option>"+1+"</option>").attr({value:1}));
	} else {
	//	$("select.jcalendar-select-month").append($("<option>"+nmn+"</option>").attr({value:nmn}));
	}
	$("tr#time select").focus(function (){
		$("div.jcalendar").slideDown('fast');
	});
	$("span#calendar_btn").click(function (){
		$("div.jcalendar").slideToggle('fast');
	});
});




function setDay(obj){
	obj = obj.form;
	var years = parseInt(obj.years.options[obj.years.selectedIndex].value);
	var months = parseInt(obj.months.options[obj.months.selectedIndex].value);
	var lastday = monthday(years,months);
	var itemnum = obj.days.length;
	if (lastday - 1 < obj.days.selectedIndex) {
		obj.days.selectedIndex = lastday - 1;
	}
	obj.days.length = lastday;
	for (cnt = itemnum + 1;cnt <= lastday;cnt++) {
		obj.days.options[cnt - 1].text = cnt;
	}
}
function monthday(years,months){
	var lastday = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	if (((years % 4 == 0) && (years % 100 != 0)) || (years % 400 == 0)){
		lastday[1] = 29;
	}
	return lastday[months - 1];
}

*/





