document.write("function logo_tg_030G(i){ if(i == \"on\") { var image = document.getElementById(\"logoimg\"); image.setAttribute(\"src\",\"//js.ad4989.co.kr/etc/adpnut/image/on.jpg\"); } else if(i == \"off\") { var image = document.getElementById(\"logoimg\"); image.setAttribute(\"src\",\"//js.ad4989.co.kr/etc/adpnut/image/over.jpg\"); } }function close_030G(){ $(\"#adpnut_030G\").animate({bottom:\"-100px\"},500,function(){});}function goLink_030G(url){ window.open(url,'_blank');}var url_030G = \"http://dspserver.adpnut.com/ron/jsonp/5e0997c05bb17286706104*+*www.sagunin.com\";var url_parse_030G = url_030G.split(\"*+*\");/*ÇdzÓÅ×Å© ±¤°í ³ëÃâ*/function datainput_030G(c){ if(c) { /*Ãßõ±â»ç°¡ ÀÖÀ»¶§*/ $.ajax({ type: \"GET\", async: true, url: url_parse_030G[0], cache: false, dataType: \"jsonp\", jsonp : \"callback\", success: function(data) { var data_length = data.creatives.length; for(var i=0; i< data_length; i++) { var text = data.creatives[i].txt; /*±¤°íÁÖ¸íÀÌ ÀÖÀ»¶§*/ if(text.indexOf(\"__\")>-1) { /*Ãßõ±â»ç¸¦ ¿ì¼± ±¤°í±¸¿ª¿¡ ä¿îµÚ ³ª¸ÓÁö´Â ÇdzÓÅ×Å© ±¤°í·Î ä¿ò*/ if($(\"#adpnut_030G\").find(\".adList\").eq(i).find(\".summary\").text() == \"\") { var text_array = text.split('__'); $(\"#adpnut_030G\").find(\".adList\").eq(i).append(\"
AD
\"+text_array[0]+\"
PR \"+text_array[1]+\"
\"); } } else { if($(\"#adpnut_030G\").find(\".adList\").eq(i).find(\".summary\").text() == \"\") { $(\"#adpnut_030G\").find(\".adList\").eq(i).append(\"
AD
\"+data.creatives[i].txt+\"
\"); } } } }, error: function(xhr, status, error) { } }); } else { /*Ãßõ±â»ç°¡ ¾øÀ»¶§*/ $.ajax({ type: \"GET\", async: true, url: url_parse_030G[0], cache: false, dataType: \"jsonp\", jsonp : \"callback\", success: function(data) { var data_length = data.creatives.length; for(var i=0; i< data_length; i++) { var text = data.creatives[i].txt; if(text.indexOf(\"__\")>-1) { var text_array = text.split('__'); $(\"#adpnut_030G\").find(\".adList\").eq(i).append(\"
AD
\"+text_array[0]+\"
PR \"+text_array[1]+\"
\"); } else { $(\"#adpnut_030G\").find(\".adList\").eq(i).append(\"
AD
\"+data.creatives[i].txt+\"
\"); } } }, error: function(xhr, status, error) { } }); }};/*¸Åü»çÆäÀÌÁö Ãßõ±â»ç Ãß°¡ ÀÔ·Â*/function bestlistinput_030G(){ $.ajax({ type: \"GET\", async: true, url: \"//api.tend-table.com/common/api/get_best.jsp?domain=\"+url_parse_030G[1]+\"&rtn_type=json\", cache: false, dataType: \"jsonp\", jsonCallback : \"callback\", success: function(data) { if(data.result.data.length != 0) { var l_best_posi = new Date().getTime()%data.result.data.length; var dataL = data.result.data.length; if(data.result.data.length > 5) { /*Ãßõ±â»ç°¡ 4°³ ÀÌ»óÀ϶§ 4°³±îÁö¸¸ º¸¿©Áöµµ·Ï*/ dataL = 2; } for(var i=0; i\"); resizeImg_030G($(\"#adpnut_030G\").find(\".adList\").eq(adIndex).find(\".thumb\").find(\"a\"),data.result.data[l_bestnow_posi].imgurl);/*À̹ÌÁö °¡¿îµ¥ Á¤·ÄÀ» À§ÇÑ ÇÔ¼ö½ÇÇà*/ } datainput_030G(true);/*Ãßõ±â»ç ÀÖÀ»¶§*/ } else { datainput_030G(false);/*Ãßõ±â»ç ¾øÀ»¶§*/ } }, error: function(xhr, status, error) { datainput_030G(false); } }); };/*À̹ÌÁö ºñÀ² À¯ÁöÇÑä·Î °¡¿îµ¥Á¤·Ä½ÃÅ°±âÀ§ÇÑ ÇÔ¼ö*/function resizeImg_030G(obj,src){ var sImgWidth, sImgHeight, sTagWidth, sTagHeight, sTag, sImg, sRatio, sRatioStandard, sImgSrc, sGapW, sGapH; sTag = $(obj); sImgSrc = src; sTag.html(\"\"); sImg=sTag.find('img'); sImg.on('load',function(){ sTagWidth = sTag.width(); sTagHeight = sTag.height(); sImgWidth = sImg.width(); sImgHeight = sImg.height(); sRatio = sImgWidth / sImgHeight; sRatioStandard = sTagWidth / sTagHeight; if(sRatio >= sRatioStandard) { sImg.css({ width: 'auto', height: '100%' }); }else{ sImg.css({ width: '100%', height: 'auto' }); } /* °¡¿îµ¥ */ sTagWidth = sTag.width(); sTagHeight = sTag.height(); sImgWidth = sImg.width(); sImgHeight = sImg.height(); sGapW = (sTagWidth - sImgWidth) / 2; sGapH = (sTagHeight - sImgHeight) / 2; if(sRatio < 1) { sGapH = 0; } sImg.css({ position:\"absolute\", left: sGapW, top: sGapH }); });}$(document).ready(function(){ var dt = new Date(); var week = new Array('ÀÏ¿äÀÏ', '¿ù¿äÀÏ', 'È­¿äÀÏ', '¼ö¿äÀÏ', '¸ñ¿äÀÏ', '±Ý¿äÀÏ', 'Åä¿äÀÏ'); var recentYear = dt.getFullYear(); var recentMonth = dt.getMonth() + 1; var recentDay = dt.getDate(); var today = new Date().getDay(); var todayLabel = week[today]; if(recentMonth < 10) recentMonth = \"0\" + recentMonth; if(recentDay < 10) recentDay = \"0\" + recentDay; var nowDate = recentMonth + \"/\" + recentDay+\"(\"+todayLabel+\")\"; $(\"body\").append('
'+nowDate+'
'); dpTime(); /*getWeather();*/ setInterval(\"dpTime()\",1000); bestlistinput_030G(); /*datainput_030G(false);*/});function dpTime(){ var now = new Date(); hours = now.getHours(); minutes = now.getMinutes(); seconds = now.getSeconds(); if (hours > 12) { hours -= 12; ampm = \"¿ÀÈÄ \"; } else { ampm = \"¿ÀÀü \"; } if (hours < 10){ hours = \"0\" + hours; } if (minutes < 10) { minutes = \"0\" + minutes; } if (seconds < 10) { seconds = \"0\" + seconds; } $(\"#adpnut_030G\").find(\".time\").html(ampm + hours + \":\" + minutes + \":\" + seconds); }function getWeather(){ var now = new Date(); var years = now.getFullYear(); var month = now.getMonth()+1; if(month == 13) { month = 1; } if((month+\"\").length < 2) { month = \"0\"+month; } var days = now.getDate(); if((days+\"\").length < 2) { days = \"0\"+days; } var hours = now.getHours(); if(hours%3 != 0) { hours = hours-(hours%3); } if((hours+\"\").length < 2) { hours = \"0\"+hours; } var filename = years+\"-\"+month+\"-\"+days+\"-\"+hours; $.ajax({ type: \"GET\", async: true, url: \"//api.ad4989.co.kr/weather/\"+filename+\".txt\", cache: false, dataType: \"jsonp\", jsonpCallback: \"myCallback\", success: function(data) { var weather_html = \"\"; var weather_icon = \"\"; var color_class = \"\"; $.each(data,function(index,item){ switch(item[0].wfKor){ case \"¸¼À½\": weather_icon = \"\"; break; case \"È帲\": weather_icon = \"\"; break; case \"±¸¸§ ¸¹À½\": weather_icon = \"\"; break; case \"ºñ\": weather_icon = \"\"; break; case \"´«\": weather_icon = \"\"; break; case \"ºñ/´«\": weather_icon = \"\"; break; case \"¼Ò³ª±â\": weather_icon = \"\"; break; } if(Math.floor(item[0].temp) >= 0) { color_class=\"blue\"; } else { color_class=\"red\"; } weather_html = weather_html + \"
\"+index+\"  \"+Math.floor(item[0].temp)+\"¡É\"+\"  \" +weather_icon+\"
\"; }); $(\"#adpnut_030G\").find(\".weather\").append(\"
\"+weather_html+\"
\"); $('.slider').bxSlider({ mode : \"vertical\", auto: true, speed:500, controls:false, }); }, error: function(xhr, status, error) { ; } });}
")