text: ;(function () {
  	
  	'use strict';
  
  	var mobileMenuOutsideClick = function() {
  
  		$(document).click(function (e) {
  	    var container = $("#fh5co-offcanvas, .js-fh5co-nav-toggle");
  	    if (!container.is(e.target) && container.has(e.target).length === 0) {
  
  	    	if ( $('body').hasClass('offcanvas') ) {
  
      			$('body').removeClass('offcanvas');
      			$('.js-fh5co-nav-toggle').removeClass('active');
  				
  	    	}
  	    
  	    	
  	    }
  		});
  
  	};
  
  
  	var offcanvasMenu = function() {
  
  		$('#page').prepend('<div id="fh5co-offcanvas" />');
  		$('#page').prepend('<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle fh5co-nav-white"><i></i></a>');
  		var clone1 = $('.menu-1 > ul').clone();
  		$('#fh5co-offcanvas').append(clone1);
  		var clone2 = $('.menu-2 > ul').clone();
  		$('#fh5co-offcanvas').append(clone2);
  
  		$('#fh5co-offcanvas .has-dropdown').addClass('offcanvas-has-dropdown');
  		$('#fh5co-offcanvas')
  			.find('li')
  			.removeClass('has-dropdown');
  
  		// Hover dropdown menu on mobile
  		$('.offcanvas-has-dropdown').mouseenter(function(){
  			var $this = $(this);
  
  			$this
  				.addClass('active')
  				.find('ul')
  				.slideDown(500, 'easeOutExpo');				
  		}).mouseleave(function(){
  
  			var $this = $(this);
  			$this
  				.removeClass('active')
  				.find('ul')
  				.slideUp(500, 'easeOutExpo');				
  		});
  
  		
  		
  		$(window).resize(function(){
  
  			if ( $('body').hasClass('offcanvas') ) {
  
      			$('body').removeClass('offcanvas');
      			$('.js-fh5co-nav-toggle').removeClass('active');
  				
  	    	}
  		});
  	};
  
  
  	var burgerMenu = function() {
  
  		$('body').on('click', '.js-fh5co-nav-toggle', function(event){
  			var $this = $(this);
  
  
  			if ( $('body').hasClass('overflow offcanvas') ) {
  				$('body').removeClass('overflow offcanvas');
  			} else {
  				$('body').addClass('overflow offcanvas');
  			}
  			$this.toggleClass('active');
  			event.preventDefault();
  
  		});
  	};
  
  
  
  	var contentWayPoint = function() {
  		var i = 0;
  		$('.animate-box').waypoint( function( direction ) {
  
  			if( direction === 'down' && !$(this.element).hasClass('animated-fast') ) {
  				
  				i++;
  
  				$(this.element).addClass('item-animate');
  				setTimeout(function(){
  
  					$('body .animate-box.item-animate').each(function(k){
  						var el = $(this);
  						setTimeout( function () {
  							var effect = el.data('animate-effect');
  							if ( effect === 'fadeIn') {
  								el.addClass('fadeIn animated-fast');
  							} else if ( effect === 'fadeInLeft') {
  								el.addClass('fadeInLeft animated-fast');
  							} else if ( effect === 'fadeInRight') {
  								el.addClass('fadeInRight animated-fast');
  							} else {
  								el.addClass('fadeInUp animated-fast');
  							}
  
  							el.removeClass('item-animate');
  						},  k * 200, 'easeInOutExpo' );
  					});
  					
  				}, 100);
  				
  			}
  
  		} , { offset: '85%' } );
  	};
  
  
  	var dropdown = function() {
  
  		$('.has-dropdown').mouseenter(function(){
  
  			var $this = $(this);
  			$this
  				.find('.dropdown')
  				.css('display', 'block')
  				.addClass('animated-fast fadeInUpMenu');
  
  		}).mouseleave(function(){
  			var $this = $(this);
  
  			$this
  				.find('.dropdown')
  				.css('display', 'none')
  				.removeClass('animated-fast fadeInUpMenu');
  		});
  
  	};
  
  
  	var goToTop = function() {
  
  		$('.js-gotop').on('click', function(event){
  			
  			event.preventDefault();
  
  			$('html, body').animate({
  				scrollTop: $('html').offset().top
  			}, 500, 'easeInOutExpo');
  			
  			return false;
  		});
  
  		$(window).scroll(function(){
  
  			var $win = $(window);
  			if ($win.scrollTop() > 200) {
  				$('.js-top').addClass('active');
  			} else {
  				$('.js-top').removeClass('active');
  			}
  
  		});
  	
  	};
  	
  	
  
  	// Loading page
  	var loaderPage = function() {
  		$(".adpay-loader").fadeOut("slow");
  	};
  
  	var counter = function() {
  		$('.js-counter').countTo({
  			 formatter: function (value, options) {
  	      return value.toFixed(options.decimals);
  	    },
  		});
  	};
  
  	var counterWayPoint = function() {
  		if ($('#fh5co-counter').length > 0 ) {
  			$('#fh5co-counter').waypoint( function( direction ) {
  										
  				if( direction === 'down' && !$(this.element).hasClass('animated') ) {
  					setTimeout( counter , 400);					
  					$(this.element).addClass('animated');
  				}
  			} , { offset: '90%' } );
  		}
  	};
  	
  	
  	
  // 탭메뉴  
  
  	var formTab = function() {
  
  		$('.tab-menu a').on('click', function(event){
  			var $this = $(this),
  				data = $this.data('tab');
  
  			$('.tab-menu li').removeClass('active');
  			$this.closest('li').addClass('active');
  
  			$('.tab .tab-content-inner').removeClass('active');
  			$this.closest('.tab').find('.tab-content-inner[data-content="'+data+'"]').addClass('active');
  
  			event.preventDefault();
  
  		});
  
  	};
  	
  
  //  Faqs Accordion
  	var faqsAccordion = function() {
  
  		var faqAcc = $('.faq-accordion h3');
  
  		// Click
  		faqAcc.on('click', function(event){
  			var $this = $(this);
  			
  			$('.faq-accordion').removeClass('active');
  			$('.faq-accordion').find('.faq-body').slideUp(400, 'easeInOutExpo');
  
  			if ( !$this.closest('.faq-accordion').find('.faq-body').is(':visible')) {
  				$this.closest('.faq-accordion').addClass('active');
  				$this.closest('.faq-accordion').find('.faq-body').slideDown(400, 'easeInOutExpo');
  			} else {
  				$this.closest('.faq-accordion').removeClass('active');
  				$this.closest('.faq-accordion').find('.faq-body').slideUp(400, 'easeInOutExpo');
  			}
  
  
  			setTimeout(function(){
  				// alert($this.closest('.faq-accordion.active').innerHeight());
  				$('html, body').animate({
  			        scrollTop: $this.closest('.faq-accordion.active').offset().top - 90
  			    }, 500);
  			}, 700);
  			
  			
  			event.preventDefault();
  			return false;
  
  		});
  
  	};
  
  
  	
  	$(function(){
  		mobileMenuOutsideClick();
  		offcanvasMenu();
  		burgerMenu();
  		contentWayPoint();
  		dropdown();
  		goToTop();
  		loaderPage();
  		counterWayPoint();
  		formTab();
  		faqsAccordion();
  		faqsWayPoint();
  	});
  
  
  }());
  
  
  
  
  	// Animations
  	// Home
  
  	var homeAnimate = function() {
  		if ( $('#fh5co-header').length > 0 ) {	
  
  			$('#fh5co-header').waypoint( function( direction ) {
  										
  				if( direction === 'down' && !$(this.element).hasClass('animated') ) {
  
  
  					setTimeout(function() {
  						$('#fh5co-header .to-animate').each(function( k ) {
  							var el = $(this);
  							
  							setTimeout ( function () {
  								el.addClass('fadeInUp animated');
  							},  k * 200, 'easeInOutExpo' );
  							
  						});
  					}, 200);
  
  					
  					$(this.element).addClass('animated');
  						
  				}
  			} , { offset: '80%' } );
  
  		}
  	};
  
  
  	var introAnimate = function() {
  		if ( $('#fh5co-section').length > 0 ) {	
  
  			$('#fh5co-section').waypoint( function( direction ) {
  										
  				if( direction === 'down' && !$(this.element).hasClass('animated') ) {
  
  
  					setTimeout(function() {
  						$('#fh5co-section .to-animate').each(function( k ) {
  							var el = $(this);
  							
  							setTimeout ( function () {
  								el.addClass('fadeInRight animated');
  							},  k * 200, 'easeInOutExpo' );
  							
  						});
  					}, 1000);
  
  					
  					$(this.element).addClass('animated');
  						
  				}
  			} , { offset: '80%' } );
  
  		}
  	};
  	
  	
  	
  	
  	// FAQ Animate 
  	var faqsAnimate = function() {
  		if ( $('#fh5co-faqs').length > 0 ) {	
  			$('#fh5co-faqs .to-animate').each(function( k ) {
  				
  				var el = $(this);
  				
  				setTimeout ( function () {
  					el.addClass('fadeInUp animated');
  				},  k * 200, 'easeInOutExpo' );
  				
  			});
  		}
  	};
  	var faqsWayPoint = function() {
  		if ( $('#fh5co-faqs').length > 0 ) {
  			$('#fh5co-faqs').waypoint( function( direction ) {
  										
  				if( direction === 'down' && !$(this).hasClass('animated') ) {
  					
  				
  					
  
  					setTimeout(function(){
  						$('.faqs-animate-1').addClass('fadeIn animated');
  					}, 200);
  
  					setTimeout(function(){
  						$('.faqs-animate-2').addClass('fadeIn animated');
  					}, 400);
  
  					setTimeout(faqsAnimate, 800);
  
  					
  					$(this.element).addClass('animated');
  						
  				}
  			} , { offset: '75%' } );
  		}
  	};
  
  	// slider
  	
  	$(document).ready(function() {
      $('.carousel').carousel({
        interval: 6000
      })
    });
  
  $('.carousel').carousel();