/*
 * Date:	       2009-07-01T23:50:00+09:00
 * Author:	       ayumi fujii
 * Description:    Site Script
 * Lisence:        (c) DaLaFarm co,ltd
*/

$.extend({
	_hoverSlow: function(a){
		_h = $(a);
		$(_h).append('<span class="hover">&nbsp;</span>');
		var t = $("span.hover",_h).css({opacity: 0});
		t.hover(
			function(){ $(this).stop(); $(this).animate({ opacity: 1}, "slow"); },
			function(){ $(this).stop(); $(this).animate({ opacity: 0}, "slow"); }
		);
	},
	_hover: function(c){
		$(c).hover(
			function(){ $(this).stop(); $(this).animate({ opacity: 0.6}, "slow"); },
			function(){ $(this).stop(); $(this).animate({ opacity: 1}, "slow"); }
		);
	},
	_topFlash: function(a,b){
			var a = $(a);
			var flashvars = {};
			var params = {};
			var attributes = {};
			swfobject.embedSWF(b, a.get(0).id, "900", "700", "9.0.0", "lib/swf/expressInstall.swf", flashvars, params, attributes);
			a.children().hide();
			a.html('<p>ムービーをご覧になるにはAdobe Flash Playerのインストールが必要です。</p><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>');
	}
});

function init(){
	$._hoverSlow('div#header>h1>a');
	$._hover('div#footer>ul>li>a');
	$._topFlash('div#content>div#main_area','lib/swf/main.swf');
}
$(document).ready(init);