/*
 * jQuery UI 1.8rc1
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(b){var a=b.browser.mozilla&&(parseFloat(b.browser.version)<1.9);b.ui={version:"1.8rc1",plugin:{add:function(d,e,g){var f=b.ui[d].prototype;for(var c in g){f.plugins[c]=f.plugins[c]||[];f.plugins[c].push([e,g[c]])}},call:function(c,e,d){var g=c.plugins[e];if(!g||!c.element[0].parentNode){return}for(var f=0;f<g.length;f++){if(c.options[g[f][0]]){g[f][1].apply(c.element,d)}}}},contains:function(d,c){return document.compareDocumentPosition?d.compareDocumentPosition(c)&16:d!==c&&d.contains(c)},hasScroll:function(f,d){if(b(f).css("overflow")=="hidden"){return false}var c=(d&&d=="left")?"scrollLeft":"scrollTop",e=false;if(f[c]>0){return true}f[c]=1;e=(f[c]>0);f[c]=0;return e},isOverAxis:function(d,c,e){return(d>c)&&(d<(c+e))},isOver:function(h,d,g,f,c,e){return b.ui.isOverAxis(h,g,c)&&b.ui.isOverAxis(d,f,e)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};b.fn.extend({_focus:b.fn.focus,focus:function(c,d){return typeof c==="number"?this.each(function(){var e=this;setTimeout(function(){b(e).focus();(d&&d.call(e))},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var c;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){c=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{c=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!c.length?b(document):c},zIndex:function(d){if(d!==undefined){return this.css("zIndex",d)}var c=this[0];while(c&&c.style){if(c.style.zIndex!==""&&c.style.zIndex!==0){return +c.style.zIndex}c=c.parentNode}return 0}});b.extend(b.expr[":"],{data:function(e,d,c){return !!b.data(e,c[3])},focusable:function(d){var e=d.nodeName.toLowerCase(),c=b.attr(d,"tabindex");return(/input|select|textarea|button|object/.test(e)?!d.disabled:"a"==e||"area"==e?d.href||!isNaN(c):!isNaN(c))&&!b(d)["area"==e?"parents":"closest"](":hidden").length},tabbable:function(d){var c=b.attr(d,"tabindex");return(isNaN(c)||c>=0)&&b(d).is(":focusable")}})})(jQuery);;/*!
 * jQuery UI Widget 1.8rc1
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Widget
 */
/*
 * jQuery UI Widget 1.8rc1
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b){var a=b.fn.remove;b.fn.remove=function(c,d){if(!d){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}return a.apply(this,arguments)};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(i){return !!b.data(i,d)};b[e]=b[e]||{};b[e][d]=function(i,j){if(arguments.length){this._createWidget(i,j)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var i=b.data(this,d),j=i&&b.isFunction(i[g])?i[g].apply(i,f):i;if(j!==i&&j!==undefined){h=j;return false}})}else{this.each(function(){var i=b.data(this,d);if(i){if(g){i.option(g)}i._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery);;/*
 * jQuery UI Accordion 1.8rc1
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},_create:function(){var d=this.options,b=this;this.running=0;this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){var e=c.closest(".ui-accordion-header");if(e.length){this.active=e}else{this.active=c.closest(".ui-accordion-content").prev()}}}this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");this._createIcons();if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(f){return b._keydown(f)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(f){b._clickHandler.call(b,f,this);f.preventDefault()})}},_createIcons:function(){var b=this.options;if(b.icons){a("<span/>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}return this},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b=="active"){this.activate(c)}if(b=="icons"){this._destroyIcons();if(c){this._createIcons()}}},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var d=this.options,c;if(d.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(d.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height())}).height(c)}}return this},activate:function(b){this.options.active=b;var c=this._findActive(b)[0];this._clickHandler({target:c},c);return this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return}if(!b.target){if(!d.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];d.active=d.collapsible&&i?false:a(".ui-accordion-header",this.element).index(g);if(this.running||(!d.collapsible&&i)){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(h&&!l[h]&&!a.easing[h]){h="slide"}if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.8rc1",animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g=0,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.end-l.start===0)?0:(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})}}})})(jQuery);;

/* jQuery swapImage
   画像swap処理
 */
jQuery.fn.swapImage = function(opt){
	opt = $.extend({
		suffixOff: '_off',
		suffixOn: '_on'
	},opt);
	var preload = {};
	return this.each(function(){
		$('img, input[type=image]', this).each(function(){
			var img = this;
			var src = $(img).attr('src') || '';
			if(src.indexOf(opt.suffixOff) !== -1){
				var srcOn = src.replace(opt.suffixOff+'.',opt.suffixOn+'.');
				if(typeof(preload[srcOn])){
					preload[srcOn] = 1;
					(new Image()).src = srcOn;
				}
				$(img).hover(
					function(){
						$(img).attr('src',srcOn);
					},
					function(){
						$(img).attr('src',src);
					}
				)
				$(img).parent().filter('a').focus(function(){
					$(img).attr('src',srcOn);
				}).blur(function(){
					$(img).attr('src',src);
				});
			}
		});
	});
};

/* jQuery autoPopup
   ウィンドウポップアップ処理
 */
jQuery.fn.autoPopup = function(opt){
	opt = $.extend({
		width: 500,
		height: 500,
		target: '_blank'
	},opt);
	return this.each(function(){
		$("a[rel^='popup']", this).each(function(){
			if($(this).attr('rel').match(/^popup(?:\[(\d+?),(\d+?)\])?$/)){
				var w = RegExp.$1 ? RegExp.$1 : opt.width;
				var h = RegExp.$2 ? RegExp.$2 : opt.height;
				$(this).click(function(){
					window.open($(this).attr('href'), opt.target, 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h).focus();
					return false;
				});
			}
		});
	});
};


/*
======================================================================
	IE6 で onResize 処理
======================================================================
*/
(function ($, _document) {
	if (!$.browser.msie)
		return;
	function callback(evt) {
		evt.type = "resize";
		jQuery.event.handle.apply(this, arguments);
	}
	function getSize() {
		var root = document.documentElement,
		    body = document.body;
		return {
			w: root && root.clientWidth  || body.clientWidth,
			h: root && root.clientHeight || body.clientHeight
		};
	}
	var _lock = 0, _size, _use;
	$.event.special.resize = {
		setup: function () {
			if (!this.setTimeout)
				return false;
			_size = getSize();
			_use = true;
			(function loop() {
				if (!_lock++) {
					var size = getSize();
					if (_size.w !== size.w || _size.h !== size.h) {
						_size = size;
						var evt = $.Event("resize");
						evt.target = evt.originalTarget = evt.currentTarget = window;
						$.event.handle.call(this, evt);
					}
					setTimeout(function() { _lock = 0; }, 0);
				}
				if (_use) {
					setTimeout(loop, 100);
				}
			})();
		},
		teardown: function () {
			if (!this.setTimeout)
				return false;
			_use = false;
		}
	};
})(jQuery);


/*
======================================================================
	メニューエリア
======================================================================
*/
$(function(){
	var _tmp = $('#HELP_CONTENTS');
	$('#HELP_CENTER_INNER').load('/help/assets/html/helpmenu.html #HELP_MENU', function(){
		$('#HELP_CENTER_INNER').append(_tmp)

		// ヘッダー、フッターのインクルード
		var _headerHTML = '<div id="POPUP_HEADER" class="cmn-clearfix"><h1><a href="/help/"><img src="/help/assets/images/help/st_help_center.gif" width="308" height="39" alt="日本経済新聞 ヘルプセンター"></a></h1><ul class="bs-menu"><li class="bsc-link"><a href="/help/contact/">お問い合わせ</a></li><li class="bsc-link"><a href="http://faq.nikkei.com/EokpControl?&event=TE0008" target="_blank">よくある質問</a></li><li class="bsc-link"><a href="/info/tos.html">規約</a></li></ul></div>';
		
		var _footerHTML = '<div id="RETURN_TO_PAGETOP"><div class="cmn-clearfix" id="RETURN_TO_PAGETOP_BODY"><a href="#HELP_CENTER"><img width="114" height="20" alt="ページの先頭へ" src="/help/assets/images/help/btn_gototop_small_off.gif"></a></div></div><div id="ABOUT_NIKKEI"><div class="cmn-clearfix" id="ABOUT_NIKKEI_BODY"><p class="bs-copyright"><img width="63" height="16" alt="NIKKEI" src="/help/assets/images/help/logo_aboutnikkei_nikkei.gif"/> Copyright &copy; ' + new Date().getFullYear() + ' Nikkei Inc. All rights reserved.</p></div></div>';

		var _onMenuHTML = '<p id="SHOW_MENU">&#8810; メニュー表示</p>';
		
		var _offMenuHTML = '<p id="HIDE_MENU">メニューを閉じる</p>';

		$('#HELP_CONTENTS .help_body').after(_footerHTML);
		$('#HELP_CONTENTS').before(_headerHTML);
		$('#HELP_CONTENTS').prepend(_onMenuHTML);
		$('#HELP_MENU').prepend(_offMenuHTML);

		function getSize() {
			var root = document.documentElement,
			    body = document.body;
			return {
				w: root && root.clientWidth  || body.clientWidth,
				h: root && root.clientHeight || body.clientHeight
			};
		}

		// 画面構成
		var _onResizeHandler = function(){
			var _contentsHeight = $('#HELP_CONTENTS').height();
			$('#HELP_MENU').css('left', $('#POPUP_HEADER').offset().left);
			$('#HELP_MENU').css('height', _contentsHeight);
			if($('body').width() >= 480 && $('#HELP_MENU').css('display') == 'none'){
				$('#HELP_MENU').show();
			}
			
		};

		$(window).bind("resize", _onResizeHandler);
		_onResizeHandler();

		var page = $('#HELP_CONTENTS').attr('class');
		var pageNum;
		switch(page){
			case "contents" :
				pageNum = 0;
				break;
			case "feature" :
				pageNum = 1;
				break;
			case "mobile" :
				pageNum = 2;
				break;
			case "iapps" :
				pageNum = 3;
				break;
			case "android" :
				pageNum = 4;
				break;
			case "galapagos" :
				pageNum = 5;
				break;
			case "setup" :
				pageNum = 6;
				break;
			case "plan" :
				pageNum = 7;
				break;
			case "id" :
				pageNum = 8;
				break;
			case "member" :
				pageNum = 9;
				break;
			case "policy" :
				pageNum = 10;
				break;
			case "contact" :
				pageNum = 12;
				break;
			case "site" :
				pageNum = 13;
				break;
			default :
				pageNum = 0;
				break;
		}

		$('#HELP_MENU').accordion({
			autoHeight: false,
			collapsible: true,
			header: 'h2.header',
			active: pageNum
		});

		$('#HELP_MENU').bind('accordionchangestart', function(event, ui) {
			if(!$(ui.newHeader).is(':has(a)')) {
				$(ui.newHeader).css('background-image', 'url(/help/assets/images/help/mark_link_list_05.gif)');
				$(ui.oldHeader).css('background-image', 'url(/help/assets/images/help/mark_link_list_04.gif)');
			} else {
				//alert($(ul.newHeader));
				window.location.href = $(ul.newHeader).children('a').attr('href');
			}
		});

		$('#HELP_MENU').bind('accordionchange', function(event, ui) {
			$('html').animate({ scrollTop: 0 }, 'fast');
			$('#HELP_MENU').animate({ scrollTop: 0 }, 'fast');
		});

		// 共通処理
		$('body').swapImage();
		$('body').autoPopup();

		var _path = window.location.pathname + window.location.hash;
		
		$("#HELP_MENU a").each(function(){
			if($(this).attr("href") == _path){
				$(this).parent().addClass("selected")
			}
		});

		$("#SHOW_MENU").click(function(){
			$("#HELP_MENU").show("fast");
		});
		
		$("#HIDE_MENU").click(function(){
			$("#HELP_MENU").hide();
		});
		
		$("#HELP_MENU h3, #HELP_MENU h4, #HELP_MENU h5, #HELP_MENU h6").click(function(){
			if($('body').width() < 480 && $('#HELP_MENU').css('display') == 'block')
				$("#HELP_MENU").hide();
		});
	});

});


