function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/****************************************************
 ボタン on/off
****************************************************/
var preloadFlag = false;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
function chgImgs(obj,src) {
	if (document.images && (preloadFlag == true)) {
		obj.src = src;
	}
}


function mailto() {
	window.location = "mailto:kanekiti@oumigyuu.co.jp";
}

/****************************************************
 表示／非表示切替時のアニメーション処理
****************************************************/
$(function(){

	$("span#mott").click(function(){

		var strMInn;

		var oStyle = document.getElementById('top4under').style; 
		var strMInn ='<a href="/">＞＞';
		if(oStyle.display == 'none'){
				strMInn += '閉じる</a>';
		        $("div#top4under").show("30");
			} else { 
				strMInn += 'もっと見る</a>';
		        $("div#top4under").hide("30");
		}

		document.getElementById('mott').innerHTML = strMInn;

		return false;

	})

	// 特選近江牛肉クリック
	$("span#oumgniku").click(function(){
		var oStyle = document.getElementById('oumnikulist').style; 
//		var oStyle = $("#oumnikulist").get(0);
		if(oStyle.display == 'none'){
		        $("div#oumnikulist").show("fast");
			document.getElementById('oumgniku').style.fontWeight='bold';
			document.getElementById('arw1').src='/user_data/img/side/arrowmns.gif';
		} else { 
			$("div#oumnikulist").hide("fast");
			document.getElementById('oumgniku').style.fontWeight='normal';
			document.getElementById('arw1').src='/user_data/img/side/arrowpls.gif';
		}

		return false;

	})

	// カネ吉オリジナル商品クリック
	$("span#kaneorg").click(function(){

		var oStyle = document.getElementById('kaneorglist').style; 
		if(oStyle.display == 'none'){
	        $("div#kaneorglist").show("fast");
			document.getElementById('arw2').src='/user_data/img/side/arrowmns.gif';
			document.getElementById('kaneorg_a').style.width='154px';
			document.getElementById('kaneorg').style.fontSize='14px';
			document.getElementById('kaneorg').style.fontWeight='bold';
		} else { 
			$("div#kaneorglist").hide("fast");
			document.getElementById('arw2').src='/user_data/img/side/arrowpls.gif';
			document.getElementById('kaneorg_a').style.width='150px';
			document.getElementById('kaneorg').style.fontSize='14px';
			document.getElementById('kaneorg').style.fontWeight='normal';
		}

		return false;

	})

	// 限定品クリック
	$("span#gentei").click(function(){
		var oStyle = document.getElementById('genteilist').style; 
//		var oStyle = $("#genteilist").get(0);
		if(oStyle.display == 'none'){
		        $("div#genteilist").show("fast");
			document.getElementById('gentei').style.fontWeight='bold';
			document.getElementById('arw5').src='/user_data/img/side/arrowmns.gif';
		} else { 
			$("div#genteilist").hide("fast");
			document.getElementById('gentei').style.fontWeight='normal';
			document.getElementById('arw5').src='/user_data/img/side/arrowpls.gif';
		}

		return false;

	})

	// お買い物ガイド
	$("span#spanguide").click(function(){

		var oStyle = document.getElementById('guidelist').style; 
		if(oStyle.display == 'none'){
	        $("div#guidelist").show("fast");
			document.getElementById('arw3').src='/user_data/img/side/arrowmns.gif';
		} else { 
			$("div#guidelist").hide("fast");
			document.getElementById('arw3').src='/user_data/img/side/arrowpls.gif';
		}
		return false;

	})

	// よくある質問
	$("span#spnfaq").click(function(){

		var oStyle = document.getElementById('faqlist').style; 
		if(oStyle.display == 'none'){
	        $("div#faqlist").show("fast");
			document.getElementById('arw4').src='/user_data/img/side/arrowmns.gif';
			return false;
		} else {
			return true;
		}

		return false;

	})

	//************** よくある質問ページ ********************
	$("span#faq1").click(function(){
		if(document.getElementById('div1').style.display == 'none'){
	        $("div#div1").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq2").click(function(){
		if(document.getElementById('div2').style.display == 'none'){
	        $("div#div2").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq3").click(function(){
		if(document.getElementById('div3').style.display == 'none'){
	        $("div#div3").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq4").click(function(){
		if(document.getElementById('div4').style.display == 'none'){
	        $("div#div4").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq5").click(function(){
		if(document.getElementById('div5').style.display == 'none'){
	        $("div#div5").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq6").click(function(){
		if(document.getElementById('div6').style.display == 'none'){
	        $("div#div6").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq7").click(function(){
		if(document.getElementById('div7').style.display == 'none'){
	        $("div#div7").show("fast");
			return false;
		} else {
			return true;
		}
	})
	$("span#faq8").click(function(){
		if(document.getElementById('div8').style.display == 'none'){
	        $("div#div8").show("fast");
			return false;
		} else {
			return true;
		}
	})

	$("span#contributefrm").click(function(){
		if(document.getElementById('contribute').style.display == 'none'){
	        $("div#contribute").show("fast");
			return false;
		} else {
	        $("div#contribute").hide("fast");
			return false;
		}
	})

	return false;

})


