/****************************************/ /* Name: KOSEP /* PART: Javascript /* Version: 1.0 /* Author: BLUEWEBD™ /****************************************/ $(document).ready(function(){ /* Part : Layout */ //Margin of the last element control //variable announce var $wrapContent =$('.bodyContent, .tblSec, .tableWrap'); $wrapContent.each(function(){ $(this).children().last().css('margin-bottom', '0px'); }); //end each var objChkAlign = $('.tdCont') if(objChkAlign.next().hasClass('chkAlign')){ $('.tdCont').css({'min-height': '0px'}) } /* layer_popup */ var temp; $('.notice.type1,.notice.type2').click(function(e){ temp = $(this); var popup_layer = $('#popup_layer'), popup_height = popup_layer.outerHeight(); var offset = temp.offset(), ex_offset = $(this).offset().top+45; var thisParentsH = $(this).parents('#wrap').outerHeight(); if(ex_offset >= thisParentsH){ $(popup_layer).css({'left': offset.left, 'top': offset.top - popup_height - 10 + 'px'}); }else{ $(popup_layer).css({'left': offset.left, 'top': offset.top + 30 +'px'}); } $(popup_layer).css('display','block' ).attr('tabindex','-1').focus();; return false; }); $('.cal_layer .btn_close').click(function(){ $('#popup_layer').css('display', 'none').removeAttr('tabindex'); if(temp != undefined){ temp.focus(); temp = undefined } return false; }); $('.date').bind('click focus', function(){ var date_temp =$(this); $('.date').removeClass('on'); $(this).addClass('on'); return false; }); }); //end function