/* ============================== nextia.js ============================== */
/*! 
 *    @fileoverview
 *       ネクスティア生命保険 静的ページ汎用 共通基本スクリプト
 *       (charset : "Shift_JIS")
 *
 *    @version 1.2.20110927
 *    @requires jquery.js
 *    @requires bajl.js
 */
(function(a){window.Nextia=a.extend(window.Nextia,{settings:{}});Nextia.addUserAgentCName=function(){a.each(BAJL.ua,function(b,c){if(c===true&&b!="isDOMReady"){a(document.body).addClass("bajl-ua-"+b)}});if(BAJL.ua.isIE){a(document.body).addClass("bajl-ua-isIE"+BAJL.ua.version)}};Nextia.removeComments=function(){if(!BAJL.ua.isIE||BAJL.ua.documentMode!=7){return}a("body").each(function(){var b=this.getElementsByTagName("!");while(b[0]){a(b[0]).remove()}})};Nextia.createTitleFromAlt=function(){if(BAJL.ua.isIE&&BAJL.ua.documentMode<=7){return}a("img, input:image, area").live("mouseenter",function(c){var b=c.currentTarget;if(b.getAttribute("title")==null){b.title=b.alt||""}})};Nextia.linkIconExtrudePrepare=function(){if(BAJL.ua.isIE){return}a('img[class^="icon-"]').closest("a").addClass("has-link-icon")};jQuery.fn.Nextia_SelectEventAssist=function(c){c=Math.max(c,0)||250;this.filter("select").keyup(b).mousewheel(b);return this;function b(){var d=a(this);var e="Nextia.SelectEventAssist.trigger";d.data(e)||d.data(e,BAJL.BarrageShield(function(f){f.trigger("change")},c));d.data(e)(d)}};(function(){a.fx.off=false;a.easing.def="easeOutCubic";a(function(){Nextia.addUserAgentCName();Nextia.removeComments()})})()})(jQuery);



/* ============================== nextia.balloon.js ============================== */
/*! 
 *    @fileoverview
 *       ネクスティア生命保険 静的ページ汎用 各種バルーン
 *       (charset : "Shift_JIS")
 *
 *    @version 1.4.20110924
 *    @requires jquery.js
 *    @requires bajl.js
 *    @requires nextia.js
 */
(function(a){a(function(){var i=BAJL.ua.isIE&&BAJL.ua.documentMode<7;var f=250;var c=500;var h=10;var e="Nextia.Gloassary.Balloon.showTimer";var b="Nextia.Gloassary.Balloon.hideTimer";a("dl.glossary-balloon > dt, span.glossary-label > dfn").live("mouseenter",g).live("mouseleave",d);function g(m){var j=a(m.currentTarget);var l=j.next();var k=j.outerHeight();(l.data(e)||new BAJL.Timeout).clear();l.data(e,new BAJL.Timeout(function(){l.stop().show().css({opacity:0,bottom:k}).animate({bottom:"+="+h,opacity:1},f)},c))}function d(l){var j=a(l.currentTarget);var k=j.next();(k.data(e)||new BAJL.Timeout).clear();k.stop().animate({bottom:"+="+h,opacity:0},f,function(){k.css("bottom",0).hide()})}});Nextia.AdvisoryBalloon=function(){this.$node=a();this.type="left";this.duration=300;this.distance=10;this.isShown=false;this.showDelay=new BAJL.Timeout;this.hideDelay=new BAJL.Timeout};Nextia.AdvisoryBalloon.create=function(c,b,d,e){return(new this).init(c,b,d,e)};Nextia.AdvisoryBalloon.prototype=a.extend(new BAJL.Observable,{init:function(c,b,d,e){this.$node=a(c).eq(0);this.$sharp=this.$node.find('[class^="advice-balloon-corner-"]');(a.type(b)=="string")&&(this.type=b);(a.type(d)=="number")&&(this.duration=Math.max(0,d));(a.type(e)=="number")&&(this.distance=Math.max(0,e));this.$node.css("position")=="static"&&this.$node.css("position","relative");this.$node.css({visibility:"hidden",opacity:0});switch(this.type){case"left":this.$node.css("left","+="+this.distance);break;case"right":this.$node.css("right","+="+this.distance);break;case"up":this.$node.css("top","+="+this.distance);break;case"down":this.$node.css("bottom","+="+this.distance);break;default:break}if(BAJL.ua.isIE&&BAJL.ua.documentMode==8){this.$sharp.hide()}return this},show:function(d){if(this.isShown){return this}else{if(this.$node.length==0){a.proxy(c,this)();return this}else{this.isShown=true;var b;switch(this.type){case"left":b={opacity:1,left:"-="+this.distance};break;case"right":b={opacity:1,right:"-="+this.distance};break;case"up":b={opacity:1,top:"-="+this.distance};break;case"down":b={opacity:1,bottom:"-="+this.distance};break;default:break}this.$node.stop().show().css("visibility","visible").animate(b,this.duration,a.proxy(c,this));if(BAJL.ua.isIE&&BAJL.ua.documentMode==8){this.$sharp.fadeIn(this.duration*0.5)}return this}}function c(){(d||a.noop)();this.doCallback("show")}},hide:function(d){if(!this.isShown){return this}else{if(this.$node.length==0){a.proxy(c,this)();return this}else{var b;switch(this.type){case"left":b={opacity:0,left:"+="+this.distance};break;case"right":b={opacity:0,right:"+="+this.distance};break;case"up":b={opacity:0,top:"+="+this.distance};break;case"down":b={opacity:0,bottom:"+="+this.distance};break;default:break}this.$node.stop().animate(b,this.duration,a.proxy(c,this));if(BAJL.ua.isIE&&BAJL.ua.documentMode==8){this.$sharp.fadeOut(this.duration*0.5)}return this}}function c(){this.isShown=false;this.$node.hide();(d||a.noop)();this.doCallback("hide")}}})})(jQuery);



/* ============================== nextia.megamenu.js ============================== */
/*! 
 *    @fileoverview
 *       ネクスティア生命保険 静的ページ汎用 ヘッダ・グロナビの開閉パネル（メガメニュー）
 *       (charset : "Shift_JIS")
 *
 *    @version 1.4.20111220
 *    @requires jquery.js
 *    @requires bajl.js
 *    @requires bajl.processingInfo.js
 *    @requires nextia.js
 */
(function(a){Nextia.settings.MegaMenu={contentURL:{products:"/shared/static/inc/mega-menu_products.html",help:"/shared/static/inc/mega-menu_help.html",about:"/shared/static/inc/mega-menu_about.html",advice:"/shared/static/inc/mega-menu_advice.html",knowledge:"/shared/static/inc/mega-menu_knowledge.html"},template:{panel:'<div class="mega-menu-panel" id="mega-menu-panel-${panel}"><div class="mega-menu-contents"></div><ul class="mega-menu-close"><li><a href="#" class="bajl-rollover"><img src="${close-button}" width="37" height="37" alt="閉じる" /></a></li></ul></div>',content:'<div class="mega-menu-content" id="megamenu-content-${content}"><iframe frameborder="0" scrolling="no" name="mega-menu-frame-${content}"></iframe></div>'},rollover:{statusSet:{normal:"",hover:"_o",selected:"_s"},cnamePrefix:"pseudo-"},"close-button":{"global-nav":"/shared/static/img/btn_close_04.png","header-utility":"/shared/static/img/btn_close_03.png"},selected:{"global-nav":"","header-utility":""}};a(function(){if(self===top){Nextia.MegaMenu.modifyContentURL();var g=[];var b=["global-nav","header-utility"];for(var c=0,j=b.length;c<j;c++){var h=b[c];g[h]=Nextia.MegaMenu.create("#"+h)}var d=Nextia.settings.MegaMenu.selected;for(var h in d){if(d[h]&&g[h]){g[h].open(d[h]);var f=g[h].$node.children('[id="'+h+"-"+d[h]+'"]').find("a");var e=BAJL.Rollover.getInstance(f);e.setStatus("selected")}}}else{Nextia.MegaMenu.checkSameOrigin(parent,a.noop,function(){var i="mega-menu-frame-content";a("."+i).addClass(i+"-crossdomain")});a(window).bind("message",Nextia.MegaMenu.receiveMessage)}});Nextia.MegaMenu=function(){this.$node=a();this.$panel=a();this.$contents=a();this.$button=a();this.id="";this.content={};this.rollover=[];this.curContent=null;this.throbber=null};Nextia.MegaMenu.create=function(b){return(new this).init(b)};Nextia.MegaMenu.prototype={init:function(d){this.$node=a(d).eq(0);this.id=this.$node.attr("id");if(this.$node.length==0){return this}else{if(!this.id){throw new Error("Nextia.MegaMenu#init: base element node must have an id-attribute.")}else{var c=Nextia.settings.MegaMenu;var e={panel:this.id,"close-button":c["close-button"][this.id]};var b=c.template.panel;this.$panel=a(BAJL.String(b).format(e).get()).insertAfter(this.$node);this.$contents=this.$panel.find(".mega-menu-contents").eq(0);this.$button=this.$panel.find(".mega-menu-close").eq(0);this.throbber=(new BAJL.ProcessingInfo).appendTo(this.$panel);this.$node.contents("*").get().forEach(function(i){var j=BAJL.String(i.id).getAfter(this.id+"-").get();var f=c.contentURL[j];if(f){var h=a(i).find("a");var g=new BAJL.Rollover(h,c.rollover.statusSet,"",c.rollover.cnamePrefix);this.rollover.push(g);h.mouseenter(function(k){g.getStatus()=="normal"&&g.setStatus("hover")}).mouseleave(function(k){g.getStatus()=="hover"&&g.setStatus("normal")}).click(a.proxy(function(k){k.preventDefault();if(g.getStatus()=="selected"){g.setStatus("hover");this.close()}else{this.rollover.forEach(function(l){l.setStatus("normal")});g.setStatus("selected");this.open(j)}},this))}},this);this.$button.fadeTo(0,0).click(a.proxy(function(f){f.preventDefault();this.rollover.forEach(function(g){g.setStatus("normal")});this.close()},this));return this}}},getContent:function(h){var e=Nextia.settings.MegaMenu;var f=this.content[h];var d=e.contentURL[h];if(!f&&d){var g={panel:this.id,content:h};var b=e.template.content;var c=a(BAJL.String(b).format(g).get()).appendTo(this.$contents);f=Nextia.MegaMenu.Content.create(c,h,d).addCallback("needAdjustHeight",this.adjustHeight,this)}return(this.content[h]=f)},open:function(c){var b=this.getContent(c);if(b){this.close();this.curContent=b;if(b.isLoaded){b.show().done(a.proxy(function(){this.adjustHeight()},this))}else{this.adjustHeight().done(a.proxy(function(){this.throbber.show();this.delay(0).done(a.proxy(function(){b.show().done(a.proxy(function(){this.throbber.hide();this.adjustHeight()},this)).fail(a.proxy(function(){},this))},this))},this))}}return this},close:function(){if(this.curContent){this.curContent.abort().hide();this.throbber.hide();this.adjustHeight(0);this.curContent=null}return this},promise:function(b){return a.when((b||a.noop)(a.Deferred()))},delay:function(b){return this.promise(function(c){setTimeout(c.resolve,Math.max(b,0)||0);return c.promise()})},adjustHeight:function(b){return this.promise(a.proxy(function(c){var e=this.$panel.height();var d=(b>=0)?b:this.$panel.height("auto").height();this.$panel.height(e).stop().animate({height:d},500,c.resolve);this.$button.stop().fadeTo(500,d>0?1:0);return c.promise()},this))}};Nextia.MegaMenu.Content=function(){this.$node=a();this.$iframe=a();this.id="";this.url="";this.aborted=false;this.isLoaded=false};Nextia.MegaMenu.Content.create=function(c,d,b){return(new this).init(c,d,b)};Nextia.MegaMenu.Content.prototype=a.extend(new BAJL.Observable,{init:function(c,d,b){this.$node=a(c).eq(0);this.$iframe=this.$node.find("iframe").eq(0);this.id=d;this.url=b;a(window).bind("message",a.proxy(this.receiveMessage,this));this.hide();this.$node.hide();return this},promise:function(b){return a.when((b||a.noop)(a.Deferred()))},load:function(){var b=this.url;var c=this.$iframe;if(this.isLoaded){return this.promise()}else{return this.promise(function(d){c.attr("src",b).load(d.resolve);return d.promise()})}},show:function(){this.aborted=false;return this.promise(a.proxy(function(b){this.load().done(a.proxy(function(){this.isLoaded=true;if(this.aborted){b.reject()}else{this.$node.stop(true,true).show().fadeTo(0,0).fadeTo(500,1);this.adjustHeight();b.resolve()}},this));return b.promise()},this))},hide:function(){return this.promise(a.proxy(function(b){this.$node.stop(true,true).css(this.$node.position()).css("position","absolute").fadeTo(500,0,function(){a(this).css("position","static").hide()});return b},this))},abort:function(){this.aborted=true;this.$node.stop(true,true);return this},adjustHeight:function(d){var c=this.$iframe.attr("name");var e=window.frames[c];var b=Math.max(d,0)||0;if(b==0){Nextia.MegaMenu.checkSameOrigin(e,a.proxy(function(){b=e.document.documentElement.scrollHeight},this),a.proxy(function(){e.postMessage&&e.postMessage("getHeight,"+this.id,"*");this.$node.addClass("mega-menu-content-crossdomain")},this))}if(b>0){this.$iframe.height(b)}return this},receiveMessage:function(c){var b=c.originalEvent.data.split(",");switch(b[0]){case"getHeight":if(b[1]==this.id&&!this.aborted){this.adjustHeight(b[2]);this.doCallback("needAdjustHeight")}break;default:break}}});Nextia.MegaMenu.modifyContentURL=function(){var b=BAJL.String(BAJL.GetCommonDir("shared")).getBefore("/shared").get();var c=Nextia.settings.MegaMenu.contentURL;a.each(c,function(e,d){if(!/^https?:/.test(d)){c[e]=b+d}})};Nextia.MegaMenu.receiveMessage=function(c){if(self===parent){return}var b=c.originalEvent.data.split(",");switch(b[0]){case"getHeight":b.push(document.documentElement.scrollHeight);parent.postMessage(b.join(","),"*");break;default:break}};Nextia.MegaMenu.checkSameOrigin=function(f,e,c){if(typeof f!="object"){throw new TypeError("Nextia.MegaMenu.checkSameOrigin: first argument must be an window object.")}else{var b=false;try{b=Boolean(f.document)}catch(d){}((b?e:c)||a.noop)();return b}}})(jQuery);




