$(window).scroll(function(){agree_popup.move();}); $(window).resize(function(){agree_popup.move();}); //약관보기 var agree_view = function(tp){ agree_popup.show($('#agreementLayer'+tp)); } //약관팝업 var agree_popup = { show : function(obj){ $('#agreementLayer1, #agreementLayer2, #agreementLayer3').hide(); this.dialog(obj); obj.fadeIn('slow'); }, hide : function(){ this.popLayer.fadeOut('slow'); this.popLayer = undefined; }, move : function(){ obj = this.popLayer; if(typeof(obj) != "undefined") this.dialog(obj); }, dialog : function(obj){ var wH = $(window).height(); var _y =(window.pageYOffset) ? window.pageYOffset : (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : (document.body) ? document.body.scrollTop : 0; var h = (_y<1) ? wH/2 : wH/2+_y; var top = h - obj.height()/2; var left = ($(window).width() / 2) - (obj.width() / 2); if(left < 0) left = 0; if(top < 0) top = 0; this.popLayer = obj; this.popLayer.css({"z-index":"2000","left":left + 'px',"top":top + 'px'}); } }; //전체동의 function agree_all(){ if($("#agree0").attr("checked")){ $('#agree1,#agree2,#agree3').prop("checked",true); } else{ $('#agree1,#agree2,#agree3').prop("checked",false); } } //약관체크 function agree_check(tp){ //1: 맛보기, 2: 구매하기 if($("#agree1").attr("show") && !$("#agree1").attr("checked") ){ alert("서비스 이용을 위한 개인정보 수집·이용안내에 동의 하셔야 서비스 이용이 가능합니다."); $("#agree1").focus(); return false; } else if($("#agree2").attr("show") && !$("#agree2").attr("checked") ){ alert("개인정보 제3자 제공 안내에 동의 하셔야 서비스 이용이 가능합니다."); $("#agree2").focus(); return false; } else if(tp == 2 && $("#agree3").attr("show") && !$("#agree3").attr("checked") ){ alert("유료 서비스 이용 약관에 동의 하셔야 서비스 이용이 가능합니다."); $("#agree3").focus(); return false; } return true; } common_terms = ''; common_terms += '
'; common_terms += '
전체동의
'; common_terms += ' '; common_terms += '
'; common_terms += ''; common_terms += '
'; common_terms += '
'; common_terms += '

개인정보 수집 및 이용 동의 안내

'; common_terms += '
'; common_terms += '
'; common_terms += ' '; common_terms += '
'; common_terms += '
'; common_terms += ' 닫기'; common_terms += '
'; common_terms += '
'; common_terms += '
'; common_terms += '
'; common_terms += '

개인정보 제3자 제공 동의안내

'; common_terms += '
'; common_terms += '
'; common_terms += ' '; common_terms += '
'; common_terms += '
'; common_terms += ' 닫기'; common_terms += '
'; common_terms += '
'; document.write(common_terms);