//webzine read page - preview img hide function webzineBoardReadPagePreviewImg(){ var isImg=false; var isActionEnd=true; //$(".webZineBoard .board_description #post_area") $(".board_description #post_area").children().each(function(i, c){ if(isActionEnd==true){ if(isImg==false){//first img $(this).remove(); if(c.tagName == "IMG")isImg=true; }else{//first img end if(c.tagName == "BR")$(this).remove();//img back br else isActionEnd=false;//end } } }); } ///////////////////////////////////////////////////////////////////////////////////////////////////// //person board - ready function personBoardReady(){ if($(".webzine_type2").size()>0){ webzineBoardListContentWrap(2, ".");//list - text wrap //webzineBoardListItemName(2);//소개-항목명 감추기 } } //product board - ready function productBoardReady(){ //list if($(".webzine_type2").size()>0){ webzineBoardListContentWrap(3, "./");//list - text wrap webzineBoardListItemName(3);//소개-항목명 감추기 } //read if($(".board_description #post_area").size()>0)webzineBoardReadPagePreviewImg(); } //webzineBoard list text-wrap function webzineBoardListContentWrap(n, sliceStr){//n-소개 순번 //$(".webzine_type_text_td_left .obj_value").each(function(){ $(".webzine_type_text_td_left dd:nth-child("+n+") .obj_value").each(function(){ var tempStr=String($(this).text()); if(sliceStr==".")tempStr=tempStr.replace(/\./g, ".
"); else if(sliceStr=="/.")tempStr=tempStr.replace(/\./g, ".
"); $(this).html(tempStr); }); } //webzineBoard list 소개-항목명 감추기 function webzineBoardListItemName(n){//n-소개 순번 $(".webzine_type_text_td_left dd:nth-child("+n+") .obj_name").css("display","none"); } /////////////////////////////////////////////////////////////////////////////////////////////////////////// var mapCateValueArr=["c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17"];//지점게시판 지역 카테고리 ///////////////////////////////////////////////////////////////////////////////////////////////////// var openPopWin=0; // pop insert cookie function setPopCookie(name,value,expiredays){ var todayDate = new Date(); todayDate.setDate(todayDate.getDate() + expiredays); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } //popWin colose function popWinCloas(cookieName){ var $tempdiv=$("."+cookieName+"Win"); //alert($("input."+cookieName).size()+"="+$("input."+cookieName+":checked").size()) if($("input."+cookieName+":checked").size() == 1){ setPopCookie(cookieName, "done" ,1); } $tempdiv.css("display","none"); //parent div hide openPopWin--; if(openPopWin==0)$tempdiv.parent().css("display","none"); } function getPopCookie(name){ var nameOfCookie = name + '='; var posX = 0; while(posX <= document.cookie.length){ var posY = (posX+nameOfCookie.length); if (document.cookie.substring(posX, posY) == nameOfCookie){ if ((endOfCookie=document.cookie.indexOf(';',posY)) == -1) endOfCookie = document.cookie.length; return unescape( document.cookie.substring(posY, endOfCookie)); } posX = document.cookie.indexOf( ' ', posX) + 1; if (posX == 0)break; } return ''; } ///////////////////////////////////////////////////////////////////////////////////////////////// function popWin(name){ window.open(defaultPath+"/"+name+".php", name, "top=0, left=200,width=500, height=600, toolbar=no,menubar=no,location=no, scrollbars=no, status=no, resizable=no"); } function dskBtnLink(linkValue, targetValue){ if(linkValue.substr(0,1)=="#"){ document.location.hash=linkValue; }else if(linkValue.substr(0,11)=="javascript:"){ eval(linkValue.substr(11, linkValue.length)); }else{ //tel-s var temp=""; var tempArr=linkValue.split(","); if(tempArr.length==2)temp=tempArr[1].substr(0,4); if(isMobileMode==true && temp=="tel:"){ document.location.href=tempArr[1]; }else{ //teml-e if(tempArr.length==2)linkValue=tempArr[0]; if(linkValue!="" && linkValue!=" "){ if(linkValue.substr(0,7) != "http://")linkValue=defaultPath+"/"+linkValue; if(targetValue==null)targetValue="_self"; if(targetValue=="_self"){ document.location.href=linkValue; }else if(targetValue=="_blank"){ window.open(linkValue, "", "top=0, left=0,width=1000, height=680, toolbar=yes,menubar=yes,location=yes, scrollbars=yes, status=yes, resizable=yes"); } } }//tel } } function dsksetattrlink(linkValue, targetValue){ var return_str=""; if(linkValue!=null && linkValue!="undefined"){ if(targetValue==null)targetValue="_self"; return_str+=(" link=\""+linkValue+"\" target='"+targetValue+"' "); return return_str; } } function isMobile(arr){ for(var i=0; i areaH)moveY=areaH-(bannerH+space); $tempDiv.stop(); $tempDiv.animate( { top:moveY}, 1000, "easeOutQuint" ); } }); } function setQuickEvent(){ var sartY=-85; $("div#quickmenudiv").css("top", sartY); } function moveQuickArea(){ var sartY=-85; var space=22; var $tempDiv=$("div#quickmenudiv"); //////////////////////////////////////////////////////////////////////// if($("div#quickmenudiv").css("display")!="none"){ //var tempStr=$("#dsksubmiddlearea").css("height"); //var tempStr=$("#pageBodyArea").css("height"); var tempStr=$(".pageBody").css("height"); var areaH=parseInt(tempStr.substr(0, tempStr.length-2)); var bannerH=parseInt($tempDiv.attr("divH")); var moveY=sartY+$(document).scrollTop(); if(moveY+bannerH+space > areaH)moveY=areaH-(bannerH+space); $tempDiv.stop(); $tempDiv.animate( { top:moveY}, 1000, "easeOutQuint" ); } /////////////////////////////////////////////////////////////////////// } //상단메뉴 고정 추가코드-end///////////////////////////////////////////////////////////////////////////////////////////// function mainGalleryCSS(){ $(".board_output_gallery_img:last").css("padding-right", 0); } //////////////////////////////////////////////////////// function setGalleryBoardListImgCSS(){ var ea=$(".gallery_subject").size(); var str=""; if(ea>0){ //$(".bbsnewf5 img").css({"width":"100% !important", "height":"auto !important"}); str+=(""); $("head").append(str); } } //메인페이지 공지사항.News 게시물 날짜 제거 function dskMainOutputBoardDateView(docW){ /* if(docW > 768){ $("#main_outputborad_section table.board_output table.board_output tr td:last-child").css({"display":"none"}); }else{ $("#main_outputborad_section table.board_output table.board_output tr td:last-child").css({"display":"block"}); } */ } function subPageBoardListColumView(docW){//관리자 로그인-선택항목 클래스 삭제 /* var styleStr; var $tempItem=$(".table_02 td.att_title"); var hiedNo=2; if(docW > 480){ styleStr={"display":""}; }else{ //if($tempItem.size()==5)hiedNo++; styleStr={"display":"none"}; } if($(".QAboard").size()==1){//Q&A = 2 colum-setup hiedNo++; $tempItem.eq(hiedNo-1).css(styleStr);//name $(".table_02 td.bbsetc_dateof_write").css(styleStr);//value } $tempItem.eq(hiedNo).css(styleStr);//name $(".table_02 td.bbswriter").css(styleStr);//value */ ///////////////////////////////////////////////////////// webzineBoardListRePosition();//웹진형 게시판 리스트:상품게시판 내용글자 수 } //////////////////////////////////////////////////////////// var webzineContentsValueArr=[]; function webzineBoardListRePosition(){//웹진형 게시판 리스트:상품게시판 내용글자 수 var maxLength=320; var minLength=120; var maxImgSize=[279, 225]; var $tempItem; var currentImgSize; var showLength; $tempItem=$(".webzine_type_img img"); if($(".webZineBoard").size()>0 && $tempItem.size()>0){ currentImgSize=[getCssPixelNum($tempItem.css("width")), getCssPixelNum($tempItem.css("height"))]; showLength=Math.round(maxLength*((currentImgSize[0]*currentImgSize[1])/(maxImgSize[0]*maxImgSize[1]))); if(showLengthareaW){ $(this).css({"width":"100%", "max-width":imgW, "margin":"0px auto"}); //} }); */ $(".board_description #post_area img").each(function(){ $(this).css({"width":"100%", "max-width":$(this).css("width"), "height":"auto"}); }); }