$(function(){ $(document).on({ mouseenter:function(){ $(this).css('width','70%'); $(this).siblings().css('width','30%'); $(this).siblings().addClass('on') }, mouseleave:function(){ $('.con1_wrap > div').removeClass('on') $(this).css('width','50%') $(this).siblings().css('width','50%'); } },'.con1_wrap > div') var gallery_pro = $('.con6'); // 전문가 갤러리 gallery_pro.each(function(){ var $this = $(this), thum = $this.find(' > .slide_wrap'), li = thum.find('> ul > li'), control = $this.find('.pn_wrap'), prev = control.find('a').eq(0), next = control.find('a').eq(1), arr = [], arr_posX = [], clickChk = true; li.each(function(){ arr.push($(this)); arr_posX.push($(this).position().left); }) next.on('click', function(){ if(clickChk){ var obj = arr.shift(); arr.push(obj); gallerySet(4); } return false; }) prev.on('click', function(){ if(clickChk){ var obj = arr.pop(); arr.unshift(obj); gallerySet(5); } return false; }) function gallerySet(idx){ clickChk = false; for(var i=0; i