문화누리카드 신청기간 문화누리카드 도서구입 문화누리카드 차상위계층 문화누리카드 사용기간 국민카드 홈페이지 2016년 문화누리카드 사용기간 통합문화이용권 문화 더 누리카드 문화융성카드 신청 문화누리카드 혜택 국민문화누리혜택 2015 문화누리카드신청기간 문화누리카드 발급 문화카드 홈페이지 스포츠강좌이용권 홈페이지 스포츠바우처 홈페이지 문화바우처 홈페이지 문화누리 홈페이지 문화누리카드 비밀번호 문화카드 문화누리카드 온라인사용등록 더보기
(function(){ var NetizenToggle = function(type){ this.type = (type) ? type : ""; this.btnEl = daum.$E("netizen_more_btn_" + type); this.listsWrapper = daum.$E("netizen_lists_" + this.type); this.lists = daum.$$("#netizenColl_" + this.type + " .list_keyword span.wsn"); this.etccode = 1; }; NetizenToggle.prototype = { getType: function(){ var lists = this.lists; var type = ""; var list = this.lists[this.lists.length-1]; var top = daum.Element.getCoordsTarget(list, list.parentNode).top; if(top > 40){ type = "type3"; }else if(top > 25){ type = "type2"; }else{ type = "type1"; } return type; }, checkFirstTime: function(){ this.check(); }, setBtnStatus: function(opt1, opt2){ if(opt1=="more"){ this.btnEl.removeClassName("fold"); this.btnEl.innerHTML = '더보기'; }else if(opt1=="fold"){ this.btnEl.addClassName("fold"); this.btnEl.innerHTML = '접기'; } if(typeof(opt2)!="undefined"){ if(opt2=="hide"){ this.btnEl.addClassName("hide"); }else if(opt2=="show"){ this.btnEl.removeClassName("hide"); } } }, check: function(){ var type = this.getType(); if(this.listsWrapper.hasClassName("type2")){ if(type=="type1"){ this.setBtnStatus("more","hide"); this.listsWrapper.removeClassName("type2"); }else if(type=="type3"){ this.setBtnStatus("more","show"); } }else if(this.listsWrapper.hasClassName("type3")){ if(type=="type1"){ this.setBtnStatus("fold","hide"); this.listsWrapper.removeClassName("type3"); }else if(type=="type2"){ this.setBtnStatus("more","hide"); this.listsWrapper.className = "list_keyword type2"; } }else{ if(type=="type2"){ this.setBtnStatus("more","hide"); this.listsWrapper.className = "list_keyword type2"; }else if(type=="type3"){ if (this.btnEl.hasClassName('fold')) { this.setBtnStatus("fold","show"); this.listsWrapper.className = "list_keyword type3"; } else { this.setBtnStatus("more","show"); this.listsWrapper.className = "list_keyword type2"; } } } }, toggle: function(){ var type = this.getType(); if(type == "type1"){ }else{ if(this.btnEl){ if(this.btnEl.innerHTML == '더보기'){ this.setBtnStatus("fold"); this.listsWrapper.className = "list_keyword type3"; }else{ this.setBtnStatus("more"); this.listsWrapper.className = "list_keyword type2"; } } } }, init: function(){ if(this.btnEl){ daum.Event.addEvent(this.btnEl, "click", daum.Function.bind(function(e){ this.toggle(); }, this)); daum.Event.addEvent(window, "resize", daum.Function.bind(function(e){ this.check(); }, this)); this.checkFirstTime(); } } }; var netizenToggle; netizenToggle = new NetizenToggle("top"); netizenToggle.init(); setTimeout(function() { netizenToggle.checkFirstTime(); },0); })();