;(function () { // animate-box /*var contentWayPoint = function() { $('.animate-box').waypoint( function( direction ) { if( direction === 'down' && !$(this).hasClass('animated') ) { $(this.element).addClass('fadeInUp animated'); } } , { offset: '75%' } ); };*/ // Burger Menu var burgerMenu = function() { $('body').on('click', '.js-fh5co-nav-toggle', function(event){ if ( $('#navbar').is(':visible') ) { $(this).removeClass('active'); } else { $(this).addClass('active'); } event.preventDefault(); }); }; // Reflect scrolling in navigation var navActive = function(section) { var $el = $('#navbar > ul'); $el.find('li').removeClass('active'); $el.each(function(){ $(this).find('a[data-nav-section="'+section+'"]').closest('li').addClass('active'); }); }; // Window Scroll var windowScroll = function() { var lastScrollTop = 0; $(window).scroll(function(event){ var header = $('#fh5co-header'), scrlTop = $(this).scrollTop(); if ( scrlTop > 500 && scrlTop <= 2000 ) { header.addClass('navbar-fixed-top fh5co-animated slideInDown'); } else if ( scrlTop <= 500) { if ( header.hasClass('navbar-fixed-top') ) { header.addClass('navbar-fixed-top fh5co-animated slideOutUp'); setTimeout(function(){ header.removeClass('navbar-fixed-top fh5co-animated slideInDown slideOutUp'); }, 100 ); } } }); }; // Animations // About Us var aboutAnimate = function() { if ( $('#about-us').length > 0 ) { $('#about-us .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; // Team var teamAnimate = function() { if ( $('#team').length > 0 ) { $('#team .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var teamWayPoint = function() { if ( $('#team').length > 0 ) { $('#team').waypoint( function( direction ) { if( direction === 'down' && !$(this).hasClass('animated') ) { setTimeout(teamAnimate, 200); $(this.element).addClass('animated'); } } , { offset: '95%' } ); } }; // Services var servicesAnimate = function() { if ( $('#fh5co-our-services').length > 0 ) { $('#fh5co-our-services .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var servicesWayPoint = function() { if ( $('#fh5co-our-services').length > 0 ) { $('#fh5co-our-services').waypoint( function( direction ) { if( direction === 'down' && !$(this).hasClass('animated') ) { setTimeout(servicesAnimate, 200); $(this.element).addClass('animated'); } } , { offset: '95%' } ); } }; // Features var featuresAnimate = function() { if ( $('#fh5co-features').length > 0 ) { $('#fh5co-features .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var featuresWayPoint = function() { if ( $('#fh5co-features').length > 0 ) { $('#fh5co-features').waypoint( function( direction ) { if( direction === 'down' && !$(this).hasClass('animated') ) { setTimeout(function(){ $('.animate-features-1').addClass('animated fadeIn'); }, 100); setTimeout(function(){ $('.animate-features-2').addClass('animated fadeIn'); }, 200); setTimeout(featuresAnimate, 500); setTimeout(function(){ $('.animate-features-3').addClass('animated fadeInUp'); }, 1400); $(this.element).addClass('animated'); } } , { offset: '95%' } ); } }; // testimonials var testimonialsAnimate = function() { if ( $('#fh5co-testimonials').length > 0 ) { $('#fh5co-testimonials .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var testimonialsWayPoint = function() { if ( $('#fh5co-testimonials').length > 0 ) { $('#fh5co-testimonials').waypoint( function( direction ) { setTimeout(testimonialsAnimate, 200); $(this.element).addClass('animated'); } , { offset: '95%' } ); } }; // Pricing var pricingAnimate = function() { if ( $('#fh5co-pricing').length > 0 ) { $('#fh5co-pricing .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var pricingWayPoint = function() { if ( $('#fh5co-pricing').length > 0 ) { $('#fh5co-pricing').waypoint( function( direction ) { setTimeout(function(){ $('.animate-pricing-1').addClass('animated fadeIn'); }, 200); setTimeout(function(){ $('.animate-pricing-2').addClass('animated fadeIn'); }, 300); setTimeout(pricingAnimate, 700); $(this.element).addClass('animated'); } , { offset: '95%' } ); } }; // Pricing var pressAnimate = function() { if ( $('#fh5co-press').length > 0 ) { $('#fh5co-press .to-animate').each(function( k ) { var el = $(this); setTimeout ( function () { el.addClass('fadeInUp animated'); }, k * 200, 'easeInOutExpo' ); }); } }; var pressWayPoint = function() { if ( $('#fh5co-press').length > 0 ) { $('#fh5co-press').waypoint( function( direction ) { setTimeout(function(){ $('.animate-press-1').addClass('animated fadeIn'); }, 200); setTimeout(function(){ $('.animate-press-2').addClass('animated fadeIn'); }, 300); setTimeout(pressAnimate, 700); $(this.element).addClass('animated'); } , { offset: '95%' } ); } }; // Document on load. $(function(){ burgerMenu(); windowScroll(); teamWayPoint(); servicesWayPoint(); featuresWayPoint(); testimonialsWayPoint(); pricingWayPoint(); pressWayPoint(); }); }()); $(document).ready(function(){ var oBtb = (".one-btn"), tBtn = (".three-btn"), stBtn = (".sthree-btn"), one = (".one"), three = (".three"), sthree = (".sthree"), siBtn = (".si-btn"), wrap = (".wrap"), cBtn = (".c-box"), sBtn = (".s-box"), bgBox = (".bg-box"), bgImg = (".bgimage"), thFramebtn = (".three-frame"), sthFramebtn = (".sthree-frame"), oFramebtn = (".one-frame"), thGlassbtn = (".three-glass"), sthGlassbtn = (".sthree-glass"), oGlassbtn = (".one-glass"), thImgdoor = (".threedoor"), sthImgdoor = (".sthreedoor"), oImgdoor = (".onedoor"), thImgglass = (".threeglass"), sthImgglass = (".sthreeglass"), oImgglass = (".oneglass"), ondDivide = (".onedivide"), lBox = (".l-box"), lBtn = (".one-line"); var oImgbox = (".oneimg-box"), stImgbox = (".sthreeimg-box"), tImgbox = (".threeimg-box"); // 초기값 $(oBtb).addClass('on'); // 배경화면 선택 $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(1)').show(); $(bgBox).find('a').eq(0).click(function(){ $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(1)').show(); }); $(bgBox).find('a').eq(1).click(function(){ $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(2)').show(); }); $(bgBox).find('a').eq(2).click(function(){ $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(3)').show(); }); $(bgBox).find('a').eq(3).click(function(){ $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(4)').show(); }); $(bgBox).find('a').eq(4).click(function(){ $(bgImg).find('img').hide(); $(bgImg).find('img:nth-child(5)').show(); }); // 원슬라이딩 $(oBtb).click(function(){ $(one).show(); $(three).hide(); $(sthree).hide(); $(oImgbox).show(); $(tImgbox).hide(); $(stImgbox).hide(); $(oBtb).addClass('on'); $(tBtn).removeClass('on'); $(stBtn).removeClass('on'); }); $(oImgdoor).find('img').hide(); $(oImgglass).find('img' ).hide(); $(oImgdoor).find('img:nth-child(1)').show(); $(oImgglass).find('img:nth-child(1)').show(); $(oFramebtn).find('a').eq(0).addClass('on'); $(oGlassbtn).find('a').eq(0).addClass('on'); $(lBtn).find('a').eq(0).addClass('on'); $(lBox).find('.gold').show(); $(lBox).find('.white').hide(); $(lBox).find('.black').hide(); $(lBox).find('.dark').hide(); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(0).show(); // 원슬라이딩 프레임 이미지 변경 $(oFramebtn).find('a').eq(0).click(function(){ $(oImgdoor).find('img').hide(); $(oImgdoor).find('img:nth-child(1)').show(); $(oFramebtn).find('a').removeClass('on') $(oFramebtn).find('a').eq(0).addClass('on') $(lBox).find('.gold').show(); $(lBox).find('.white').hide(); $(lBox).find('.black').hide(); $(lBox).find('.dark').hide(); }); $(oFramebtn).find('a').eq(1).click(function(){ $(oImgdoor).find('img').hide(); $(oImgdoor).find('img:nth-child(2)').show(); $(oFramebtn).find('a').removeClass('on') $(oFramebtn).find('a').eq(1).addClass('on') $(lBox).find('.gold').hide(); $(lBox).find('.white').show(); $(lBox).find('.black').hide(); $(lBox).find('.dark').hide(); }); $(oFramebtn).find('a').eq(2).click(function(){ $(oImgdoor).find('img').hide(); $(oImgdoor).find('img:nth-child(3)').show(); $(oFramebtn).find('a').removeClass('on') $(oFramebtn).find('a').eq(2).addClass('on'); $(lBox).find('.gold').hide(); $(lBox).find('.white').hide(); $(lBox).find('.black').show(); $(lBox).find('.dark').hide(); }); $(oFramebtn).find('a').eq(3).click(function(){ $(oImgdoor).find('img').hide(); $(oImgdoor).find('img:nth-child(4)').show(); $(oFramebtn).find('a').removeClass('on') $(oFramebtn).find('a').eq(3).addClass('on'); $(lBox).find('.gold').hide(); $(lBox).find('.white').hide(); $(lBox).find('.black').hide(); $(lBox).find('.dark').show(); }); // 원슬라이딩 유리 이미지 변경 $(oGlassbtn).find('a').eq(0).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(1)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(0).addClass('on') $(ondDivide).show(); }); $(oGlassbtn).find('a').eq(1).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(2)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(1).addClass('on') $(ondDivide).show(); }); //유리띠디자인 불가능 $(oGlassbtn).find('a').eq(2).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(3)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(2).addClass('on'); $(ondDivide).hide(); }); $(oGlassbtn).find('a').eq(3).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(4)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(3).addClass('on') $(ondDivide).hide(); }); $(oGlassbtn).find('a').eq(4).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(5)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(4).addClass('on') $(ondDivide).hide(); }); $(oGlassbtn).find('a').eq(5).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(6)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(5).addClass('on') $(ondDivide).hide(); }); $(oGlassbtn).find('a').eq(6).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(7)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(6).addClass('on') $(ondDivide).hide(); }); $(oGlassbtn).find('a').eq(7).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(8)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(7).addClass('on') $(ondDivide).hide(); }); //여기까지 $(oGlassbtn).find('a').eq(8).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(9)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(8).addClass('on') $(ondDivide).show(); }); $(oGlassbtn).find('a').eq(9).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(10)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(9).addClass('on') $(ondDivide).show(); }); $(oGlassbtn).find('a').eq(10).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(11)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(10).addClass('on') $(ondDivide).show(); }); $(oGlassbtn).find('a').eq(11).click(function(){ $(oImgglass).find('img').hide(); $(oImgglass).find('img:nth-child(12)').show(); $(oGlassbtn).find('a').removeClass('on') $(oGlassbtn).find('a').eq(11).addClass('on') $(ondDivide).show(); }); // 원슬라이딩 띠디자인 이미지 변경 $(lBtn).find('.si-btn').eq(0).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(0).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(0).show(); }); $(lBtn).find('.si-btn').eq(1).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(1).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(1).show(); }); $(lBtn).find('.si-btn').eq(2).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(2).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(2).show(); }); $(lBtn).find('.si-btn').eq(3).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(3).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(3).show(); }); $(lBtn).find('.si-btn').eq(4).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(4).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(4).show(); }); $(lBtn).find('.si-btn').eq(5).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(5).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(5).show(); }); $(lBtn).find('.si-btn').eq(6).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(6).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(6).show(); }); $(lBtn).find('.si-btn').eq(7).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(7).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(7).show(); }); $(lBtn).find('.si-btn').eq(8).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(8).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(8).show(); }); $(lBtn).find('.si-btn').eq(9).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(9).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(9).show(); }); $(lBtn).find('.si-btn').eq(10).click(function(){ $(lBtn).find('a').removeClass('on'); $(lBtn).find('a').eq(10).addClass('on'); $(ondDivide).find('.l-box').hide(); $(ondDivide).find('.l-box').eq(10).show(); }); // 초슬림 3연동 $(tBtn).click(function(){ $(three).show(); $(sthree).hide(); $(one).hide(); $(tImgbox).show(); $(stImgbox).hide(); $(oImgbox).hide(); $(tBtn).addClass('on'); $(oBtb).removeClass('on'); $(stBtn).removeClass('on'); }); $(thImgdoor).find('img').hide(); $(thImgglass).find('img').hide(); $(thImgdoor).find('img:nth-child(1)').show(); $(thImgglass).find('img:nth-child(1)').show(); $(thFramebtn).find('a').eq(0).addClass('on'); $(thGlassbtn).find('a').eq(0).addClass('on'); // 초슬림 3연동 프레임 이미지 변경 $(thFramebtn).find('a').eq(0).click(function(){ $(thImgdoor).find('img').hide(); $(thImgdoor).find('img:nth-child(1)').show(); $(thFramebtn).find('a').removeClass('on') $(thFramebtn).find('a').eq(0).addClass('on') }); $(thFramebtn).find('a').eq(1).click(function(){ $(thImgdoor).find('img').hide(); $(thImgdoor).find('img:nth-child(2)').show(); $(thFramebtn).find('a').removeClass('on') $(thFramebtn).find('a').eq(1).addClass('on') }); $(thFramebtn).find('a').eq(2).click(function(){ $(thImgdoor).find('img').hide(); $(thImgdoor).find('img:nth-child(3)').show(); $(thFramebtn).find('a').removeClass('on') $(thFramebtn).find('a').eq(2).addClass('on') }); $(thFramebtn).find('a').eq(3).click(function(){ $(thImgdoor).find('img').hide(); $(thImgdoor).find('img:nth-child(4)').show(); $(thFramebtn).find('a').removeClass('on') $(thFramebtn).find('a').eq(3).addClass('on') }); // 초슬림 3연동 유리 이미지 변경 $(thGlassbtn).find('a').eq(0).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(1)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(0).addClass('on') }); $(thGlassbtn).find('a').eq(1).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(2)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(1).addClass('on') }); $(thGlassbtn).find('a').eq(2).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(3)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(2).addClass('on') }); $(thGlassbtn).find('a').eq(3).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(4)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(3).addClass('on') }); $(thGlassbtn).find('a').eq(4).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(5)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(4).addClass('on') }); $(thGlassbtn).find('a').eq(5).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(6)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(5).addClass('on') }); $(thGlassbtn).find('a').eq(6).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(7)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(6).addClass('on') }); $(thGlassbtn).find('a').eq(7).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(8)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(7).addClass('on') }); $(thGlassbtn).find('a').eq(8).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(9)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(8).addClass('on') }); $(thGlassbtn).find('a').eq(9).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(10)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(9).addClass('on') }); $(thGlassbtn).find('a').eq(10).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(11)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(10).addClass('on') }); $(thGlassbtn).find('a').eq(11).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(12)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(11).addClass('on') }); $(thGlassbtn).find('a').eq(12).click(function(){ $(thImgglass).find('img').hide(); $(thImgglass).find('img:nth-child(13)').show(); $(thGlassbtn).find('a').removeClass('on') $(thGlassbtn).find('a').eq(12).addClass('on') }); // 슬림 3연동 $(stBtn).click(function(){ $(sthree).show(); $(three).hide(); $(one).hide(); $(stImgbox).show(); $(tImgbox).hide(); $(oImgbox).hide(); $(stBtn).addClass('on'); $(tBtn).removeClass('on'); $(oBtb).removeClass('on'); }); $(sthImgdoor).find('img').hide(); $(sthImgglass).find('img').hide(); $(sthImgdoor).find('img:nth-child(1)').show(); $(sthImgglass).find('img:nth-child(1)').show(); $(sthFramebtn).find('a').eq(0).addClass('on'); $(sthGlassbtn).find('a').eq(0).addClass('on'); // 슬림 3연동 프레임 이미지 변경 $(sthFramebtn).find('a').eq(0).click(function(){ $(sthImgdoor).find('img').hide(); $(sthImgdoor).find('img:nth-child(1)').show(); $(sthFramebtn).find('a').removeClass('on') $(sthFramebtn).find('a').eq(0).addClass('on') }); $(sthFramebtn).find('a').eq(1).click(function(){ $(sthImgdoor).find('img').hide(); $(sthImgdoor).find('img:nth-child(2)').show(); $(sthFramebtn).find('a').removeClass('on') $(sthFramebtn).find('a').eq(1).addClass('on') }); $(sthFramebtn).find('a').eq(2).click(function(){ $(sthImgdoor).find('img').hide(); $(sthImgdoor).find('img:nth-child(3)').show(); $(sthFramebtn).find('a').removeClass('on') $(sthFramebtn).find('a').eq(2).addClass('on') }); $(sthFramebtn).find('a').eq(3).click(function(){ $(sthImgdoor).find('img').hide(); $(sthImgdoor).find('img:nth-child(4)').show(); $(sthFramebtn).find('a').removeClass('on') $(sthFramebtn).find('a').eq(3).addClass('on') }); // 슬림 3연동 유리 이미지 변경 $(sthGlassbtn).find('a').eq(0).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(1)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(0).addClass('on') }); $(sthGlassbtn).find('a').eq(1).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(2)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(1).addClass('on') }); $(sthGlassbtn).find('a').eq(2).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(3)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(2).addClass('on') }); $(sthGlassbtn).find('a').eq(3).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(4)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(3).addClass('on') }); $(sthGlassbtn).find('a').eq(4).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(5)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(4).addClass('on') }); $(sthGlassbtn).find('a').eq(5).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(6)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(5).addClass('on') }); $(sthGlassbtn).find('a').eq(6).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(7)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(6).addClass('on') }); $(sthGlassbtn).find('a').eq(7).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(8)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(7).addClass('on') }); $(sthGlassbtn).find('a').eq(8).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(9)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(8).addClass('on') }); $(sthGlassbtn).find('a').eq(9).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(10)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(9).addClass('on') }); $(sthGlassbtn).find('a').eq(10).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(11)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(10).addClass('on') }); $(sthGlassbtn).find('a').eq(11).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(12)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(11).addClass('on') }); $(sthGlassbtn).find('a').eq(12).click(function(){ $(sthImgglass).find('img').hide(); $(sthImgglass).find('img:nth-child(13)').show(); $(sthGlassbtn).find('a').removeClass('on') $(sthGlassbtn).find('a').eq(12).addClass('on') }); });