var IvyMain = { popupPrev: function() { $(".popup_img").prev(); }, popupNext: function() { $(".popup_img").next(); }, popupStart: function() { try { $(".popupzone .play").css({"display":"none"}); } catch(e) {} try { $(".popupzone .stop").css({"display":"inline"}); } catch(e) {} try { $(".popup_img").timerStart(); } catch(e) {} }, popupStop: function() { try { $(".popupzone .play").css({"display":"inline"}); } catch(e) {} try { $(".popupzone .stop").css({"display":"none"}); } catch(e) {} try { $(".popup_img").timerStop(); } catch(e) {} }, popupShowAll: function() { if ( $(".popup_list").css("display") == "none" ) { $(".popup_list").slideDown(); } else $(".popup_list").slideUp(); }, bannerMax: 0, bannerNow: 1, nowScrollLeft : 0, bannerInterVal : null, bannerInit : function() { $(".baner_ctrl .play").css({"display":"none"}); $(".banerzone ul").bind({ mouseenter: function() { IvyMain.bannerStop(); }, mouseleave: function() { IvyMain.bannerStart(); } }); $(".banerzone ul a").bind({ focus: function() { IvyMain.bannerStop(); }, blur: function() { IvyMain.bannerStart(); } }); IvyMain.bannerStart(); }, bannerPrev : function() { var _this = this; _this.bannerStop(); $(".banerzone ul li:first-child").before( $("
  • ").html($(".banerzone ul li:nth-child("+bannerMax+")").html()) ); $(".banerzone ul li:nth-child("+(bannerMax+1)+")").remove(); }, bannerNext : function() { var _this = this; _this.bannerStop(); _this.bannerRoll(); }, bannerStop : function() { window.clearInterval(bannerInterVal); $(".baner_ctrl .play").css({"display":"inline"}); $(".baner_ctrl .stop").css({"display":"none"}); }, bannerStart : function() { bannerMax = $(".banerzone ul").children("li").length; bannerInterVal = window.setInterval(function(){ IvyMain.bannerRoll(); }, 3000); $(".baner_ctrl .play").css({"display":"none"}); $(".baner_ctrl .stop").css({"display":"inline"}); }, bannerRoll: function() { var _this = this; obj = $(".banerzone ul").children("li:first-child"); wid = $(obj).outerWidth(); $(".banerzone ul").animate({ "left" : "-"+wid+"px" }, "slow", function() { $("
  • ").html($(".banerzone ul li:first-child").html()).appendTo( $(".banerzone ul") ); $(".banerzone ul li:first-child").remove(); $(".banerzone ul").css("left","0px"); $(".banerzone ul").animate({ "left" : "-10px" }, "fast", function() { $(".banerzone ul").animate({ "left" : "-2px" }, "fast", function() {}); }); }); }, visiualMax: 3, visiualNow: 0, visiualInterVal: null, visiualFair: true, visiualInit: function() { var _this = this; $("ul.visual").css("position","relative"); $("ul.visual li.channel").css("position","absolute"); try { $("div.visual_ctrl").css("z-index","2"); } catch(e) {} try { $("div.visual_txt").css("z-index","2"); } catch(e) {} //$("div.visual_ctrl").hide(); _this.visiualMax = $("ul.visual").children().length; if ( _this.visiualMax < 2 ) return false; $("ul.visual").bind({ mouseenter: function() { _this.visiualStop(); }, mouseleave: function() { _this.visiualStart(); } }); $("ul.visual a").bind({ focus: function() { _this.visiualStop(); }, blur: function() { _this.visiualStart(); } }); _this.visiualStart(); }, visiualPlay: function(){ var _this = this; _this.visiualStart(); }, visiualStart: function() { var _this = this; visiualInterVal = window.setInterval(function(){ _this.visiualRoll(); }, 3000); $(".visual_ctrl .play").css({"display":"none"}); $(".visual_ctrl .stop").css({"display":"inline"}); }, visiualStop: function() { var _this = this; //$("div.visual_ctrl").fadeIn(); $(".visual_ctrl .play").css({"display":"inline"}); $(".visual_ctrl .stop").css({"display":"none"}); window.clearInterval(visiualInterVal); }, visiualRoll: function() { var _this = this; //$("div.visual_ctrl").fadeOut(); _this.visiualNow++; if ( _this.visiualMax <= _this.visiualNow ) _this.visiualNow = 0; $("ul.visual li.channel"+_this.visiualNow).css("z-index","1"); $("ul.visual li.channel"+_this.visiualNow).fadeIn(300,function(){ prevvisiualNow = _this.visiualNow - 1; if ( prevvisiualNow < 0 ) prevvisiualNow = _this.visiualMax - 1; $("ul.visual li.channel"+prevvisiualNow).fadeOut(100,function(){ $(this).css("z-index","-1"); }); _this.visiualFair = true; }); }, visiualDown: function() { var _this = this; try { $("div.v1 img.img"+_this.visiualNow).attr("src","/Ivyimages/site/open_content/main/visual_bt_on.gif"); } catch(e){} $("ul.visual li.channel"+_this.visiualNow).fadeIn(100,function(){ _this.visiualFair = true; }); }, visiualPrev: function() { var _this = this; _this.visiualStop(); $("ul.visual li.channel"+_this.visiualNow).hide(); _this.visiualNow--; if ( _this.visiualNow < 0 ) _this.visiualNow = ( _this.visiualMax - 1 ); _this.visiualDown(); _this.visiualFair = true; }, visiualNext: function() { var _this = this; _this.visiualStop(); $("ul.visual li.channel"+_this.visiualNow).hide(); _this.visiualNow++; if ( _this.visiualMax <= _this.visiualNow ) _this.visiualNow = 0; _this.visiualDown(); _this.visiualFair = false; }, visiualHit: function(num) { var _this = this; _this.visiualStop(); try { $("div.v1 img").attr("src","/Ivyimages/site/open_content/main/visual_bt_off.gif"); } catch(e){} $("ul.visual li.channel"+_this.visiualNow).css("display","none"); _this.visiualNow = num; _this.visiualDown(); }, mainTabInit: function() { $("div.notice ul > li").each(function(k,v){ $(this).children("a.tab").bind("mouseover", function(){ $(this).parents("ul").children("li").removeClass("select"); $(this).parent("li").addClass("select"); }); $(this).children("a.tab").bind("focus", function(){ $(this).parents("ul").children("li").removeClass("select"); $(this).parent("li").addClass("select"); }); }); }, assemblymanMinihome: function() { var ash = $(".asmanlist").height() + 10; if ( $(".asmanlist").css("display") == "none" ) { $(".asmanlist").slideDown(); } else { $(".asmanlist").slideUp(); } return false; }, maxAssemblyman: 0, nowAssemblyman: 1, interAssemblyman: null, rollAssemblymanInit: function() { var _this = this; _this.maxAssemblyman = $(".asmanlist ul").children().length; $(".rollAssemblyman").html( $(".asmanlist ul > li:first-child").html() ) .bind("mouseleave",function(){ _this.rollAssemblymanStart(); }) .bind("mouseenter",function(){ _this.rollAssemblymanStop(); }); _this.rollAssemblymanStart(); }, rollAssemblymanStart: function() { var _this = this; $(".assemblymanMinihome a.playstop img").attr("src","/Ivyimages/main/common_pause.gif").attr("alt","일시정지").removeClass("play").addClass("pause"); _this.interAssemblyman = window.setInterval(function(){ _this.rollAssemblymanChange(); }, 3000); }, rollAssemblymanStop: function() { var _this = this; $(".assemblymanMinihome a.playstop img").attr("src","/Ivyimages/main/common_play.gif").attr("alt","자동넘김").removeClass("pause").addClass("play"); window.clearInterval( _this.interAssemblyman ); }, rollAssemblymanChange: function() { var _this = this; _this.nowAssemblyman++; if ( _this.nowAssemblyman > _this.maxAssemblyman ) _this.nowAssemblyman = 1; $(".rollAssemblyman").fadeOut("fast",function(){ $(".rollAssemblyman").html( $(".asmanlist ul > li:nth-child("+_this.nowAssemblyman+")").html() ).fadeIn("fast"); }); }, rollAssemblymanToggle: function( obj ) { var _this = this; if ( $(obj).children("img").hasClass("pause") ) { _this.rollAssemblymanStop(); } else _this.rollAssemblymanStart(); }, tabnews: function( obj ) { var pdpos = $(obj).parents("div.notice_tab").position(); var ppos = $(obj).parents("li").position(); $(obj).parents("li").parents("ul").children("li").children("ul.body").each(function(){ if ( $(this).css("display") != "none" ) $(this).css("display","none"); $(this).parents("li").removeClass("select"); }); $(obj).parents("li").children("ul.body").css({"left":(pdpos.left - ppos.left)+"px","display":"block"}); $(obj).parents("li").addClass("select"); } }; function nWindow(){ Ivy.popup('/Servicehtml'+arguments[0],'E30',30,170,655,640); } $(document).ready(function(){ if ( $(".popupzone").attr("class") != undefined ) { try { $(".popupzone .popup_list").css({"display":"none"}); } catch(e) {} try { $(".popupzone .play").css({"display":"none"}); } catch(e) {} if ( $(".popup_img ul").children().length > 0 && !$(".popup_img ul li:first-child").hasClass("none") ) { if ( $(".popup_img ul").children().length > 1 ) $(".popup_img").slideShow(); } else { $(".popupzone .stop").css({"display":"none"}); $(".popupzone .total").css({"display":"none"}); $(".popup_img ul").children().remove(); var default_img_url = "/Ivyimages/common/main/popup_default.jpg"; hostSet = document.domain.split("."); switch( hostSet[0] ){ case "ihealth" : { default_img_url = "/Ivyimages/common/main/popup_default.jpg"; } break; case "iphhealth" : { default_img_url = "/Ivyimages/common/main/popup_default.jpg"; } break; case "lifetimeedu" : { default_img_url = "/Ivyimages/site/lifetimeedu/main/popup_default.jpg"; } break; } $("
  • ").html('').appendTo( $(".popup_img ul") ); } } if ( $(".visual").attr("class") != undefined ) IvyMain.visiualInit(); if ( $(".banerzone").attr("class") != undefined ) IvyMain.bannerInit(); }); function noticeAction( obj ) { hei = $("div.mainNotice").height(); if ( $(obj).hasClass("open") ) { $(obj).removeClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/notice_more.gif").attr("alt","더보기"); $(".mainNotice").animate({ height: 33 }); } else { $(obj).addClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/notice_more_close.gif").attr("alt","닫기"); $(".mainNotice").animate({ height: 160 }); } } function maincontAction( obj ) { hei = $("div.cont01_list").height(); if ( $(obj).hasClass("open") ) { $(obj).removeClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_01.png").attr("alt","열기"); $(".cont01_list").animate({ height:0, top:0 }); } else { $(obj).addClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_01_c.png").attr("alt","닫기"); $(".cont01_list").animate({ height:129, top:-129 }); } } function maincontAction2( obj ) { hei = $("div.cont02_list").height(); if ( $(obj).hasClass("open") ) { $(obj).removeClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_02.png").attr("alt","열기"); $(".cont02_list").animate({ height:0, top:0 }); } else { $(obj).addClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_02_c.png").attr("alt","닫기"); $(".cont02_list").animate({ height:129, top:-129 }); } } function maincontAction3( obj ) { hei = $("div.cont03_list").height(); if ( $(obj).hasClass("open") ) { $(obj).removeClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_03.png").attr("alt","열기"); $(".cont03_list").animate({ height:0, top:0 }); } else { $(obj).addClass("open"); $(obj).children("img").attr("src","/Ivyimages/site/dam/cont_03_c.png").attr("alt","닫기"); $(".cont03_list").animate({ height:129, top:-129 }); } } function closepopup24( obj ) { cDay = 1 var expire = new Date(); expire.setDate(expire.getDate() + cDay); Ivy.setCookie("pupopzone24Close","YES", expire, "/", document.domain); $('.IvyPopup').slideUp(); }