jQuery.noConflict();
var j$ = jQuery;

//browser check
//Windows
if (navigator.userAgent.indexOf("Win") >= 0) {
	if (navigator.appName.indexOf("Microsoft") >= 0) {
		version="win-ie";
	} else {
		if (navigator.appVersion.charAt(0) >= 5) {
			version="win-moz";
		} else {
			version="win-nn";
		}
	}

//Mac X
} else if (navigator.userAgent.indexOf("Safari") >= 0) {
		version="safari";

//Mac 9 & other
} else {
	if (navigator.appName.indexOf("Microsoft") >= 0) {
		version="mac-ie";
	} else {
		if (navigator.appVersion.charAt(0) >= 5) {
			version="mac-moz";
		} else {
			version="mac-nn";
		}
	}
}

urlEn = document.documentElement.lang;
if (urlEn != "en"){
	// fontBtn
	var fontBtn ='';
	fontBtn += '<dl>';
	fontBtn += '<dt><img src="/common/images/img-text-change.gif" width="85" height="13" alt="文字サイズ変更" /></dt>';
	fontBtn += '<dd id="textSmall" onclick="fontstyle(size_s)" onkeypress="fontstyle(size_s)"><img src="/common/images/btn-text-small.gif" width="14" height="14" alt="文字サイズ変更「小」" /></dd>';
	fontBtn += '<dd id="textMedium" onclick="fontstyle(size_m)" onkeypress="fontstyle(size_m)"><img src="/common/images/btn-text-medium-on.gif" width="19" height="17" alt="文字サイズ変更「中」" /></dd>';
	fontBtn += '<dd id="textLarge" onclick="fontstyle(size_l)" onkeypress="fontstyle(size_l)"><img src="/common/images/btn-text-large.gif" width="22" height="21" alt="文字サイズ変更「大」" /></dd>';
	fontBtn += '</dl>';
	// font css change
	var img_s = '/common/images/btn-text-small.gif';
	var img_m = '/common/images/btn-text-medium.gif';
	var img_l = '/common/images/btn-text-large.gif';
	var img_s_on = '/common/images/btn-text-small-on.gif';
	var img_m_on = '/common/images/btn-text-medium-on.gif';
	var img_l_on = '/common/images/btn-text-large-on.gif';
} else {
	// fontBtn
	var fontBtn ='';
	fontBtn += '<dl>';
	fontBtn += '<dt><img src="/en/common/images/img-text-change.gif" width="92" height="13" alt="Change Text Size" /></dt>';
	fontBtn += '<dd id="textSmall" onclick="fontstyle(size_s)" onkeypress="fontstyle(size_s)"><img src="/en/common/images/btn-text-small_ovoff.gif" width="25" height="20" alt="Text Size S" /></dd>';
	fontBtn += '<dd id="textMedium" onclick="fontstyle(size_m)" onkeypress="fontstyle(size_m)"><img src="/en/common/images/btn-text-medium_ovon.gif" width="25" height="20" alt="Text Size M" /></dd>';
	fontBtn += '<dd id="textLarge" onclick="fontstyle(size_l)" onkeypress="fontstyle(size_l)"><img src="/en/common/images/btn-text-large_ovoff.gif" width="25" height="20" alt="Text Size L" /></dd>';
	fontBtn += '</dl>';
	// font css change
	var img_s = '/en/common/images/btn-text-small_ovoff.gif';
	var img_m = '/en/common/images/btn-text-medium_ovoff.gif';
	var img_l = '/en/common/images/btn-text-large_ovoff.gif';
	var img_s_on = '/en/common/images/btn-text-small_ovon.gif';
	var img_m_on = '/en/common/images/btn-text-medium_ovon.gif';
	var img_l_on = '/en/common/images/btn-text-large_ovon.gif';
}

j$(function(){
	if(version == "mac-moz") {	
		size_s = '90%';
		size_m = '110%';
		size_l = '130%';
	}
	else if(version == "safari") {	
		size_s = '80%';
		size_m = '90%';
		size_l = '110%';
	}
	else {
		size_s = '80%';
		size_m = '100%';
		size_l = '120%';
	}

	j$(document.body).css('font-size',j$.cookie('houseStyle'));
	if(j$.cookie('houseStyle') == size_s) {
		j$('#textSmall > img').attr({ src: img_s_on});
		j$('#textMedium > img').attr({ src: img_m});
		j$('#textLarge > img').attr({ src: img_l});
	}
	else if(j$.cookie('houseStyle') == size_m) {
		j$('#textSmall > img').attr({ src: img_s});
		j$('#textMedium > img').attr({ src: img_m_on});
		j$('#textLarge > img').attr({ src: img_l});
	}
	else if(j$.cookie('houseStyle') == size_l) {
		j$('#textSmall > img').attr({ src: img_s});
		j$('#textMedium > img').attr({ src: img_m});
		j$('#textLarge > img').attr({ src: img_l_on});
	}
});

function fontstyle(bodyFontsize){
	j$(document.body).css('font-size',bodyFontsize);
	if(bodyFontsize == size_s){
		j$('#textSmall').html('<img src="/en/common/images/btn-text-small_ovon.gif" width="25" height="20" alt="Text Size S" />');
		j$('#textMedium > img').attr({ src: img_m});
		j$('#textLarge > img').attr({ src: img_l});
	}
	else if(bodyFontsize == size_m){
		j$('#textSmall > img').attr({ src: img_s});
		j$('#textMedium').html('<img src="/en/common/images/btn-text-medium_ovon.gif" width="25" height="20" alt="Text Size M" />');
		j$('#textLarge > img').attr({ src: img_l});
	}
	else if(bodyFontsize == size_l){
		j$('#textSmall > img').attr({ src: img_s});
		j$('#textMedium > img').attr({ src: img_m});
		j$('#textLarge').html('<img src="/en/common/images/btn-text-large_ovon.gif" width="25" height="20" alt="Text Size L" />');
	}
imgRoll();
j$.cookie('houseStyle',bodyFontsize,{expires:30,path:'/'});
};

//measures against flicker
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

//form reset
function clear() {
	this.form.reset(); return false;
}

j$(function(){
	//見出しの前にロケータがある場合
	j$("div#mainContents div.locator h2:first-child").addClass("siblingA");//margin-top: 10px;
	j$("div#mainContents div.locator h3:first-child").addClass("firstChild");//margin-top: 10px;
	j$("div#mainContents div.locator h4:first-child").addClass("firstChild");//margin-top: 10px;
	j$("div#mainContents div.locator + h2").addClass("siblingA");//margin-top: 10px;
	j$("div#mainContents div.locator + h3").addClass("siblingA");//margin-top: 10px;
	j$("div#mainContents div.locator + h4").addClass("siblingA");//margin-top: 10px;

	//見出し要素の後ろにカラムがある場合
	j$("div#mainContents h1 + div.locator h2:first-child").addClass("siblingB");//margin-top: 0;
	j$("div#mainContents h2 + div.locator h3:first-child").addClass("siblingB");//margin-top: 0;

	//見出しが連続する場合
	j$("div#mainContents h2 + h3").addClass("siblingB");//margin-top: 0;
	j$("div#mainContents h3 + h4").addClass("siblingB");//margin-top: 0;

	//見出しと詳細リンクの組み合わせ
	j$("div#mainContents hr + p.learnMore").addClass("siblingB");//margin-top: 0;
	
	//カレント表示
	j$('div#localNavi ul li.current ul li.current[li.current]').addClass('opened');

	//firstChild
	j$('dd.executives dl dt + dd').addClass('sibling');

	//lastChild
	j$('td:last-child').addClass('lastChild');
	//j$('li:last-child').addClass('lastChild'); 071101

	//Links
	//PRIME
	j$('a[@href*="/links/prime"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/prime/index.html",title:"別ウィンドウが開きます"});
	
	//天然効果(R)活性ウコン
	j$('a[@href*="/links/e-ukon"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://e-ukon.jp/",title:"別ウィンドウが開きます"});

	//天然効果(R)活性ウコン90秒CM071122
	j$('a[@href*="/links/ukon-otameshi"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://652329.jp/ukon_otameshi/index.html",title:"別ウィンドウが開きます"});

	//バーモントキッチン
	j$('a[@href*="/links/vmt"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/vmt.html",title:"別ウィンドウが開きます"});
	
	//スパイス オブ ライフ
	j$('a[@href*="h-spice"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.h-spice.jp/",title:"別ウィンドウが開きます"});
	
	//ハウス食品 採用ホームページ
	j$('a[@href*="/links/saiyo"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.housefoods-saiyo.net",title:"別ウィンドウが開きます"});
	
	//SHOPハウス
	j$('a[@href*="/links/shop-house"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.shop-house.com/",title:"別ウィンドウが開きます"});
	
	//Ercuis ＆ Raynaud
	j$('a[@href*="/links/ercuis-raynaud"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.ercuis-raynaud.com/",title:"別ウィンドウが開きます"});
	
	//Adobe Flash Player
	j$('a[@href*="/links/adobe-flash"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=Japanese",title:"別ウィンドウが開きます"});

	//Adobe Reader
	j$('a[@href*="/links/adobe-reader"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.adobe.com/jp/products/acrobat/readstep2.html",title:"別ウィンドウが開きます"});
	
	//Sociomedia SimpleWeb
	j$('a[@href*="/links/sociomedia"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.simpleweb.jp/tt/desc_swm.html",title:"別ウィンドウが開きます"});

	//ハウスの通販（天然効果シリーズ）
	j$('a[@href*="/links/shop-natural"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://652329.jp/",title:"別ウィンドウが開きます"});

	//チーム・マイナス6%
	j$('a[@href*="/links/team-6"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.team-6.jp/",title:"別ウィンドウが開きます"});
	
	//六甲のおいしい水
	j$('a[@href*="/links/aqua"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://house-aqua5.jp/",title:"別ウィンドウが開きます"});

	//バーモントファミリーウォーク2007
	j$('a[@href*="/links/vfw"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.vfw.jp",title:"別ウィンドウが開きます"});

	//「ウコンの力」キャンペーンアンケート
	j$('a[@href*="/links/campaqua-ukon"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"https://research.mpack.ne.jp/spip/071109597101haldi/Default.asp",title:"別ウィンドウが開きます"});

	//カレーキャンペーン
	j$('a[@href*="/links/curry-c"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/fight/index.html",title:"別ウィンドウが開きます"});

	//カレーキャンペーンTOPページ用
	j$('a[@href*="/links/top-curry-c"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/fight/index.html",title:"別ウィンドウが開きます"});

	//カレーキャンペーン90秒CMページ用
	j$('a[@href*="/links/90-curry-c"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/fight/index.html",title:"別ウィンドウが開きます"});

	//個人投資家サイドナビ用（株式関係手続き）
	j$('a[@href*="/links/l_nav-personal-ir-"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.sumitomotrust.co.jp/STA/retail/service/daiko/index.html",title:"別ウィンドウが開きます"});

	//五行歌の会 公式サイトへ用（五行歌TOP）
	j$('a[@href*="/links/gogyokanokai.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://5gyohka.com/",title:"別ウィンドウが開きます"});

	//天然効果(R)活性青じそ乳酸菌90秒CM080215
	j$('a[@href*="/links/0215-aojiso-otameshi"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://652329.jp/index.html",title:"別ウィンドウが開きます"});

	//天然効果(R)活性青じそ乳酸菌90秒CM080229
	j$('a[@href*="/links/0229-aojiso-otameshi"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://652329.jp/index.html",title:"別ウィンドウが開きます"});

	//テーブルウェアフェスティバル 公式サイト用
	j$('a[@href*="/links/raynaud-ercuis-tableware"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.tokyo-dome.co.jp/tableware/",title:"別ウィンドウが開きます"});

	//エコほっとライン 公式サイト用
	j$('a[@href*="/links/ecohotline"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"https://www.infoword.jp/ecohotline/?module=Public&action=Detail&cd=362",title:"別ウィンドウが開きます"});

	//エコほっとライン （環境への取り組みレポートバックナンバー用）
	j$('a[@href*="/links/report_back_ecohotline"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"https://www.infoword.jp/ecohotline/?module=Public&action=Detail&cd=362",title:"別ウィンドウが開きます"});

	//食品安全委員会 （よくあるご質問用）
	j$('a[@href*="/links/fsc"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.fsc.go.jp/sonota/transfattyacids1902.html",title:"別ウィンドウが開きます"});

	//日本農林水産省 （よくあるご質問用）
	j$('a[@href*="/links/maff"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.maff.go.jp/syohi_anzen/trans_fat/index.html",title:"別ウィンドウが開きます"});

	//こうべ森の小学校 （環境への取り組みこうべの森用）
	j$('a[@href*="/links/k5dion"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.k5.dion.ne.jp/~kobemori/morishou_hp/index.htm",title:"別ウィンドウが開きます"});

	//ケロッグ社のウェブサイト （フルーチェキャンペーンページ用）
	j$('a[@href*="/links/fruch_cam_01"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.kellogg.co.jp/",title:"別ウィンドウが開きます"});

	//山下リオの公式サイト （フルーチェキャンペーンページ用）
	j$('a[@href*="/links/fruch_cam_03"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.stardust.co.jp/rooms/section3/file/yamashita/index.html",title:"別ウィンドウが開きます"});

	//オリエンタルラジオの公式サイト （フルーチェキャンペーンページ用）
	j$('a[@href*="/links/fruch_cam_04"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://oriental.laff.jp/blog/",title:"別ウィンドウが開きます"});

	//プライムカレー （90秒CMページ用）
	j$('a[@href*="/links/080307-prime"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/prime/index.html",title:"別ウィンドウが開きます"});
	
	////ファイトカレープロジェクト
	j$('a[@href*="/links/cookpad"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"https://cookpad.com/pr/contest/index.cfm?id=166",title:"別ウィンドウが開きます"});

	////日本カレーでファイト！　フォト＆エピソード
	j$('a[@href*="/links/curry_fight"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/fight/index.html",title:"別ウィンドウが開きます"});

	//江上料理学院　（お料理教室）
	j$('a[@href*="/event/cookingclass/spice/map"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr("title","別ウィンドウが開きます");
	
	//銀座クッキング　（お料理教室）
	j$('a[@href*="/event/cookingclass/oryouri/map"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr("title","別ウィンドウが開きます");

	//PDFクリックカウント用書換え用
	j$('a[@href*="/company/news/dbpdf/85232710f55360.pdf"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"/other/080617.html",title:"別ウィンドウが開きます"});

	//事業所詳細一覧
	j$('#mainContents a[@href*="/company/information/map.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr("title","別ウィンドウが開きます");

	////「バーモントファミリーウォーク」参加者大募集！
	j$('a[@href*="/links/vfw"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.vfw.jp/",title:"別ウィンドウが開きます"});

	////「ウコンの力」モバイルキャンペーン
	j$('a[@href*="/links/ukon_c"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://ukon-cp.jp",title:"別ウィンドウが開きます"});

	////静岡工場地図
	j$('a[@href*="/data/factory/map"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"/data/factory/map.html",title:"別ウィンドウが開きます"});

	////ハウスウェルネスフーズ
	j$('a[@href*="/links/wellness.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.house-wf.co.jp/",title:"別ウィンドウが開きます"});

	//ハウスウェルネスフーズ株式会社
	j$('a[@href*="/links/group01.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).attr({href:"http://www.house-wf.co.jp/",title:"別ウィンドウが開きます"});

	//サンハウス食品株式会社
	j$('a[@href*="/links/group02.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).attr({href:"http://www.shouse.jp/",title:"別ウィンドウが開きます"});

	//株式会社デリカシェフ
	j$('a[@href*="/links/group03.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).attr({href:"http://delica-chef.co.jp/public/",title:"別ウィンドウが開きます"});

	//ハウスフーズアメリカ Corp
	j$('a[@href*="/links/group04.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).attr({href:"http://www.house-foods.com/",title:"別ウィンドウが開きます"});

	////シチューブログ 関連・商品サイト用
	j$('a[@href*="/links/stewblog-01"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.recipe-blog.jp/special/stew/",title:"別ウィンドウが開きます"});

	////シチューブログ プロダクトTOP用
	j$('a[@href*="/links/stewblog-02"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.recipe-blog.jp/special/stew/",title:"別ウィンドウが開きます"});

	////シチューブログ HOME用
	j$('a[@href*="/links/stewblog-home"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.recipe-blog.jp/special/stew/",title:"別ウィンドウが開きます"});

	////ディズニーイベント用
	j$('a[@href*="/links/disney"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.tokyodisneyresort.co.jp/tds/japanese/event/alacarte/index.html",title:"別ウィンドウが開きます"});

	//スパイス オブ ライフ ディズニーイベント用
	j$('a[@href*="h-spice-disney"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.h-spice.jp/",title:"別ウィンドウが開きます"});
	
	////食育体験教室
	j$('a[@href*="/event/shokuiku/map"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"/event/shokuiku/map.html",title:"別ウィンドウが開きます"});

	//ＮＰＯ法人こども環境活動支援協会
	j$('a[@href*="/links/leaf"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).attr({href:"http://leaf.or.jp/ ",title:"別ウィンドウが開きます"});

	////スパイスレシピラリー 関連・商品サイト用
	j$('a[@href*="/links/spicerecipe.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.recipe-blog.jp/special/spice/index.html",title:"別ウィンドウが開きます"});

	////スパイスレシピラリー HOME用
	j$('a[@href*="/links/spicerecipe-top.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.recipe-blog.jp/special/spice/index.html",title:"別ウィンドウが開きます"});

	////カレーフォーラム HOME用
	j$('a[@href*="/data/curry/health/index.html"]').click(function(){
		var urlHealth = location.href.indexOf("/data/curry/health/");
			if (urlHealth == -1) {
			window.open(this.href, "_blank");
			return false;
			}
	}).attr({href:"/data/curry/health/index.html",title:"別ウィンドウが開きます"});

	////「ウコンの力」飲んで集めて「力」をもらおうキャンペーン
	j$('a[@href*="/links/ukon-chikara.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://chikara-cp.jp/",title:"別ウィンドウが開きます"});

	////メルシャンキャンペーン TOP用
	j$('a[@href*="/links/wine-top.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.mercian.co.jp/enjoy/mstyle/20081031/campaign.html",title:"別ウィンドウが開きます"});

	////メルシャンキャンペーン ヌーヴォーとは？ページ用
	j$('a[@href*="/links/wine-nouveau.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.mercian.co.jp/enjoy/mstyle/20081031/campaign.html",title:"別ウィンドウが開きます"});

	////メルシャンキャンペーン ソムリエ濱田おすすめページ用
	j$('a[@href*="/links/wine-sommelier.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.mercian.co.jp/enjoy/mstyle/20081031/campaign.html",title:"別ウィンドウが開きます"});

	////メルシャンキャンペーン プレゼントページ用
	j$('a[@href*="/links/wine-present.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.mercian.co.jp/enjoy/mstyle/20081031/campaign.html",title:"別ウィンドウが開きます"});

	////ボージョレ・ヌーヴォーとシチューを楽しむ会
	j$('a[@href*="/links/winestew.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.mercian.co.jp/wine/nouveau2008/wine.html",title:"別ウィンドウが開きます"});

	////今月のおすすすめ カレー鍋つゆ HOME用
	j$('a[@href*="/links/currynabe-home.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/nabe/index.html",title:"別ウィンドウが開きます"});

	////今月のおすすすめ カレー鍋つゆ おすすめTOP用
	j$('a[@href*="/links/currynabe-recommend.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/nabe/index.html",title:"別ウィンドウが開きます"});

	////今月のおすすすめ カレー鍋つゆ 商品カタログ用
	j$('a[@href*="/links/currynabe-catalog.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://vmt.jp/nabe/index.html",title:"別ウィンドウが開きます"});

	////TVCM ウコンの力 「福耳」オフィス オーガスタ用 飲んで帰ろう篇
	j$('a[@href*="/links/ukon-fukumimi.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.office-augusta.com/",title:"別ウィンドウが開きます"});

	////TVCM ウコンの力 「福耳」オフィス オーガスタ用 新しい出会い篇
	j$('a[@href*="/links/ukon-fukumimi2.html"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).attr({href:"http://www.office-augusta.com/",title:"別ウィンドウが開きます"});

	//別ウィンドウ
	j$('a[@href*="/links.php?"]').click(function(){
		var blaUri = this.href;
		var numU = blaUri.indexOf('u=');
		var setUri = blaUri.slice(numU+2);
		window.open(unescape(setUri), "_blank");
		return false;	
	}).each(function() {
		j$(this.parentNode).addClass('external');
	});

	//PDF
	j$('a[@href$=".pdf"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).each(function() {
		j$(this.parentNode).addClass('pdf');
	});	

		urlEn = location.href.indexOf("/en/");
	if (urlEn == -1){
		j$('a[@href*="/links.php?"]').attr("title","別ウィンドウが開きます");
		j$('a[@href$=".pdf"]').attr("title","別ウィンドウが開きます");
	} else {
		j$('a[@href*="/links.php?"]').attr("title","Another window opens.");
		j$('a[@href$=".pdf"]').attr("title","Another window opens.");
	}

	//ジオトラスト
	j$("#geotrustExplanation").html("当サイトでは、安全性の証明とプライバシー保護のため、日本ジオトラストのSSLサーバ証明書を使用し、SSL暗号化通信を実現しています。スマートシールのクリックにより、サーバ証明書の検証結果をご確認ください。");


	//ユーティリティーズ
	var utilities = '<div class="column4B" id="utilities">';	
	utilities += '<p class="printBtn"><img src="/common/images/btn-print.gif" alt="このページを印刷する" width="155" height="22"></p>';
	utilities += '<p class="pageBack"><a href="JavaScript:history.back();">前のページへ</a></p>';
	utilities += '<!-- /column4B --></div>';

	j$('#banner').after(utilities);
	j$('p.printBtn img').click(function(){
		window.open("print.html?"+location.href);
	});
	
	//Scroll 071127
/*
	var pageUrl = location.href.split('#')[0];
	j$('a[@href]').each(function() {
  		if (this.href.indexOf(pageUrl + '#') == 0) {
    		var id = this.href.split('#')[1];
    		j$(this).click(function() {
      			j$('#' + id).ScrollTo(300, 'easeout');
      			return false;
    		});  
  		}
	});
*/
});

//既存のJS
//cngimg.js
function cngimg(n){
	var imgsrc = document.images[n].src;
	if(imgsrc.indexOf("_on") < 0){
		document.images[n].src=imgsrc.substring(0,imgsrc.length-4) +"_on.gif";
	}
	else{
		document.images[n].src=imgsrc.substring(0,imgsrc.length-7) +".gif";
	}
}

function gnavicngimg(n){
	var imgsrc = document.images[n].src;
	if(imgsrc.indexOf("_on") < 0){
		document.images[n].src=imgsrc.substring(0,imgsrc.length-4) +"_on.jpg";
	}
	else{
		document.images[n].src=imgsrc.substring(0,imgsrc.length-7) +".jpg";
	}
}

function cngobj(id,atr){
	if(!atr) atr='src';
	var imgsrc = document.all[id][atr];
	var m=imgsrc.match(/^(.+?)(_on)?(\.\w+)j$/);
	if(m) document.all[id][atr]=m[1]+(m[2]==''?'_on':'')+m[3];
}

// curry_top.js
if(navigator.appVersion.charAt(0) >= "3"){
var img = new Array();
img[0] = new Image(); img[0].src ="/data/curry/images/menu01_1.gif";
img[1] = new Image(); img[1].src ="/data/curry/images/menu01_1_on.gif";
img[2] = new Image(); img[2].src ="/data/curry/images/menu01_2.gif";
img[3] = new Image(); img[3].src ="/data/curry/images/menu01_2_on.gif";
img[4] = new Image(); img[4].src ="/data/curry/images/menu02.gif";
img[5] = new Image(); img[5].src ="/data/curry/images/menu02_on.gif";
img[6] = new Image(); img[6].src ="/data/curry/images/menu03.gif";
img[7] = new Image(); img[7].src ="/data/curry/images/menu03_on.gif";
img[8] = new Image(); img[8].src ="/data/curry/images/menu05.gif";
img[9] = new Image(); img[9].src ="/data/curry/images/menu05_on.gif";
img[10] = new Image(); img[10].src ="/data/curry/images/menu06.gif";
img[11] = new Image(); img[11].src ="/data/curry/images/menu06_on.gif";
}

function Mover(nam,num){
if(navigator.appVersion.charAt(0) >= "3"){
document.images[nam].src = img[num].src;
}else{}
}

function Mout(nam,num){
document.images[nam].src = img[num].src;
}

/* 2010 */
j$(function(){
imgRoll();
});
function imgRoll(){
	var outImgName = "_ovoff";
	var overImgName = "_ovon";
	var preload = new Array();

	if(document.getElementsByTagName){
		var imgTagData = document.getElementsByTagName("img");
		var reOverImg = new RegExp(outImgName + "+(\.[a-z]+)$");
		var reOutImg = new RegExp(overImgName + "+(\.[a-z]+)$");

		for(var i=0; i<imgTagData.length; i++){
			if(imgTagData[i].getAttribute("src").match(reOverImg)){
				preload[i] = new Image();
				preload[i].src = imgTagData[i].getAttribute("src").replace(reOverImg, overImgName + "$1");
				imgTagData[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace(reOverImg, overImgName + "$1"));
				}
	
				imgTagData[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace(reOutImg, outImgName + "$1"));
				}
			}
		}
	}
	
	if(document.getElementsByTagName){
		var inputTagData = document.getElementsByTagName("input");
		var reOverImg = new RegExp(outImgName + "+(\.[a-z]+)$");
		var reOutImg = new RegExp(overImgName + "+(\.[a-z]+)$");
	
		for(var i=0; i<inputTagData.length; i++){
			if(inputTagData[i].src && inputTagData[i].getAttribute("src").match(reOverImg)){
				preload[i] = new Image();
				preload[i].src = inputTagData[i].getAttribute("src").replace(reOverImg, overImgName + "$1");
	
				inputTagData[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace(reOverImg, overImgName + "$1"));
				}
	
				inputTagData[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace(reOutImg, outImgName + "$1"));
				}
			}
		}
	}
}


