﻿/* ---------------------------

	loop

--------------------------- */	
jQuery(function(){
	/* HTMLを挿入（指定要素前:before, 後:after, 要素内の先頭:prepend）*/
	// ヘッダーライト
	// jQuery("div#wrap").after("<div id=\"bg-light\"></div>");
	// ヘッダーライン
	// jQuery("div#wrap").after("<div id=\"bg-border-line\"></div>");
	// ナビシャドウ
	// jQuery("div#nav ul").before("<div id=\"nav-shadow\"></div>");
	// Q&A窓口
	// jQuery("div#faqTw ul").after("<div id=\"faqTw-bottom\"></div>");
	// jQuery("div#faqTw").after("<div id=\"faqTw-bottom-bg-t\"></div>");
	// jQuery("div#faqTw").after("<div id=\"faqTw-bottom-bg\"></div>");
	// フッター
	// jQuery("div#wrapIn").after("<div id=\"footer-bottom-shadow\"></div>");
	// jQuery("div#wrapIn").after("<div id=\"footer-bottom-line\"></div>");
	
	// faq
	jQuery("body.faq div#custom-post-content div.section h2 + p").prepend("<span class=\"answer\">A</span>");
});

jQuery(function(){
	/* class属性の追加 */
	// グローバルナビ
	jQuery("ul#menu-nav a").addClass("myButton aButton");
	// 右カラムナビ
	jQuery("ul#menu-bnr-nav a").addClass("myButton aButton");
	// スタッフ紹介
	jQuery("body.staff div#custom-post-content div.section:last").addClass("last-section");
});

// img要素をフェード */
(function(jQuery){
	jQuery(function(){
		jQuery('a img, #pagetop a, #remoteNav a, #news p a, #newsDr p a, #social-media a, .bt')
			.hover(function() {
				jQuery(this).stop(true, false).animate({
							opacity: .5
					}, {
							duration: 200
					})
			}, function() {
					jQuery(this).stop(true, false).animate({
							opacity: 1
					}, {
							duration: 200
					})
		});
	});
})(jQuery);

// CSSスプライトをフェード
jQuery(document).ready(function(){
	jQuery('.myButton').hover(function(){
		jQuery(this).bgFade('fadeIn');
	}, function() {
		jQuery(this).bgFade('fadeOut');
	});
});

// スムーズスクロール
jQuery(function(){
	jQuery("a[href*='#']").filter(function(){
		return !jQuery(this).parent().parent().hasClass("tabs");
	}).slideScroll();
});
