var STICKER={},topFlag=false,ESTIMATE_KEY={key:"EstFormData",val:"estimate"},CONTACT_KEY={key:"CntFormData",val:"contact"},isReadyConnectSwf=false,waitTimer,template,rules,shortcutData,$quickContainer,$shortcutContainer,$actionContainer,$backyard; STICKER.quickNavi=function(){var b,a,e=false;return{currentShortCutID:"",qnHideTimer:"",setup:function(g){b=g;b.find("#QNOrgNavSec");a=b.find("#QNOrgNavSec ul li");$actionHandle=b.find("#Estimate, #Contact");b.find("a.rollover").simpleRollOver();b.bind("mouseover",STICKER.quickNavi.onQuickNavOver);b.bind("mouseout",STICKER.quickNavi.onQuickNavOut);a.each(function(){$(this).bind("click",function(){var c=$(this).attr("id");$(this).css("z-index","98");$(this).prev().css("z-index","1");$(this).next().css("z-index", "1");STICKER.quickNavi.currentShortCutID=c;a.each(STICKER.quickNavi.onShortCutBtnOut);STICKER.shortcutNavi.show(c);return false})});a.hover(STICKER.quickNavi.onShortCutBtnHover,STICKER.quickNavi.onShortCutBtnOut);$actionHandle.bind("click",function(){var c=$(this).attr("id");STICKER.actionSet.show(c);return false});$actionHandle.hover(function(){var c=$(this).attr("id"),f={};$(this).css("z-index","99");if(c=="Estimate"){b.find("#Contact").css("z-index","1");f.w=215;f.h=110}else{b.find("#Estimate").css("z-index", "1");f.w=228;f.h=111}c=$(this).find("img").attr("src").replace(".gif","-over.gif");c=$("<img>").attr("src",c);$(this).find("a").append(c);c.addClass("overlayImage").css("position","absolute").css("z-index","22").css("top","-7px").css("left","0").css("width",f.w+"px").css("height",f.h+"px")},function(){$(this).find("img.overlayImage").remove()});STICKER.quickNavi.setCurrentSelected()},onQuickNavOver:function(){typeof qnHideTimer!="undefined"&&clearTimeout(qnHideTimer);STICKER.quickNavi.show()},onQuickNavOut:function(g){g= $(g.relatedTarget);var c=false,f=0;if(g.attr("id")=="Wrapper")c=true;if(g.parents("div#Wrapper")[0]){if(g.attr("id")=="Footer")return;if(g.parents("div#Footer")[0])return;c=true}g.html()||(c=true);if(c){if(STICKER.shortcutNavi.open)f=500;qnHideTimer=setTimeout(function(){STICKER.shortcutNavi.hide();STICKER.quickNavi.sink()},f)}},onShortCutBtnHover:function(){var g=$(this).attr("id");if(g!=STICKER.quickNavi.currentShortCutID){var c="98";if($(this).prev().attr("id")==STICKER.quickNavi.currentShortCutID)c= "97";else $(this).prev().css("z-index","1");if($(this).next().attr("id")==STICKER.quickNavi.currentShortCutID)c="99";else $(this).next().css("z-index","1");$(this).css("z-index",c);g=$("<img>").attr("src",{use:"/images/quicknav/sn-first-over.gif",material:"/images/quicknav/sn-middle-over.gif",process:"/images/quicknav/sn-middle-over.gif",finish:"/images/quicknav/sn-last-over.gif"}[g]);$(this).append(g);g.addClass("overlayImage").css("position","absolute").css("z-index","99").css("top","18px").css("left", "0").css("cursor","pointer")}},onShortCutBtnOut:function(){$(this).attr("id")!=STICKER.quickNavi.currentShortCutID&&$(this).find("img.overlayImage").remove()},shortCutBtnReset:function(){STICKER.quickNavi.currentShortCutID="";a.each(function(){$(this).find("img.overlayImage").remove()})},show:function(){b.qnAnimation(animParams.getPrams("qnUp",0))},sink:function(){b.qnAnimation(animParams.getPrams("qnUpToDef",250));STICKER.quickNavi.shortCutBtnReset()},flow:function(){if(e){b.bind("mouseover",STICKER.quickNavi.onQuickNavOver); b.bind("mouseout",STICKER.quickNavi.onQuickNavOut);e=false}b.qnAnimation(animParams.getPrams("qnBottomToDef",300))},hide:function(){b.unbind("mouseover");b.unbind("mouseout");e=true;b.qnAnimation(animParams.getPrams("qnHideOut",0));STICKER.quickNavi.shortCutBtnReset()},setCurrentSelected:function(){var g=CONFIG.reselect.current,c=CONFIG.reselect.defaults,f=CONFIG.reselect.convert,h;a.each(function(){var i=$(this).attr("id"),k;k=g[i];var o=i+"-selected";$(this).hasClass(o)||$(this).addClass(o);if(k== c[i]||$.inArray(k,c[i])!=-1){k=f[i];h=CONFIG.reselect.imgDefaults[i];$(this).find("a").empty().append('<img src="'+h+'" alt="'+k+'" />');$(this).hasClass(o)&&$(this).removeClass(o);return true}h=shortcutData[i].contents[k].title;$(this).find("a").empty().append('<img src="'+h+'" alt="'+f[i]+'" />')})}}}(); STICKER.shortcutNavi=function(){var b,a,e,g;return{lastID:"",timer:"timer",open:false,setup:function(c){b=c;a=b.find("#SNTitleSet");$navBody=b.find("#SNInner");e=$navBody.find("ul");g=b.find("#SNClose");b.find("a.rollover").simpleRollOver();var f;b.hover(function(){typeof f!="undefined"&&clearTimeout(f);typeof STICKER.quickNavi.qnHideTimer!="undefined"&&clearTimeout(STICKER.quickNavi.qnHideTimer)},function(h){if(!STICKER.actionSet.open){h=$(h.relatedTarget);var i=false;if(h.attr("id")=="Wrapper")i= true;if(h.parents("div#Wrapper")[0])i=true;if(i)f=setTimeout(function(){STICKER.shortcutNavi.hide();STICKER.quickNavi.sink()},500)}});g.bind("click",function(){STICKER.shortcutNavi.hide();STICKER.quickNavi.sink();return false})},setContent:function(c){if(c!=STICKER.shortcutNavi.lastID){var f=shortcutData[c];e.empty();a.find("#SNTitleImage").attr("src",f.titleImg);for(var h in f.contents){var i=$("<li><a></a></li>");i.find("a").attr("href",f.contents[h].url).text(h);e.append(i);i.data("tooltipInfo", {thum:f.contents[h].thum,description:f.contents[h].description});i.hover(function(){STICKER.actionSet.open||STICKER.tooltip.show($(this).data("tooltipInfo"),$(this).offset(),"SHORTCUT_MODE")},function(){STICKER.tooltip.hide()})}STICKER.shortcutNavi.lastID=c;e.jScrollPane()}},show:function(c){typeof c!="undefined"&&STICKER.shortcutNavi.setContent(c);c="sn"+c;$navBody.attr("class","").attr("class",c);STICKER.shortcutNavi.open=true;b.qnAnimation(animParams.getPrams("snUp",0))},hide:function(){STICKER.shortcutNavi.open= false;b.qnAnimation(animParams.getPrams("snDown",0))}}}(); STICKER.actionSet=function(){var b,a,e,g;return{currentMode:"",open:false,setup:function(c){b=c;a=b.find("#ActionHeadWrapper");e=b.find("#ActionHead a");g=b.find("#ActionContent");navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Trident/4.0")!=-1&&$("#ActionContentWrapper").css("margin","0");if(SimpleLib.isIE()){$("#ActionContentWrapper").wrap('<div id="IE7Container">').append('<div id="DummyBorder">');$("#DummyBorder").css("position","absolute").css("top","19").css("left","0").css("z-index", "-1").css("width","100%").css("height","11px").css("background-color","#C91111");$("#IE7Container").css("padding-top","30px")}b.find("a.rollover").simpleRollOver();e.bind("click",function(){STICKER.actionSet.hide();return false})},setContent:function(){var c="#"+STICKER.actionSet.currentMode+"Container";if(g.contents().length!=0){var f=g.children("div").attr("id");f=f.replace("Container","");if(STICKER.actionSet.currentMode.toUpperCase()!=f.toUpperCase()){$(g.contents()).shift();c=$backyard.find(c); c.length!=0?c.appendTo(g):STICKER.actionSet.createContent()}}else STICKER.actionSet.createContent()},createContent:function(){var c=$(Templates.assign("T"+STICKER.actionSet.currentMode+"Content",{})).appendTo(g);STICKER[STICKER.actionSet.currentMode].setup(c)},show:function(c){STICKER.actionSet.open=true;if(STICKER.actionSet.currentMode!=c)STICKER.actionSet.currentMode=c;STICKER.actionSet.setContent();STICKER.shortcutNavi.open&&STICKER.shortcutNavi.hide();STICKER.quickNavi.hide();b.qnAnimation(animParams.getPrams("atUp", 700));a.qnAnimation(animParams.getPrams("atHeadUp",1400));SimpleLib.isIE()&&$("#ActionContentWrapper").animate({"border-top":0},500)},hide:function(){STICKER.actionSet.open=false;b.qnAnimation(animParams.getPrams("atDown",0));topFlag||STICKER.quickNavi.flow();setTimeout(function(){a.css("top","30px").css("height","0")},500)}}}(); STICKER.Estimate=function(){var b=false,a=0,e,g,c,f,h,i,k,o,j,l;return{setup:function(d){e=d;g=e.find("#EstStart a, .next");c=e.find(".prev");f=e.find("#EstimateStatus");h=f.find("li");i=e.find("#EstimateForm");k=e.find("#EstErrorMassageBox");o=e.find("#EstSec1, #EstSec2, #EstSec3, #EstSec4");j=e.find("#EstReselectWrapper");l=e.find("#EstGenreIndicator li a");$reselectAfters=e.find("#EstGenreIndicatorAfter li span.genreAfter");d=$("#EstIframe");var m=d.attr("src")+"?"+(new Date).getTime();d.attr("src", m);e.find("a.rollover").simpleRollOver();checkValidationControll();g.bind("click",STICKER.Estimate._onNextClick);c.bind("click",STICKER.Estimate._onPrevClick);l.each(function(){var n=$(this).parent().attr("id");n=CONFIG.reselect.selected[n];if(n instanceof Array)n.length>1?$(this).text("\u8907\u6570\u9078\u629e\u4e2d"):$(this).text(n[0]);else $(this).text(n)});$reselectAfters.each(function(){var n=$(this).parent().attr("id");n=CONFIG.reselect.selected[n];if(n instanceof Array)n.length>1?$(this).text("\u8907\u6570\u9078\u629e\u4e2d"): $(this).text(n[0]);else $(this).text(n)});l.bind("click",function(){var n=$(this).position(),p=$(this).parent().attr("id");STICKER.reselect.show(n,p,j);return false});STICKER.reselect.setup($(Templates.assign("TReselectDialog",{})));STICKER.reselect.rewriteInputs();STICKER.Estimate.rewriteProcessNum();STICKER.Estimate.loadFormValue();e.find(".hint").textHint();d=CONFIG.currentStep.estimate;m=980*d;a=d;if(a!=0){g.each(function(){$(this).unbind("click",STICKER.Estimate._onNextClick)});c.each(function(){$(this).unbind("click", STICKER.Estimate._onPrevClick)});$("#EstScenes").clearAnimation().delay(900).animate({left:"-="+m},1200,"easeOutExpo",function(){STICKER.Estimate.statusUpdate();f.css("display")=="none"&&a!=0&&f.fadeIn(300);o.each(function(){$(this).css("visibility","hidden")});$("#EstSec"+(a+1)).css("visibility","visible");setTimeout(function(){g.bind("click",STICKER.Estimate._onNextClick);c.bind("click",STICKER.Estimate._onPrevClick)},300)})}pageTracker._trackPageview("/quicknav/estimate/step"+a);b=true},_onNextClick:function(){if(a!= 0){EXValidator.setup(i,CONFIG.validateRules.estimate["sec"+a]);$(".blur").val("");if(!EXValidator.validate()){$(".blur").blur();$('input.error[type="radio"], input.error[type="checkbox"]').each(function(){var d=$(this).parents("div:eq(0)");d.addClass("error");d.find("input").bind("click",function(){d.hasClass("error")&&d.removeClass("error")})});STICKER.Estimate.showError();return false}if($(this).hasClass("confirm")){STICKER.Estimate.saveFormValue();saveData(ESTIMATE_KEY);i.submit();return}CONFIG.reselect.isLock= true;STICKER.Estimate.saveFormValue();saveData(ESTIMATE_KEY)}a++;CONFIG.currentStep.estimate=1;STICKER.Estimate.setDisplay(a,"next");pageTracker._trackPageview("/quicknav/estimate/step"+a);g.each(function(){$(this).unbind("click",STICKER.Estimate._onNextClick)});c.each(function(){$(this).unbind("click",STICKER.Estimate._onPrevClick)});$("#EstScenes").clearAnimation().animate({left:"-=980"},600,"easeOutExpo",function(){STICKER.Estimate.statusUpdate();f.css("display")=="none"&&a!=0&&f.fadeIn(300);setTimeout(function(){g.bind("click", STICKER.Estimate._onNextClick);c.bind("click",STICKER.Estimate._onPrevClick)},300)});$(".blur").blur();return false},_onPrevClick:function(){STICKER.Estimate.setDisplay(a,"prev");a--;pageTracker._trackPageview("/quicknav/estimate/step"+a);g.each(function(){$(this).unbind("click",STICKER.Estimate._onNextClick)});c.each(function(){$(this).unbind("click",STICKER.Estimate._onPrevClick)});$("#EstScenes").clearAnimation().animate({left:"+=980"},600,"easeOutExpo",function(){STICKER.Estimate.statusUpdate(); f.css("display")!="none"&&a==0&&f.fadeOut(300);setTimeout(function(){g.bind("click",STICKER.Estimate._onNextClick);c.bind("click",STICKER.Estimate._onPrevClick)},300)});return false},isInitialized:function(){return b},setDisplay:function(d,m){var n=m=="next"?"#EstSec"+(d+1):"#EstSec"+d,p;p=d!=0?m=="next"?"#EstSec"+d:"#EstSec"+(d+1):null;$(n).css("visibility","visible");p!=null&&setTimeout(function(){$(p).css("visibility","hidden")},1E3)},statusUpdate:function(){h.removeClass("selected");if(h[a-1]){$(h[a- 1]).addClass("selected");h.find("img").each(function(){var n=$(this).attr("src");n=n.replace("-over","");$(this).attr("src",n)});var d=h.filter(".selected").find("img"),m=d.attr("src");d.attr("src",m.replace(".gif","-over.gif"))}},saveFormValue:function(){var d=["EstIsPict","EstAfterExec","EstIsMemory"];e.find("select, input[type='text'], textArea").each(function(){var r=$(this).attr("name"),q=$(this).val();if(q!="")CONFIG.cookie.estimate[r]=q});for(var m=0;m<d.length;m++){var n=e.find("input[name='"+ d[m]+"']:checked").val();CONFIG.cookie.estimate[d[m]]=typeof n!="undefined"?n:null}var p=[];e.find("input[name='EstAfterEnv[]']:checked").each(function(){p.push($(this).val())});CONFIG.cookie.estimate.EstAfterEnv=p},loadFormValue:function(){var d=e.find("select, input[type='text'], textArea");e.find("input[type='radio']");var m=["EstIsPict","EstAfterExec","EstIsMemory"];d.each(function(){var p=$(this).attr("name");$(this).val();CONFIG.cookie.estimate[p]!=null&&$(this).val(CONFIG.cookie.estimate[p])}); for(d=0;d<m.length;d++)e.find("input[name='"+m[d]+"'][value='"+CONFIG.cookie.estimate[m[d]]+"']").attr("checked",true);if(CONFIG.cookie.estimate.EstAfterEnv){m=CONFIG.cookie.estimate.EstAfterEnv.length;var n=CONFIG.cookie.estimate.EstAfterEnv;for(d=0;d<m;d++)e.find("input[value='"+n[d]+"']").attr("checked",true)}},showError:function(){var d=(350-k.height())/2;k.css("top",d).css("display","none").css("visibility","visible").fadeIn(300);k.find("p.errorClose a").bind("click",function(){k.fadeOut(300, function(){k.css("visibility","hidden")});return false})},displayReselect:function(d){var m=CONFIG.reselect.selected[d]instanceof Array;l.each(function(){if($(this).parent().attr("id")==d)if(m)CONFIG.reselect.selected[d].length>1?$(this).empty().text("\u8907\u6570\u9078\u629e\u4e2d"):$(this).empty().text(CONFIG.reselect.selected[d][0]);else $(this).empty().text(CONFIG.reselect.selected[d])});$reselectAfters.each(function(){if($(this).parent().attr("id")==d)if(m)CONFIG.reselect.selected[d].length> 1?$(this).empty().text("\u8907\u6570\u9078\u629e\u4e2d"):$(this).empty().text(CONFIG.reselect.selected[d][0]);else $(this).empty().text(CONFIG.reselect.selected[d])})},rewriteProcessNum:function(){var d=$("span.numProcess"),m=CONFIG.reselect.selected.process.length;if(m!=1){d.show();d.text(m)}else d.hide()}}}(); STICKER.Contact=function(){var b=false,a=0,e,g,c,f,h,i,k,o;return{setup:function(j){e=j;g=e.find("#CntStart a, .next");c=e.find(".prev");f=e.find("#ContactStatus");h=f.find("li");i=e.find("#ContactForm");k=e.find("#CntErrorMassageBox");o=e.find("#CntSec1, #CntSec2, #CntSec3");e.find("a.rollover").simpleRollOver();g.bind("click",STICKER.Contact._onNextClick);c.bind("click",STICKER.Contact._onPrevClick);STICKER.Contact.loadFormValue();e.find(".hint").textHint();j=CONFIG.currentStep.contact;var l=980* j;a=j;if(a!=0){g.each(function(){$(this).unbind("click",STICKER.Contact._onNextClick)});c.each(function(){$(this).unbind("click",STICKER.Contact._onPrevClick)});$("#CntScenes").clearAnimation().delay(900).animate({left:"-="+l},1200,"easeOutExpo",function(){STICKER.Contact.statusUpdate();f.css("display")=="none"&&a!=0&&f.fadeIn(300);o.each(function(){$(this).css("visibility","hidden")});$("#CntSec"+(a+1)).css("visibility","visible");setTimeout(function(){g.bind("click",STICKER.Contact._onNextClick); c.bind("click",STICKER.Contact._onPrevClick)},300)})}pageTracker._trackPageview("/quicknav/contact/step"+a);b=true},_onNextClick:function(){if(a!=0){EXValidator.setup(i,CONFIG.validateRules.contact["sec"+a]);$(".blur").val("");if(!EXValidator.validate()){$(".blur").blur();$('input.error[type="radio"]').each(function(){var j=$(this).parents("div:eq(0)");j.addClass("error");j.find("input").bind("click",function(){j.hasClass("error")&&j.removeClass("error")})});STICKER.Contact.showError();return false}if($(this).hasClass("confirm")){STICKER.Contact.saveFormValue(); saveData(CONTACT_KEY);$("#isMemory:checked").length!=1&&$("#externalswf").get(0).clearData(CONTACT_KEY.key);i.submit();return false}STICKER.Contact.saveFormValue();saveData(CONTACT_KEY)}a++;CONFIG.currentStep.contact=1;STICKER.Contact.setDisplay(a,"next");pageTracker._trackPageview("/quicknav/contact/step"+a);g.each(function(){$(this).unbind("click",STICKER.Contact._onNextClick)});c.each(function(){$(this).unbind("click",STICKER.Contact._onPrevClick)});$("#CntScenes").clearAnimation().animate({left:"-=980"}, 600,"easeOutExpo",function(){STICKER.Contact.statusUpdate();f.css("display")=="none"&&a!=0&&f.fadeIn(300);setTimeout(function(){g.bind("click",STICKER.Contact._onNextClick);c.bind("click",STICKER.Contact._onPrevClick)},300)});$(".blur").blur();return false},_onPrevClick:function(){STICKER.Contact.setDisplay(a,"prev");a--;CONFIG.currentStep.contact=1;pageTracker._trackPageview("/quicknav/contact/step"+a);g.each(function(){$(this).unbind("click",STICKER.Contact._onNextClick)});c.each(function(){$(this).unbind("click", STICKER.Contact._onPrevClick)});$("#CntScenes").clearAnimation().animate({left:"+=980"},600,"easeOutExpo",function(){STICKER.Contact.statusUpdate();f.css("display")!="none"&&a==0&&f.fadeOut(300);setTimeout(function(){g.bind("click",STICKER.Contact._onNextClick);c.bind("click",STICKER.Contact._onPrevClick)},300)});return false},isInitialized:function(){return b},setDisplay:function(j,l){var d=l=="next"?"#CntSec"+(j+1):"#CntSec"+j,m;m=j!=0?l=="next"?"#CntSec"+j:"#CntSec"+(j+1):null;$(d).css("visibility", "visible");m!=null&&setTimeout(function(){$(m).css("visibility","hidden")},1E3)},statusUpdate:function(){h.removeClass("selected");if(h[a-1]){$(h[a-1]).addClass("selected");h.find("img").each(function(){var d=$(this).attr("src");d=d.replace("-over","");$(this).attr("src",d)});var j=h.filter(".selected").find("img"),l=j.attr("src");j.attr("src",l.replace(".gif","-over.gif"))}},saveFormValue:function(){var j=["CntType","CntIsMemory"];e.find("select, input[type='text'], textArea").each(function(){var m= $(this).attr("name"),n=$(this).val();if(n!="")CONFIG.cookie.contact[m]=n});for(var l=0;l<j.length;l++){var d=e.find("input[name='"+j[l]+"']:checked").val();CONFIG.cookie.contact[j[l]]=typeof d!="undefined"?d:null}},loadFormValue:function(){var j=["CntType","CntIsMemory"];e.find("select, input[type='text'], textArea").each(function(){var d=$(this).attr("name");$(this).val();CONFIG.cookie.contact[d]!=null&&$(this).val(CONFIG.cookie.contact[d])});for(var l=0;l<j.length;l++)e.find("input[name='"+j[l]+ "'][value='"+CONFIG.cookie.contact[j[l]]+"']").attr("checked",true)},showError:function(){k.css("display","none").css("visibility","visible").fadeIn(300);k.find("p.errorClose a").bind("click",function(){k.fadeOut(300,function(){k.css("visibility","hidden")})})}}}(); STICKER.tooltip=function(){var b=false,a;return{setup:function(e){a=e;b=true},show:function(e,g,c,f){$(window).bind("scroll",function(){STICKER.tooltip.hide();$(window).unbind("scroll")});var h=a.find("p.tooltipThum img"),i=a.find("p.tooltipBody");h.attr("src",e.thum);i.text(e.description);if(c=="SHORTCUT_MODE"){e=g.top-80;c=g.left-25}else{a.addClass("reselectTooltip");e=g.top-15;c=g.left+185;if(f=="finish"){a.removeClass("reselectTooltip").addClass("reselectExTooltip");e=g.top-15;c=g.left-210}}a.delay(100).appendTo("body").css("z-index", "99").css("position","absolute").css("top",e).css("left",c).css("display","none").show()},hide:function(){SimpleLib.isIE()?a.remove():a.css("opacity","1").remove();a.hasClass("reselectTooltip")&&a.removeClass("reselectTooltip");a.hasClass("reselectExTooltip")&&a.removeClass("reselectExTooltip")},isInitialized:function(){return b}}}(); STICKER.reselect=function(){var b,a,e,g;return{setup:function(c){b=c;a=c.find("#reselectElemsWrapper");g=$(Templates.assign("ReselectContainerCloseBtn",{}));g.simpleRollOver();g.click(STICKER.reselect.onCloseBtnClick);b.hover(function(){clearTimeout(e)},function(f){if($(f.relatedTarget).parents("#ReselectContainerCloseBtn").length)return true;e=setTimeout(function(){STICKER.reselect.hide()},500)})},onCloseBtnClick:function(){g.hide();STICKER.reselect.hide()},show:function(c,f,h){g.css("display")!= "none"&&g.hide();if(f=="use"){var i=CONFIG.reselect.selected.material;if(i=="\u76f8\u8ac7\u3059\u308b"){CONFIG.reselect.list.use.lists=[];i=shortcutData.use.contents;for(var k in i)CONFIG.reselect.list.use.lists.push(k)}else{var o=CONFIG.reselect.rule;CONFIG.reselect.list.use.lists=[];for(k in o)o[k].hasOwnProperty(i)&&CONFIG.reselect.list.use.lists.push(k)}}else if(f=="material"){i=CONFIG.reselect.selected.use;if(i=="\u305d\u306e\u4ed6"){CONFIG.reselect.list.material.lists=[];i=shortcutData.material.contents; for(k in i)CONFIG.reselect.list.material.lists.push(k)}else{i=CONFIG.reselect.rule[i];CONFIG.reselect.list.material.lists=[];for(k in i)$.inArray(k,CONFIG.reselect.list.material.lists)==-1&&CONFIG.reselect.list.material.lists.push(k)}}var j=STICKER.reselect.setContent(f),l=STICKER.reselect.loadValue(f);b.appendTo(h).css("display","block").css("position","absolute").css("top",15).css("left",c.left).css("z-index","80");f!="process"?$(b[2]).hide():g.appendTo(h).css("display","block").css("position", "absolute").css("top",292).css("left",c.left).css("z-index","80");a.empty().append(j);a.jScrollPane();j.each(function(){if(l instanceof Array)$.inArray($(this).find("a").text(),l)!=-1&&$(this).addClass("selected");else $(this).find("a").text()==l&&$(this).addClass("selected");var d=$(this).text();d=shortcutData[f].contents[d];if(typeof d!="undefined"){$(this).data("tooltipInfo",{thum:d.thum,description:d.description});$(this).hover(function(){STICKER.tooltip.show($(this).data("tooltipInfo"),$(this).offset(), "RESELECT_MODE",f)},function(){STICKER.tooltip.hide()})}});if(f=="process"){a.hasClass("multi")||a.addClass("multi");j.bind("click",function(){var d=$(this).find("a").text();if(d=="\u76f8\u8ac7\u3059\u308b"||d=="\u52a0\u5de5\u306a\u3057"){if(!$(this).hasClass("selected")){j.each(function(){$(this).removeClass("selected")});$(this).addClass("selected")}for(;l.length;)l.shift();l.push(d)}else{if(j.find(":contains('\u52a0\u5de5\u306a\u3057')").parent().hasClass("selected"))j.find(":contains('\u52a0\u5de5\u306a\u3057')").parent().removeClass("selected"); else j.find(":contains('\u76f8\u8ac7\u3059\u308b')").parent().hasClass("selected")&&j.find(":contains('\u76f8\u8ac7\u3059\u308b')").parent().removeClass("selected");if($.inArray("\u52a0\u5de5\u306a\u3057",l)!=-1||$.inArray("\u76f8\u8ac7\u3059\u308b",l)!=-1)for(;l.length;)l.shift();if($(this).hasClass("selected")){$(this).removeClass("selected");d=$.inArray(d,l);d!=-1&&l.splice(d,1);if(l.length==0){l.push("\u52a0\u5de5\u306a\u3057");j.find(":contains('\u52a0\u5de5\u306a\u3057')").parent().addClass("selected")}}else{$(this).addClass("selected"); l.push(d)}}STICKER.Estimate.displayReselect(f);STICKER.Estimate.rewriteProcessNum();STICKER.reselect.rewriteInputs();return false})}else j.bind("click",function(){var d=$(this).find("a").text();if(f=="use"){CONFIG.reselect.list.material.lists=[];var m=CONFIG.reselect.rule[d];if(typeof m!="undefined")for(var n in m)CONFIG.reselect.list.material.lists.push(n)}CONFIG.reselect.selected[f]=d;f=="use"&&checkValidationControll();j.removeClass("selected");$(this).addClass("selected");STICKER.Estimate.displayReselect(f); STICKER.reselect.hide();STICKER.tooltip.hide();STICKER.reselect.rewriteInputs();return false})},setContent:function(c){var f=CONFIG.reselect.list[c].lists.slice(0);CONFIG.reselect.list[c].hasOwnProperty("prepender")&&f.unshift(CONFIG.reselect.list[c].prepender);CONFIG.reselect.list[c].hasOwnProperty("appender")&&f.push(CONFIG.reselect.list[c].appender);f=$.map(f,function(h){return'<li><a href="#">'+h+"</a></li>"});return $(f.join(""))},loadValue:function(c){return CONFIG.reselect.selected[c]},hide:function(){b.fadeOut(0, function(){a.hasClass("multi")&&a.removeClass("multi")});g.hide()},rewriteInputs:function(){var c=CONFIG.reselect.selected,f=$("#ReselectInput"),h=[];for(var i in c)if(c[i]instanceof Array)for(var k=0;k<c[i].length;k++)h.push('<input type="hidden" name="postprocess[]" value="'+c[i][k]+'" />');else h.push('<input type="hidden" name="post'+i+'" value="'+c[i]+'" />');c=$(h.join(""));f.empty().append(c)}}}();function setStateSwf(){isReadyConnectSwf=true} function waitSwfReady(){if(isReadyConnectSwf){clearInterval(waitTimer);loadData(ESTIMATE_KEY);loadData(CONTACT_KEY)}}function saveData(b){$("#externalswf").get(0).save(b.key,CONFIG.cookie[b.val])}function loadData(b){var a=$("#externalswf").get(0).load(b.key);if(a!=null)CONFIG.cookie[b.val]=a}function debugAlert(b){alert(b)}function saveSelectedValue(){$.Jookie.Set("sticker","isLock",CONFIG.reselect.isLock);$.Jookie.Set("sticker","currentStep",CONFIG.currentStep)} function checkValidationControll(){var b=CONFIG.reselect.selected.use,a=CONFIG.validateRules.estimate.sec2.rules,e=CONFIG.validateRules.estimate.sec2.messages;if(b=="\u305d\u306e\u4ed6"&&!a.hasOwnProperty("EstRemarks")){a.EstRemarks="required";e.EstRemarks="\u7528\u9014\u306b\u305d\u306e\u4ed6\u3092\u9078\u629e\u3057\u3066\u304a\u3089\u308c\u308b\u5834\u5408\u306f\u3054\u8981\u671b\u6b04\u306b\u7528\u9014\u3092\u3054\u8a18\u5165\u304f\u3060\u3055\u3044"}else if(b!="\u305d\u306e\u4ed6"&&a.hasOwnProperty("EstRemarks")){delete a.EstRemarks; delete e.EstRemarks;$("#DynamicValidate").hasClass("error")&&$("#DynamicValidate").removeClass("error")}}(function(){$.fn.delay=function(b,a){return this.animate({dummy:0},b,a)};$.fn.clearAnimation=function(){return this.queue([]).stop()};$.fn.qnAnimation=function(b){b=$.extend({params:{},duration:1E3,easing:"easeOutSine",delay:0,callback:null},b);return this.clearAnimation().delay(b.delay).animate(b.params,b.duration,b.easing,b.callback)}})(); (function(b){var a=b("<div />");b.getBackyard=function(){return a};b.fn.shift=function(){return b(this).appendTo(a)};b.fn.clearBackyard=function(){a.remove();a=b("<div />")}})(jQuery); var imagePreLoader=function(b){if(b instanceof Array)for(var a=b.length,e=0;e<a;e++)$("<img>").attr("src",b[e]);else $("<img>").attr("src",b)},EXValidator=function(){var b;return{setup:function(a,e){typeof b!="undefined"&&a.removeData();b=a.validate(e)},validate:function(){return b.form()}}}(),Loader=function(){this.init.apply(this,arguments)}; Loader.prototype={init:function(b,a,e,g){this.key=b;this.url=a;this.type=e;this.callback=g},load:function(){var b=this;$.ajax({type:"GET",url:this.url,dataType:this.type,success:function(a){b.data=a;b.callback(a)},error:function(){}})}}; var ExLoader=function(){var b,a,e=0,g=0,c={},f=[];return{init:function(h,i){b=h;if(i){a=i;for(var k in b)e++}},start:function(){if(b)for(var h in b){var i=b[h],k=new Loader(h,i.url,i.type,function(o){i.callback(o);ExLoader._countUp()});f.push(k);k.load()}},_countUp:function(){g++;if(g==e){for(var h=0;h<f.length;h++)c[f[h].key]=f[h].data;a()}},getData:function(h){if(!h)return c;return c[h]}}}(),Templates={data:{},setTemplate:function(b,a){var e=b.match(/<body>([\s\S]*)<\/body>/)[1];$(function(){$("body").append('<div id="Templates" style="display:none">'+ e+"</div>");$("div#Templates .template").each(function(){var g=$(this).attr("id");Templates.data[g]=$(this).html()});$("div#Templates").remove()});typeof a!="undefined"&&a()},assign:function(b,a){var e=b+"";if(Templates.data.hasOwnProperty(b))e=Templates.data[b]+"";for(var g in a)e=e.replace(new RegExp("\\{\\$"+g+"\\}","g"),a[g]);return e}}; function dummyLoadTiming(){for(var b in CONFIG.data.shortcutNav){var a=CONFIG.data.shortcutNav[b].contents;for(var e in a)imagePreLoader(a[e].thum)}imagePreLoader(preLoadImages.initialLoad);SimpleLib.isIE6()||init()} function init(){if("qnException"in window)topFlag=true;$("#Estimate a").bind("click",function(){STICKER.actionSet.show("Estimate");return false});$("#Contact a").bind("click",function(){STICKER.actionSet.show("Contact");return false});$("#Contents").css("margin-bottom","100px");"qnException"in window&&$("#Contents").css("margin-bottom","50px");$("#Footer").css("position","fixed").css("bottom","0").css("z-index","20");$.Jookie.Initialise("sticker");var b=$.Jookie.Get("sticker","currentStep");if(typeof b!= "undefined")CONFIG.currentStep=b;b=$.Jookie.Get("sticker","isLock");if(typeof b!="undefined")CONFIG.reselect.isLock=b;if(typeof currentValue!="undefined")CONFIG.reselect.current=currentValue;if(typeof nowPage!="undefined")for(var a in nowPage){if(a=="use"||a=="material"){if(a=="use"){CONFIG.reselect.selected[a]=nowPage[a];CONFIG.reselect.selected.material="\u76f8\u8ac7\u3059\u308b"}if(a=="material"){CONFIG.reselect.selected.material=nowPage[a];CONFIG.reselect.selected.use="\u305d\u306e\u4ed6"}}CONFIG.reselect.current[a]= nowPage[a]}for(a in CONFIG.data.shortcutNav.process.contents)CONFIG.reselect.list.process.lists.push(a);for(a in CONFIG.data.shortcutNav.finish.contents)CONFIG.reselect.list.finish.lists.push(a);$(window).bind("unload",saveSelectedValue);b=$('<div id="externalswf"></div>').appendTo("body");swfobject.embedSWF("/swf/shared.swf","externalswf","1","1","9.0.0",null,{},{allowScriptAccess:"always"});b.css("display","none");template=CONFIG.data.template;rules=CONFIG.data.rules;shortcutData=CONFIG.data.shortcutNav; CONFIG.reselect.rule=rules;for(a in CONFIG.reselect.rule)CONFIG.reselect.list.use.lists.push(a);$backyard=$.getBackyard();Templates.setTemplate(template);$quickContainer=$(Templates.assign("TQuickNavBody",{})).appendTo("body");$shortcutContainer=$(Templates.assign("TShortCutNavBody",{})).appendTo("body");$actionContainer=$(Templates.assign("TActionWrapper",{})).appendTo("body");STICKER.quickNavi.setup($quickContainer);STICKER.shortcutNavi.setup($shortcutContainer);STICKER.actionSet.setup($actionContainer); STICKER.tooltip.setup($(Templates.assign("TShortCutTooltip",{})));waitTimer=setInterval(waitSwfReady,100);if(!topFlag){$.cookie("visited")!="1"?$quickContainer.delay(500).animate({bottom:30},700,"easeOutExpo",function(){$(this).delay(900).animate({bottom:-35},1E3,"easeOutElastic")}):$quickContainer.delay(500).animate({bottom:-35},700,"easeOutExpo");$.cookie("visited","1",{path:"/"})}} (function(){$("<img>").attr("src","/images/quicknav/common_bg.png");ExLoader.init(CONFIG.loaderConfig,function(){var b=ExLoader.getData();for(var a in b)CONFIG.data[a]=b[a];$(dummyLoadTiming)});ExLoader.start()})();
