$(window).scroll(function(){agree_popup.move();}); $(window).resize(function(){agree_popup.move();}); //약관보기 var agree_view = function(tp){ if(tp == "3") $(".yak_iframe").load(location.protocol+'//m.fortune.nate.com/agreement/view.nate'); 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'}); this.popLayer.css({"z-index":"2000", "left":"10%", "top":"50%", "width":"80%"}); //20160301 } }; //전체동의 function agree_all(){ if($("#agree0").attr("class") == ""){ $('#agree0').addClass("on"); $('#agree1,#agree2,#agree3').prop("checked",true); } else{ $('#agree0').removeClass(); $('#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; } else{ return true; } } //로그인체크 20160520 function login_check(){ var cmn = ""; if(cmn == ""){ //20160520 if(confirm("로그인이 필요한 서비스 입니다. 로그인 하시겠습니까?")){ rurl = "http://m.fortune.nate.com/content/detail.nate?contsCd=CT001291"; location.href="https://xo.nate.com/mnate/Login.sk?redirect="+encodeURIComponent(rurl); } return false; } return true; } //타로 결과 보기 function tarot_result(){ if(login_check() && agree_check(2)){ purchasesTarot(); } } var fortuneHost = "http://m.fortune.nate.com".replace("http://","https://"); var contsCd = "CT001291"; function purchasesTarot(){ f = document.tarotForm; //f.action = location.protocol+"//m.fortune.nate.com/payment/BuyForm.nate"; f.action = "https://m.fortune.nate.com/payment/BuyForm.nate"; f.submit(); } //전체 동의 체크 20160912 kss function agreeAllChange(){ agreeSum = 0; showSum = 0; $('#agree1,#agree2,#agree3').each(function(idx){ if($(this).attr('show')) showSum++; //노출된 동의 체크박스 if($(this).is(':checked')) agreeSum++; //선택된 동의 체크박스 }); if(agreeSum == showSum){ $('#agree0').addClass("on"); } else{ $('#agree0').removeClass("on"); } } $(function(){ //전체 동의 체크 20160912 kss $('#agree1,#agree2,#agree3').bind('click', function() { agreeAllChange(); }); }); $(window).bind('pageshow', function (event) { //크롬에서 결과페이지에서 뒤로가기 버튼 클릭시 모두동의체크 해제되어. agreeAllChange(); }); common_terms = ''; common_terms += '
'; common_terms += '
개인정보 수집 및 이용, 개인정보 제3자 제공, 유료 서비스 이용 약관에 모두 동의합니다.
'; 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 += '
'; 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 += '
'; common_terms += '
'; common_terms += '
'; common_terms += '

유료 서비스 이용 약관 동의 안내

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