﻿
jQuery(function($){

	$('img.imgover, input:image.imgover').rollover('_ovr');

	// globalNavi フェードアウト
	$('.fade img')
    .hover(function() {
        $(this).stop(true, false).animate({ opacity: .05 }, { duration: 200 })
    }, function() {
        $(this).stop(true, false).animate({ opacity: 1 }, { duration: 300 })
    });


	// スムーズスクロール
	$('a[href*=#]').click(function() {
		var target = this.hash;
		var offset = $(target).offset().top;
		if (offset > $(document).height()-$(window).height()) {
			offset = $(document).height()-$(window).height();
		}
		$('html, body').animate({scrollTop:offset}, {duration:700, easing:'swing'});
		return false;
	});


	$(function() {
		// rel="external"には target="_blank"を付加
		var hyperlink = $('#content a[rel=external]'),
			ClassName = 'external';

		$(hyperlink).not(':has(img)').addClass(ClassName);
		$(hyperlink).attr('target', '_blank');
		
		$('#content a[href$=".pdf"]').not(':has(img)').addClass('link_pdf');
		$('#content a[href$=".xls"]').not(':has(img)').addClass('link_xls');
		$('#content a[href$=".doc"]').not(':has(img)').addClass('link_doc');
		$('#content a[href$=".txt"]').not(':has(img)').addClass('link_txt');
		$('#content a[href^="mailto"]').not(':has(img)').addClass('link_mail');


	});


});


// Google Analytics
var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-18074517-13']);
	_gaq.push(['_setDomainName', '.e-wedding.jp']);
	_gaq.push(['_setAllowHash', false]);
	_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


    
/* ------------------------ */
/* Global Menus
/* ------------------------ */
// フッター
function footer(img_link, html_link) {

	if(img_link == undefined) img_link = '/';
	if(html_link == undefined) html_link = '/';
	
	if(top.location == self.location){
			document.write('<p id="globalNavi2">｜<a href="'+html_link+'">L.FLAT Wedding</a>｜<a href="'+html_link+'space/index.html">L.FLATの結婚式場</a>｜<a href="'+html_link+'salon/index.html">ウエディングサロン</a>｜<a href="'+html_link+'form/request.html">資料請求</a>｜<a href="'+html_link+'form/index.html">お問い合わせ</a>｜</p>',
			'<div id="footer">',
			'<div id="footerBar">',
			'<div id="footerNavi">',
			'<ul>',
			'<li id="fnSitemap"><a href="'+html_link+'sitemap/">サイトマップ</a></li>',
			'<li id="fnPrivacy"><a href="'+html_link+'privacy/">プライバシーポリシー</a></li>',
			'<li id="fnCorporate"><a href="http://lflat.e-wedding.jp/">企業情報</a></li>',
			'</ul>',
			'<p>Copyright &copy; 2011 <a href="http://www.e-wedding.jp/">L.FLAT</a> co. All rights reserved.</p>',
			'<!-- /#footerNavi --></div>',
			'<!-- /#footerBar --></div>',
			'<div id="footerContent">',
			'<address>',
			'<a href="http://www.e-wedding.jp/"><img src="'+img_link+'common/img/group/logo.gif" alt="L.FLAT" width="102" height="32" /></a> <strong>結婚式場 レストランウエディング　エルフラット</strong><br />',
			'岐阜県岐阜市菅生7-2-10　TEL：058-210-0227',
			'</address>',
			'<ul id="groupBanner">',
			'<li><a href="http://www.e-restaurant.jp/"><img src="'+img_link+'common/img/group/bnr_restaurant.gif" alt="エルフラット レストランサイト" width="185" height="80" class="imgover" /></a></li>',
			'<li class="group"><a href="http://lflat.e-wedding.jp/"><img src="'+img_link+'common/img/group/logo_group2.gif" alt="エルフラット グループ" width="110" height="14" /></a></li>',
			'</ul>',
			'<dl>',
			'<dt>岐阜のウエディングをお探しなら</dt>',
			'<dd>｜<a href="http://luna.e-wedding.jp/">ラ・ルーナ ピエーナ</a>｜<a href="http://lunab.e-wedding.jp/">ラ・ルーナ ピエーナ別邸</a>｜<a href="http://cuori.e-wedding.jp/">クオーリ クオーリ</a>｜<a href="http://luce.e-wedding.jp/">ラ・ルーチェ デル ソーレ</a>｜<a href="http://palm.e-wedding.jp/">ザ・パームガーデン</a>｜</dd>',
			'<dt>三重のウエディングをお探しなら</dt>',
			'<dd>｜<a href="http://annu.e-wedding.jp/">アニュレール三重</a>｜<a href="http://onoe.e-wedding.jp/">尾上別荘</a>｜</dd>',
			'</dl>',
			'<!-- /#footerContent --></div>',
			'<!-- /#footer --></div>');
		}
}

