/* ----------------- ¿À¸¥Âʹ̵éÆäÀÌÁö Àü¿ë ½ºÅ©¸³Æ® ----------------- */
// ¸ÞÀÎ ·Ñ¸µ ºñÁÖ¾ó
$(document).ready(function() {
var elem = $(".middlemain2 > .imgList2");
var count = elem.children().length;
var visual_index = 0;
var easeEffect = "easeInOutCubic";
var timer;
// ÀÚµ¿ ·Ñ¸µ ÁÖ±â ÀÎ½Ä ¹× ¼³Á¤
if(!elem.data('interval')) {
var interval = '6000';
} else {
var interval = elem.data('interval');
}
// ÆäÀÌÁö³×ÀÌ¼Ç »ý¼º
function rollingInit() {
var item = "
";
for(i=0; i .pagination").append(item);
}
$(".middlemain2 > .pagination > li:first").addClass('active');
}
// ½½¶óÀ̵å ó¸®
function slide(direction) {
if(visual_index < 0) {
visual_index = count - 1;
} else if(visual_index >= count) {
visual_index = 0;
}
// NEXT ¹æÇâ
if(!direction || direction == 'next') {
elem.children().eq(visual_index).css({left:'100%'});
elem.children().eq(visual_index).stop().animate({left:0}, 600, easeEffect);
// ÇöÀç À妽º°¡ ¸¶Áö¸·ÀÏ °æ¿ì ¸¶Áö¸· ¿ä¼Ò ÁÂÃøÀ¸·Î ½½¶óÀ̵å
if(visual_index == 0) {
elem.children().eq(-1).stop().animate({left:'-100%'}, 600, easeEffect);
}
// ¼ø¼ À妽º¿Í ÀÏÄ¡ÇÏÁö ¾ÊÀ¸¸é¼ ¼ø¼ À妽ºº¸´Ù ÀÛÀ» °æ¿ì¿¡¸¸ ÁÂÃøÀ¸·Î ½½¶óÀ̵å
elem.children().each(function() {
if($(this).index() != visual_index && $(this).index() < visual_index) {
$(this).stop().animate({left:'-100%'}, 600, easeEffect);
}
});
// PREV ¹æÇâ
} else if(direction == 'prev') {
elem.children().eq(visual_index).css({left:'-100%'});
elem.children().eq(visual_index).stop().animate({left:0}, 600, easeEffect);
// ÇöÀç À妽º°¡ ¸¶Áö¸·ÀÏ °æ¿ì óÀ½ ¿ä¼Ò ¿ìÃøÀ¸·Î ½½¶óÀ̵å
if(visual_index == count - 1) {
elem.children().eq(0).stop().animate({left:'100%'}, 600, easeEffect);
}
elem.children().each(function() {
if($(this).index() != visual_index) {
$(this).stop().animate({left:'100%'}, 600, easeEffect);
}
});
} else {
console.log('½½¶óÀÌµå ¹æÇâÀ» ¿Ã¹Ù¸£°Ô ÁöÁ¤ÇØ ÁֽʽÿÀ. (prev : ÀÌÀü / next : ´ÙÀ½)');
return false;
}
$(".middlemain2 > .pagination > li").removeClass('active');
$(".middlemain2 > .pagination > li").eq(visual_index).addClass('active');
}
// ŸÀÌ¸Ó ½ÇÇà
function setTimer() {
timer = setInterval(function() { visual_index++; slide('next'); }, interval);
}
// ŸÀÌ¸Ó ÁßÁö
function clearTimer() {
elem.stop();
clearInterval(timer);
}
// ÀÌÀü¹öÆ° Ŭ¸¯
$(".middlemain2 .prev").click(function() {
if(!elem.children().is(':animated')) {
clearTimer();
visual_index--;
slide('prev');
setTimer();
}
});
// ´ÙÀ½¹öÆ° Ŭ¸¯
$(".middlemain2 .next").click(function() {
if(!elem.children().is(':animated')) {
clearTimer();
visual_index++;
slide('next');
setTimer();
}
});
// ÆäÀÌÁö³×ÀÌ¼Ç Å¬¸¯
$(document).on('click', '.middlemain2 > .pagination > li', function() {
if(!elem.children().is(':animated')) {
var page_index = $(this).index();
if(page_index > visual_index) { // Ŭ¸¯ÇÑ ÆäÀÌÁö³×ÀÌ¼Ç À妽º°¡ ¼ø¼ À妽ºº¸´Ù Ŭ °æ¿ì next ¹æÇâÀ¸·Î ½½¶óÀ̵å
clearTimer();
visual_index = page_index;
slide('next')
setTimer();
} else if (page_index < visual_index) { // Ŭ¸¯ÇÑ ÆäÀÌÁö³×ÀÌ¼Ç À妽º°¡ ¼ø¼ À妽ºº¸´Ù ÀÛÀ» °æ¿ì prev ¹æÇâÀ¸·Î ½½¶óÀ̵å
clearTimer();
visual_index = page_index;
slide('prev');
setTimer();
} else { // Ŭ¸¯ÇÑ ÆäÀÌÁö³×ÀÌ¼Ç À妽º¿Í ¼ø¼ À妽º°¡ °°À¸¸é ½½¶óÀ̵å ÇÏÁö ¾ÊÀ½
return false;
}
}
});
setTimer();
rollingInit();
});
// ´ñ±Û ºÎºÐ Æ÷Ä¿½ºÀ϶§ ÅؽºÆ® »èÁ¦
function focusTextRemove(obj){
var str = '';
var name = jQuery(obj).attr("name");
var val = jQuery(obj).val();
if(name == "name") {
str = "À̸§";
if (str == val) {
jQuery(obj).val("");
return;
}else{
return;
}
}else if(name == "password_temp") {
str = "ºñ¹Ð¹øÈ£";
if (str == val) {
jQuery(obj).css("display","none");
jQuery(obj).parent().find("#password").remove();
jQuery(obj).parent().append("");
jQuery("#password").bind("blur",function(){
blurTextInsert(this);
});
jQuery("#password").focus();
return;
}else{
return;
}
}
}
// ´ñ±Û ºÎºÐ Æ÷Ä¿½ºÀÒ¾úÀ»¶§ ÅؽºÆ® »ðÀÔ
function blurTextInsert(obj){
var str = '';
var name = jQuery(obj).attr("name");
if (jQuery(obj).val() == "") {
if (name == "name") {
str = "À̸§";
}else if (name == "password") {
jQuery(obj).remove();
jQuery(obj).val("");
jQuery("#password_temp").css("display","block");
}
}else{
str = jQuery(obj).val();
}
jQuery(obj).val(str);
}
// ´ñ±Û ºÎºÐ Æ÷Ä¿½ºÀ϶§ ÅؽºÆ® »èÁ¦
function focusAltRemove(obj){
var str = '';
var name = jQuery(obj).attr("name");
var val = jQuery(obj).val();
if(name == "image_alt") {
str = "À̹ÌÁöÀÔ´Ï´Ù.";
if (str == val) {
jQuery(obj).val("");
return;
}else{
return;
}
}else if(name.indexOf("beforeimage") >= 0) {
str = "Ä¡·á Àü »çÁøÀÔ´Ï´Ù.";
if (str == val) {
jQuery(obj).val("");
return;
}else{
return;
}
}else if(name.indexOf("afterimage") >= 0) {
str = "Ä¡·á ÈÄ »çÁøÀÔ´Ï´Ù.";
if (str == val) {
jQuery(obj).val("");
return;
}else{
return;
}
}
}
// À̹ÌÁö alt ºÎºÐ Æ÷Ä¿½ºÀÒ¾úÀ»¶§ ÅؽºÆ® »ðÀÔ
function blurAltInsert(obj){
var str = '';
var name = jQuery(obj).attr("name");
if (jQuery(obj).val() == "") {
if (name == "image_alt") {
str = "À̹ÌÁöÀÔ´Ï´Ù.";
}else if (name.indexOf("beforeimage") >= 0) {
str = "Ä¡·á Àü »çÁøÀÔ´Ï´Ù.";
}else if (name.indexOf("afterimage") >= 0) {
str = "Ä¡·á ÈÄ »çÁøÀÔ´Ï´Ù.";
}
}else{
str = jQuery(obj).val();
}
jQuery(obj).val(str);
}
// FAQ ºÐ·ùº° Ŭ¸¯½Ã ³ëÃâ½ÃÅ°±â
jQuery(function(){
jQuery(".faq_open").click(function(){
if(jQuery(this).children("dd").css("display")=="none") {
jQuery(this).children("dd").css("display","block");
}else if(jQuery(this).children("dd").css("display")=="block") {
jQuery(this).children("dd").css("display","none");
}
});
});
// Áø·á°ú¸ñ selectbox °¡Á®¿À±â
function clinicSelectbox(hospital_fk,clinic_fk,type) {
jQuery("#clinic_fk").load("clinicList.jsp?hospital_fk="+hospital_fk+"&clinic_fk="+clinic_fk+"&type="+type);
}
// Áø·á°ú¸ñ selectbox °¡Á®¿À±â
function qclinicSelectbox(hospital_fk,clinic_fk,type) {
jQuery("#qclinic_fk").load("/clinicList.jsp?hospital_fk="+hospital_fk+"&clinic_fk="+clinic_fk+"&type="+type+"&cost=true");
}
// ÀÇ·áÁø selectbox °¡Á®¿À±â
function doctorSelectbox(hospital_fk,clinic_fk,doctor_fk,type) {
jQuery("#doctor_fk").load("doctorList.jsp?hospital_fk="+hospital_fk+"&clinic_fk="+clinic_fk+"&doctor_fk="+doctor_fk+"&type="+type);
}
// ÀÇ·áÁø »çÁø °¡Á®¿À±â
function doctorPhoto(hospital_fk,clinic_fk) {
jQuery("#doctorPhoto").load("doctorPhoto.jsp?hospital_fk="+hospital_fk+"&clinic_fk="+clinic_fk);
}
// ¿¹¾à´Þ·Â °¡Á®¿À±â
function calendarList(shospital_fk, smonth) {
jQuery("#resertime_zone").load("calendarList.jsp?shospital_fk="+shospital_fk+"&smonth="+smonth);
}
// ¿¹¾à½Ã°£ °¡Á®¿À±â
function reserTimeList(hospital_fk,doctor_fk,reserdate,resertime,times) {
jQuery("#reserTime_zone").load("timeList.jsp?hospital_fk="+hospital_fk+"&doctor_fk="+doctor_fk+"&reserdate="+reserdate+"&resertime="+resertime+"¡¿="+times);
}
// ÀüÈ »ó´ã ½Ã°£ °¡Á®¿À±â
function curTime(selectDay, type){
type = type.length > 2 ? type.substr(0,2) : 0;
jQuery("#curTimeList").load("curTimeList.jsp?selectDay="+selectDay+"&type="+type);
}
// ºñ¹Ð¹øÈ£ À¯È¿¼ºÃ¼Å©
function validPassword(password) {
var jQuerypass = password.val();
var jQuerystr = /^[a-zA-Z0-9@]{6,12}$/;
var jQuerystr2 = /(\w)\1\1\1/;
var jQuerychk_num = jQuerypass.search(/[0-9]/g);
var jQuerychk_eng = jQuerypass.search(/[a-z]/ig);
var check = false;
if (jQuerypass == "") {
alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
password.focus();
}else if(!jQuerystr.test(jQuerypass) || jQuerypass.indexOf(' ') > -1){
alert("ºñ¹Ð¹øÈ£´Â ¿µ¹®+¼ýÀÚ 6~12ÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
password.focus();
}else if(jQuerystr2.test(jQuerypass)){
alert("ºñ¹Ð¹øÈ£¿¡ ¹Ýº¹µÇ´Â ¹®ÀÚ ¹× ¼ýÀÚ°¡ ÀÖ½À´Ï´Ù.");
password.focus();
}else if(jQuerychk_num < 0 || jQuerychk_eng < 0) {
alert("ºñ¹Ð¹øÈ£´Â ¼ýÀÚ¿Í ¿µ¹®ÀÚ¸¦ È¥¿ëÇÏ¿©¾ß ÇÕ´Ï´Ù.");
password.focus();
}else{
check = true;
}
return check;
}
// ºñ¹Ð¹øÈ£ À¯È¿¼ºÃ¼Å©(ºñ¹Ð¹øȣȮÀÎ)
function validConfirmPassword(password, confirmPassword) {
var jQuerypass = password.val();
var jQueryconfirm = confirmPassword.val();
var jQuerystr = /^[a-zA-Z0-9@]{6,12}$/;
var jQuerystr2 = /(\w)\1\1\1/;
var jQuerychk_num = jQuerypass.search(/[0-9]/g);
var jQuerychk_eng = jQuerypass.search(/[a-z]/ig);
var check = false;
if (jQuerypass == "") {
alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
password.focus();
}else if (jQuerypass != jQueryconfirm) {
alert("ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£°¡ ¼·Î ´Ù¸¨´Ï´Ù.");
confirmPassword.focus();
}else if(!jQuerystr.test(jQuerypass) || jQuerypass.indexOf(' ') > -1){
alert("ºñ¹Ð¹øÈ£´Â ¿µ¹®+¼ýÀÚ 6~12ÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
password.focus();
}else if(jQuerystr2.test(jQuerypass)){
alert("ºñ¹Ð¹øÈ£¿¡ ¹Ýº¹µÇ´Â ¹®ÀÚ ¹× ¼ýÀÚ°¡ ÀÖ½À´Ï´Ù.");
password.focus();
}else if(jQuerychk_num < 0 || jQuerychk_eng < 0) {
alert("ºñ¹Ð¹øÈ£´Â ¼ýÀÚ¿Í ¿µ¹®ÀÚ¸¦ È¥¿ëÇÏ¿©¾ß ÇÕ´Ï´Ù.");
password.focus();
}else{
check = true;
}
return check;
}
// ¿£ÅÍÅ° À̺¥Æ®
function entKeyEventListener(keycode, formID){
if(keycode == 13){
jQuery("#"+formID).submit();
}
}
$(document).ready(function(){
$(".close3").click(function(){
$('.popup3').hide();
});
});
$(document).ready(function(){
$(".close2").click(function(){
$('.popup2').hide();
});
});
$(document).ready(function(){
$(".close").click(function(){
$('.popup').hide();
});
});
//¾ð·Ð¹æ¼Û Æ˾÷
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b1_1').hide();
$('#mmask').hide();
});
});
/*popup Àüȯ*/
$(document).ready(function(){
$(".left1").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b1_1").show();
});
});
$(document).ready(function(){
$(".right1").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b1_2").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b1_2').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â lecture */
$(document).ready(function(){
$(".big2").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b2").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b2').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â 3d */
$(document).ready(function(){
$(".big3").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b3").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b3').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m5 */
$(document).ready(function(){
$(".big5").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b5").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b5').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m6 */
$(document).ready(function(){
$(".big6").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b6").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b6').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m7 */
$(document).ready(function(){
$(".big7").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b7").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b7').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m8 */
$(document).ready(function(){
$(".big8").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b8").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b8').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m9 */
$(document).ready(function(){
$(".big9").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b9").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b9').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m10 */
$(document).ready(function(){
$(".big10").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b10").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b10').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m11 */
$(document).ready(function(){
$(".big11").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b11").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b11').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m12 */
$(document).ready(function(){
$(".big12").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b12").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b12').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m13 */
$(document).ready(function(){
$(".big13").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b13").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b13').hide();
$('#mmask').hide();
});
});
/* popupâ¶ç¿ì±â m14 */
$(document).ready(function(){
$(".big14").click(function(){
$('.mpopup').hide();
$('#mmask').show();
$(".b14").show();
});
});
/*popup ´Ý±â¹öÆ°*/
$(document).ready(function(){
$(".x").click(function(){
$('.b14').hide();
$('#mmask').hide();
});
});