//ブラウザを判定してIE6,7,8対策を実行
var appVersion = window.navigator.appVersion.toLowerCase();
		if (appVersion.indexOf("msie 7.0") > -1) {
			pngfix();
		}
		else if (appVersion.indexOf("msie 8.0") > -1) {
			pngfix();
		}
		else if (appVersion.indexOf("msie 6.0") > -1) {
			//IE6用ロールオーバー仕様
			var oldFixPng = DD_belatedPNG.fixPng;
			DD_belatedPNG.fixPng = function (el) {
			oldFixPng(el);
			if (el.vml && el.vml.image.fill.getAttribute("src").match(/^(.+)(\.[a-z]+)$/)) {
			el.vml.image.shape.attachEvent('onmouseenter', function() {
			var image = el.vml.image.fill;
			image.setAttribute("src", image.getAttribute("src").replace("_off", "_on"));
			});
			el.vml.image.shape.attachEvent('onmouseleave', function() {
			var image = el.vml.image.fill;
			image.setAttribute("src", image.getAttribute("src").replace("_on", "_off"));
			});
			}
			};
			DD_belatedPNG.fix('img, .png_bg');
};
//mac実機用cssを読み込ませる
if (navigator.appVersion.indexOf("Mac") !=-1){
document.write("<link rel='stylesheet' href='../../css/mac.css' type='text/css' />");
}
jQuery.noConflict();
jQuery(function(){
	//基本のロールオーバー
	jQuery('img.rollover').mouseover(function(){         
	jQuery(this).attr('src',jQuery(this).attr('src').replace("_off", "_on")) 
	}).mouseout(function(){         
	jQuery(this).attr('src',jQuery(this).attr('src').replace("_on", "_off"));     
	}).each(function(){
		jQuery("<img>").attr("src",jQuery(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"))
	})
	//タブメニュー
	var Currenttab = jQuery("ul.tabtitle li a.current").attr("href");
	var CurrentLink = jQuery("ul.tabtitle li a");
	jQuery(Currenttab).show();
	jQuery(CurrentLink).click(function(){
		jQuery(CurrentLink).removeClass("current");
		jQuery(this).addClass("current");
		jQuery("ul.panel li").hide();
		jQuery(jQuery(this).attr("href")).show();
		return false;
		});
	jQuery("a[href^=#]").click(function(){
	var Hash = jQuery(this.hash);
	return false;
	});
	//faqのアニメ
	jQuery('.faq_area').each(function(i) {
		var allimg = jQuery(jQuery(this).find('.faqinner img'));
		var atitle = jQuery(jQuery(this).find('.a_title'));
		var area = jQuery(jQuery(this));
		var answer = jQuery(jQuery(this).find('li.answer'));
		var point = jQuery(jQuery(this).find('.icon_point'));
		var Close = jQuery(jQuery(this).find('.close'));
		var Open = jQuery(jQuery(this).find('.open'));
		var Icon = jQuery(jQuery(this).find('.icon_point'));
		
		jQuery(this).find('.open').click(function(){
			jQuery(allimg).show();
			jQuery(atitle).show();
			jQuery(answer).show();
			jQuery(area).attr('class','faqback');
			jQuery(point).attr('src','../images/icon_1.jpg');
			jQuery(Close).show();
			jQuery(Open).hide();
			jQuery(Icon).css({'top':'0px'});
		});
		
		jQuery(this).find('.close').click(function(){
			jQuery(allimg).hide();
			jQuery(atitle).hide();
			jQuery(answer).hide();
			jQuery(area).attr('class','faq_area');
			jQuery(point).attr('src','../images/icon_2.jpg');
			jQuery(Close).hide();
			jQuery(Open).show();
			jQuery(Icon).css({'top':'2px'});
		});
	});
	//ページトップへのスクロール
	jQuery("a[href^=#top]").click(function(){
	var Hash = jQuery(this.hash);
	var HashOffset = jQuery(Hash).offset().top;
	jQuery("html,body").animate({
	scrollTop: HashOffset
	}, 400);
	return false;
	});
});
//IE7,8のpng透過表示対策
function pngfix() {
jQuery('img').each(function() {
					if(jQuery(this).attr('src').indexOf('.png') != -1) {
						jQuery(this).css({
							'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' +
							jQuery(this).attr('src') +
							'", sizingMethod="scale");'
						});
					}
				});
}
