(function ($) { var bannerli_width = 80; $(document).ready(function() { $('#hpasswd').bind('keypress', function(e) { var uid = $('#user_id'); var upw = $('#hpasswd'); if (e.which == 13) {/* 13 == enter key@ascii */ if(uid.val() == '¾ÆÀ̵ð' || uid.val() ==''){ uid.focus(); alert('¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä!'); return false; } else if(upw.val() == 'ºñ¹Ð¹øÈ£' || upw.val() == '' ){ upw.focus(); alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä!'); return false; } document.userLogin.submit(); } }) $('.tf_login.u_id').bind('keypress', function(e) { if (e.which == 13) {/* 13 == enter key@ascii */ $('.tf_login.u_pwd').focus(); } }) $('.tf_login.u_pwd').bind('keypress', function(e) { if (e.which == 13) {/* 13 == enter key@ascii */ login_s() } }) if($('.tf_login.u_id').val() != ""){ $('.login_lable .userID').html(''); } $('.tf_login.u_id').focus(function(){ $('.login_lable .userID').html(''); }).blur(function(){ if($(this).val() == ''){ $('.login_lable .userID').html('¾ÆÀ̵ð'); } }) $('.tf_login.u_pwd').focus(function(){ $('.login_lable .userPW').html(''); }).blur(function(){ if($(this).val() == ''){ $('.login_lable .userPW').html('ºñ¹Ð¹øÈ£'); } }) $('.Nav li').hover(function(event){ var mh = $('.header_s').css('max-height'); $('.header_s').stop().animate({height:mh,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); }); $('.header_s').hover(function(event){ var mh = $('.header_s').css('max-height'); $('.header_s').stop().animate({height:mh,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); },function(event){ $('.header_s').stop().animate({height:10,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); }); var hoverCurrent = ''; $('#menu > ul > li').hover(function(event){ hoverCurrent = $(this).attr('menuID'); if(!$(this).hasClass('noSize')){ var n = $(this).children('ul').children('li').length; if(n>1){ $(this).children('ul').children('li').show() $(this).children('ul').css("width",""); $(this).children('ul').show().stop().animate({height:n*30,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); } menuCheck() } },function(event){ hoverCurrent = '-1'; if(!$(this).hasClass('noSize')){ $(this).children('ul').show().stop().animate({height:0,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); } menuCheck() }); function menuCheck(){ var obj = $('li[menuID='+menuID.substr(0,2)+']'); if(hoverCurrent == '-1' || hoverCurrent == menuID.substr(0,2)){ obj.addClass('active'); var n = obj.children('ul').children('li').length; if(n>1){ obj.children('ul').children('li').show() obj.children('ul').css("width",""); obj.children('ul').show().stop().animate({height:n*30,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); } }else{ obj.removeClass('active'); obj.children('ul').show().stop().animate({height:0,queue: true,opacity:1}, {duration:300}, "easeInOutBack"); } } $('.loginFind .btn a').click(function(e){ find_inputNumberBtn() }) $('#verification .btn3 a').click(function(e){ find_comfrimNumberBtn() }) $('.qm_view').click(function(e){ }) if($('.mainMSG').hasClass('mainMSG')){ $('.mainMSG').ajaxMSG('all'); $('.closeBTN').click(function(e){ $(".loginInfoBox").css("height",""); $('.mainMSG .itemList').html('') $('.mainMSG').slideUp(300); $('.tabAlram').children('li').stop().animate({'margin-top':0}, {duration:300}, "easeInOutBack"); $(".tabAlram").find("img").filter(function(){this.src = this.src.replace("_on", "_off");}); $(".tabAlram").find('li').removeClass('active'); }) $(".tabAlram li").hover(function(e){ $(this).find("img").filter(function(){this.src = this.src.replace("_off", "_on");}); },function(e){ if(!$(this).hasClass('active')){ $(this).find("img").filter(function(){this.src = this.src.replace("_on", "_off");}); } }); $(".tabAlram li").click(function(e){ $(".tabAlram").find("img").filter(function(){this.src = this.src.replace("_on", "_off");}); $(".tabAlram").find('li').removeClass('active'); $(this).addClass('active') $(this).find("img").filter(function(){this.src = this.src.replace("_off", "_on");}); }); $('.promotion_link').click(function(e){ var link = $(this).attr('link') popup(link,700,700,'È«º¸¹°'); }) } }); })(jQuery); function find_inputNumberBtn(){ var isID = /^[0-9-]{9,13}$/; var isHan = /([^°¡-ÆR\x20])/i; if($('#idSearch').css('display') == 'block' ){ if($('#idSearchText').val().length < 1 || $('#idSearchText').val() == '¾ÆÀ̵ð'){ alert('¾ÆÀ̵𸦠Á¤È®È÷ ÀÔ·ÂÇϼ¼¿ä.') $('#idSearchText').focus(); return false; } } if($('#name_find').val().length < 1 || $('#name_find').val() == 'À̸§'){ alert('À̸§À» Á¤È®È÷ ÀÔ·ÂÇϼ¼¿ä.') $('#name_find').focus(); }else if(isHan.test($('#name_find').val())){ alert('Á¤È®ÇÑ Çѱ۸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.') $('#name_find').focus(); }else if($('#mobile_find').val().length < 9 || $('#mobile_find').val() == 'ÇÚµåÆù¹øÈ£'){ alert('ÇÚµåÆù ¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇϼ¼¿ä.') $('#mobile_find').focus(); }else if (!isID.test($('#mobile_find').val())) { alert('ÇÚµåÆù ¹øÈ£´Â ¼ýÀÚ¿Í Æ¯¼ö±âÈ£(-)¸¸ »ç¿ë °¡´ÉÇÕ´Ï´Ù.') $('#mobile_find').focus(); }else{ var param = {uName:$('#name_find').val(),uPhone:$('#mobile_find').val(),join:true} if($('#idSearch').css('display') == 'block' ){ param.uID = $('#idSearchText').val(); } $(this).ajaxTransXML_idFind(param,smsCheck,'find'); } } function smsCheck(type){ $('#find_comfrimNumber').val('ÀÎÁõ¹øÈ£') if(type == 'true'){ $('#idSearchText').attr('readOnly', true) $('#name_find').attr('readOnly', true) $('#mobile_find').attr('readOnly', true) $('.smsTranBtn').slideUp(100); $('.find_part2').slideDown(100); $('.loginBox .btn').hide() }else{ $('#idSearchText').attr('readOnly', false) $('#name_find').attr('readOnly', false) $('#mobile_find').attr('readOnly', false) $('.smsTranBtn').slideDown(100); $('.find_part2').slideUp(100); $('.loginBox .btn').show() } } function loginPopup(){ $('.loginBox').fadeIn(300); loginFind(); find_id(); } function loginPopupClose(){ $('.loginBox').fadeOut(300); document.userLogin.reset(); } function loginFind(){ $('.loginS').slideUp(300); $('.loginFind').slideDown(300); } function loginFindClose(){ $('.loginS').slideDown(300); $('.loginFind').slideUp(300); document.userLogin.reset(); } function find_id(){ clearTimeout(); smsCheck(false) $('#idSearch').slideUp(300); $('#idSearchText').val('¾ÆÀ̵ð'); var type = $('input[name=memberType]').val('idFind'); $('.loginFind .tabBox li').removeClass('active'); $('.loginFind .tabBox li:first-child').addClass('active'); } function find_pw(){ $('#idSearchText').val('¾ÆÀ̵ð'); $('#idSearch').slideDown(300); $('#user_verification').val('ÀÎÁõ¹øÈ£'); clearTimeout(); smsCheck(false) $('.loginFind .tabBox li').removeClass('active'); $('.loginFind .tabBox li:last-child').addClass('active'); } function login(){ var uid = $('#user_id'); var upw = $('#hpasswd'); if(uid.val() == '¾ÆÀ̵ð' || uid.val() ==''){ uid.focus(); alert('¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä!'); return; } else if(upw.val() == 'ºñ¹Ð¹øÈ£' || upw.val() == '' ){ upw.focus(); alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä!'); return; } document.userLogin.submit(); } function login_s(){ var uid = $('.u_id'); var upw = $('.u_pwd'); if(uid.val() == '¾ÆÀ̵ð' || uid.val() ==''){ uid.focus(); alert('¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä!'); return false; } else if(upw.val() == 'ºñ¹Ð¹øÈ£' || upw.val() == '' ){ upw.focus(); alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä!'); return false; } document.loginForm.submit(); } function find_comfrimNumberBtn(){ if($('#find_comfrimNumber').val().length < 1 || $('#find_comfrimNumber').val() == 'ÀÎÁõ¹øÈ£'){ alert('ÀÎÁõ¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä.') $('#find_comfrimNumber').focus(); return; //find_resultFn(false) }else{ var param = {uName:$('#name_find').val(),uPhone:$('#mobile_find').val(),checkConfrim:$('#find_comfrimNumber').val()} if($('#idSearch').is(":visible")){ param.uID = $('#idSearchText').val(); } $(this).ajaxTransXML_idFind(param,find_resultFn); } } function find_resultFn(type){ clearTimeout(); loginPopupClose(); $('#idSearchText').attr('readOnly', false) $('#name_find').attr('readOnly', false) $('#mobile_find').attr('readOnly', false) $('.smsTranBtn').slideDown(100); $('.find_part2').slideUp(100); $('.loginBox .btn').show() } function msgup(type){ $('.tabAlram').children('li').stop().animate({'margin-top':-40}, {duration:300}, "easeInOutBack"); $('.mainMSG .itemList').ajaxMSG(type); } $.fn.ajaxMSG = function(_type){ var _this = $(this); var request = $.ajax({ url: '/xml/message.json', type: "post", //get, post ¹æ½Ä data: {"type":_type}, // {'menuID':6,'subMenuID':1}, //³Ñ±æ ÆĶó¹ÌÅÍ dataType: 'json', //or xml or script or html async: true // true:ºñµ¿±â, false:µ¿±â }); request.done(function(data) { $.each(data[0], function(key, value) { if(_type == 'all'){ $('.tabAlram .'+ key).find('span').html("("+value.length+")") }else if(key == _type){ $(_this).html('') $('.mainMSG').slideDown(); if(_type == 'msg'){ $('.msgBtnBox').show(); }else{ $('.msgBtnBox').hide(); } $.each(data[0][key], function(key1, value1) { if(key =='msg'){ var s_date = value1['sendDate'].split(' ')[0]; var msgID = value1['messageID']; var revID = value1['receiverUID']; var link = 'http://chat.prynote.com/view.pry?receiverUID='+revID+'&readType=R&messageID='+msgID+'&pageNo=1'; var s_text = "
  • "+ value1['title'] +"
    "+ value1['sendName']+"
    "+s_date+"
  • "; $(_this).append(s_text) }else if(key =='promotion'){ var fileName = value1['fileName']; var link = '/popupContentsRead.html?mode=1&subID=6&lowID=&cate=promotion&page2ID=Request&num='+value1['promotionUID']+'&address=' var s_text = "
  • "+value1['p_goodsType']+"
    "+value1['p_goodsReferal'].substr(0,1)+"
    "+value1['p_address']+"
  • "; $(_this).append(s_text) } }) $(_this).find('li').click(function(e){ var link = $(this).attr('link') if(_type == 'msg'){ $(this).remove(); popup(link,600,300,'ÂÊÁö'); }else if(_type == 'promotion'){ popup(link,700,700,'È«º¸¹°'); } }) } }) }); request.fail(function(jqXHR, textStatus) { alert('Àá½ÃÈÄ ´Ù½Ã ½ÃµµÇØ ÁֽʽÿÀ'+textStatus) }); request.always(function() { }); };/*$.fn.ajaxTransXML = function(type){*/ function popup(url, w , h, title , type){ ly_open_window(url, title, 0, 0, w, h, 0, 0, 0, 0, 0,'') }