$().ready(function() {		/**	 * ヘッダーメニューのポップアップの動作をセット	 *	 *	 */	$('a', $('ul.gmenu')).each(function() {		$(this).click(function() {			var contents_type, _this, open_count;			_this = $(this); // thisを保持			if(!_this.attr('class')) { return true; }			contents_type = _this.attr('class').replace('gmenu-', '');			open_count = 0;			if($('.'+contents_type, $('div#fukidashi-contents')).css('display') == 'none') {				$('div#fukidashi-box').unbind("outerClick");				$('.gmenu-contents').each(function() {					var gmenu_contents_object = $(this);					if(gmenu_contents_object.css('display') == 'none') { return true; }					open_count++;					gmenu_contents_object.hide();					$('div#fukidashi-box').fadeOut('normal', function() {						$('.'+contents_type, $('div#fukidashi-contents')).show();						$('div#fukidashi-box').css('left', $('.'+contents_type, $('div#fukidashi-contents')).data('left'))												.css('width', $('.'+contents_type, $('div#fukidashi-contents')).data('width'));						$('div#fukidashi-box').fadeIn('normal', function () {							// 枠外タップで削除							$('div#fukidashi-box').bind("outerClick", function (){								$('div#fukidashi-box').unbind("outerClick");								$('div#fukidashi-box').fadeOut('normal', function () {									$('.'+contents_type, $('div#fukidashi-contents')).hide();								});							});						});					});				});				if(open_count == 0 ) {					$('div#fukidashi-box').unbind("outerClick");					$('.'+contents_type, $('div#fukidashi-contents')).show();					$('div#fukidashi-box').css('left', $('.'+contents_type, $('div#fukidashi-contents')).data('left'))											.css('width', $('.'+contents_type, $('div#fukidashi-contents')).data('width'));					$('div#fukidashi-box').fadeIn('normal', function() {						// 枠外タップで削除						$('div#fukidashi-box').bind("outerClick", function (){ 							$('div#fukidashi-box').unbind("outerClick");							$('div#fukidashi-box').fadeOut('normal', function (){								$('.'+contents_type, $('div#fukidashi-contents')).hide();							});						});					});				}			}		});	});	/**	 * フォントサイズ変更時の動作	 *	 *	 */	function changeFontSize(_this) {		var on_image = "";		on_image = _this.children('img').data('image');		$('img.font-image', $('div#fontsize-box')).each(function() {			var image = "";			image = $(this).data('image');			if(image != on_image) {				$(this).attr('src', image+'.gif?d='+image.replace("img/", ""));			}		});						_this.children('img').attr('src', on_image+'-on.gif?d='+ on_image.replace("img/", ""));			var fontsize = "";		fontsize = _this.data('size');		$.cookie('set_font_size', fontsize); //cookieをセット		$('html').css('font-size', fontsize);	}	$('a', $('div#fontsize-box')).click(function() {		changeFontSize($(this));	});			// 初回表示はCookieを読み込みフォントサイズを設定	var default_font_size = "";	default_font_size = $.cookie('set_font_size');	if(default_font_size) {		$('a', $('div#fontsize-box')).each(function() {			if($(this).data('size') == default_font_size) {				changeFontSize($(this));			}		});	}});
