$(document).ready(function(){ // Main Menu $("ul.gnb li").hover(function() { $("ul.gnb li").removeClass("on"); $(this).addClass("on"); }); $("ul.gnb").bind("mouseleave",function() { $("ul.gnb li").removeClass("on"); $("#btn_menu_selected").addClass("on"); }); // GNB $("ul.dropdown li").hover(function(){ $(this).addClass("hover").siblings('ul.dropdown li').removeClass('on'); $('ul:first',this).css('visibility', 'visible'); $(this).find('span.black').css('visibility', 'visible'); }, function(){ $(this).removeClass("hover").siblings('.now').addClass('on'); $('ul:first',this).css('visibility', 'hidden'); $(this).find('span.black').css('visibility', 'hidden'); }); $("ul.dropdown li ul li:has(ul)").find("a:first").append(" » "); // Tab Menu $('ul.tabs_m').each(function(){ var $active, $content, $links = $(this).find('a'); $active = $links.first().addClass('active'); $content = $($active.attr('href')); $links.not(':first').each(function () { $($(this).attr('href')).hide(); }); $(this).on('click', 'a', function(e){ $active.removeClass('active'); $content.hide(); $active = $(this); $content = $($(this).attr('href')); $active.addClass('active'); $content.show(); e.preventDefault(); }); }); // ranking tab $('ul.tabs2').each(function(){ var $active, $content, $links = $(this).find('li'); $active = $links.first().addClass('active'); $content = $($active.attr('alt')); $links.not(':first').each(function () { $($(this).attr('alt')).hide(); }); $(this).on('mouseover', 'li', function(e){ $active.removeClass('active'); $content.hide(); $active = $(this); $content = $($(this).attr('alt')); $active.addClass('active'); $content.show(); e.preventDefault(); }); }); }); function getDocHeight(doc) { var docHt = 0, sh, oh; if (doc.height) { docHt = doc.height; } else if (doc.body) { if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight; if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight; if (sh && oh) docHt = Math.max(sh, oh); } return docHt; } function getReSize() { var iframeWin = window.frames['ohing_content']; var iframeEl = window.document.getElementById? window.document.getElementById('ohing_content'): document.all? document.all['ohing_content']: null; if ( iframeEl && iframeWin ) { var docHt = getDocHeight(iframeWin.document); if (docHt != iframeEl.style.height) iframeEl.style.height = docHt + 'px'; } else { // firefox var docHt = window.document.getElementById('ohing_content').contentDocument.height; window.document.getElementById('ohing_content').style.height = docHt + 'px'; } } function getReSize_new(v) { var iframeWin = window.frames[v]; var iframeEl = window.document.getElementById? window.document.getElementById(v): document.all? document.all[v]: null; if ( iframeEl && iframeWin ) { var docHt = getDocHeight(iframeWin.document); if (docHt != iframeEl.style.height) iframeEl.style.height = docHt + 'px'; } else { // firefox var docHt = window.document.getElementById(v).contentDocument.height; window.document.getElementById(v).style.height = docHt + 'px'; } } function popwin_magazine() { // var aPopup = window.open('http://www.appstory.co.kr/magazine/?cate=micro','popup0918','width=840,height=900, scrollbars=yes, resizable=no'); var aPopup = window.open('http://www.appstory.co.kr/magazine/?cate=micro','popup0918','width=1210,height=875, scrollbars=yes, resizable=no'); if (aPopup == null) { alert("ºê¶ó¿ìÀú ¶Ç´Â Åø¹Ù¿¡¼­\nÂ÷´ÜµÈ Æ˾÷âÀ» Çã¿ëÇØ ÁֽʽÿÀ."); } } function popwin_magazine_v2() { var aPopup = window.open('http://www.appstory.co.kr/magazine/?cate=micro','popup0918','width=1210,height=875, scrollbars=yes, resizable=no'); if (aPopup == null) { alert("ºê¶ó¿ìÀú ¶Ç´Â Åø¹Ù¿¡¼­\nÂ÷´ÜµÈ Æ˾÷âÀ» Çã¿ëÇØ ÁֽʽÿÀ."); } }