function custInit() { $(function(){ if ($("#cust_cond_oc_btn").length) { var $aniLvl = $aniReset = $aniTop = false; var $signLvl = '+', $signReset = '-', $signTop = '-'; var $offset = $("#cust_cond_panel").height(); $("#cust_cond_oc_btn").click(function(){ if (!$aniLvl && !$aniReset && !$aniTop) { $aniLvl = $aniReset = $aniTop = true; if ($("#cond_oc_btn_icon").length) { //$("#cond_oc_btn_icon").toggleClass("cust_icon_sld_open"); $("#cond_oc_btn_icon>span").toggleClass("cust_icon_btn_none"); } $("#cust_cond_panel").slideToggle("slow",function() { if (! $("#ZdcEmapMap").length) $aniLvl = $aniReset = $aniTop = false; }); if ($("#ZdcEmapMap").length) { if ($("#ZdcEmapLvlSelect").length) { $("#ZdcEmapLvlSelect").animate({ top: $signLvl+'='+$offset+'px' }, "slow", function() { $aniLvl = false; $signLvl = ($signLvl == '+' ? '-' : '+'); }); } if ($("#ZdcEmapBtnTop").length) { $("#ZdcEmapBtnTop").animate({ bottom: $signTop+'='+$offset+'px' }, "slow", function() { $aniTop = false; $signTop = ($signTop == '+' ? '-' : '+'); }); } if ($("#ZdcEmapBtnReset").length) { $("#ZdcEmapBtnReset").animate({ bottom: $signReset+'='+$offset+'px' }, "slow", function() { $aniReset = false; $signReset = ($signReset == '+' ? '-' : '+'); }); } } /* */ } }); } }); } function custSldShop(i) { if ($("#cust_shop_panel_"+i).is(":hidden")) { $("#cust_shop_panel_"+i).slideDown("slow"); $("#cust_shop_oc_btn_icon_"+i).addClass("cust_shop_sld_open"); } else { $("#cust_shop_panel_"+i).slideUp("slow"); $("#cust_shop_oc_btn_icon_"+i).removeClass("cust_shop_sld_open"); } }