// HTML document is loaded jQuery(window).on("load", function(){ "use strict"; // var 프리로딩 var loader = jQuery('.preloader'); var bgpreloader = jQuery('.bg-preloader'); var menumobile = $('#main-menu'); //contactform var var contactname = jQuery('#name-contact'); var contactemail = jQuery('#email-contact, input#email-contact'); var contactmessage = jQuery('#message-contact'); var contactsent = jQuery('#send-contact'); //form failed succes var var successent = jQuery("#mail_success"); var failedsent = jQuery("#mail_failed"); //slidertext var var slidtext = jQuery('#slidertext'); // start function loader.fadeOut('slow', function() { "use strict"; // opening slideup bgpreloader.fadeOut(1500); // animated transition & scroll onStep onStep(); // stick navbar navdefault.sticky(); // auto height $('.box').matchHeight(); // mobile icon $(".navbar-toggle").on("click", function() { menumobile.toggleClass('menu-show'); navdefault.toggleClass('fullHeight'); }); }); // end function // countDown jQuery(function () { jQuery('#defaultCountdown').countdown({until: new Date(2020, 8-1, 1, 8)}); // year, month, date, hour }); //slideshow text home jQuery(function() { var slideBegin = 3000, transSpeed = 500, simple_slideshow = slidtext, listItems = simple_slideshow.children('.main-text'), listLen = listItems.length, i = 0, changeList = function() { listItems.eq(i).fadeOut(transSpeed, function() { i += 1, i === listLen && (i = 0), listItems.eq(i).fadeIn(transSpeed) }) }; listItems.not(':first').hide(), setInterval(changeList, slideBegin); }); // projects var $containerpro = jQuery( '#projects-wrap' ); $containerpro.isotope( { itemSelector: '.item', filter: '*' } ); jQuery( '.filt-projects' ) .on( 'click', function( e ) { e.preventDefault(); var $this = jQuery( this ); if ( $this.hasClass( 'selected' ) ) { return false; } var $optionSetpro = $this.parents(); $optionSetpro.find( '.selected' ) .removeClass( 'selected' ); $this.addClass( 'selected' ); var selector = $( this ) .attr( 'data-project' ); $containerpro.isotope( { filter: selector, } ); return false; }); // layout Isotope after each image loads $containerpro.imagesLoaded().progress( function() { $containerpro.isotope('layout'); }); // projects var $Wcontainerpro = jQuery( '.w-gallery-container' ); $Wcontainerpro.isotope( { itemSelector: '.w-gallery', filter: '*' } ); jQuery( '.filt-projects-w' ) .on( 'click', function( e ) { e.preventDefault(); var $this = jQuery( this ); if ( $this.hasClass( 'selected' ) ) { return false; } var $optionSetpro = $this.parents(); $optionSetpro.find( '.selected' ) .removeClass( 'selected' ); $this.addClass( 'selected' ); var selector = $( this ) .attr( 'data-project' ); $Wcontainerpro.isotope( { filter: selector, } ); return false; }); // layout Isotope after each image loads $Wcontainerpro.imagesLoaded().progress( function() { $Wcontainerpro.isotope('layout'); }); // Magnific Popup img jQuery( '.big-img' ) .magnificPopup( { delegate: 'a', type: 'image', closeOnContentClick: false, closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, }, gallery: { enabled: false }, zoom: { enabled: true, duration: 300, // don't foget to change the duration also in CSS opener: function( element ) { return element.find( 'img' ); } } } ); // Magnific Popup img jQuery( '.big-img-1' ) .magnificPopup( { type: 'image' } ); // img detail projects var owl = $(".detailpro"); owl.owlCarousel({ navigation : true, singleItem : true, pagination: false, transitionStyle : "fade", navigationText: [ "", "" ], }); // owlCarousel testimonial var owl = jQuery("#owl-testimonial"); owl.owlCarousel({ slideSpeed: 1000, items: 1, navigation: true, itemsDesktop: [1000, 1], itemsDesktopSmall: [900, 1], itemsTablet: [600, 1], itemsMobile: false, pagination: false, autoPlay: 3000, stopOnHover: true, navigationText: [ "", "" ], }); // owlCarousel recent post var owl = jQuery( "#owl-post" ); owl.owlCarousel( { items: 3, pagination: true, itemsDesktop: [ 1000, 2 ], itemsDesktopSmall: [ 900, 2 ], itemsTablet: [ 600, 1 ], itemsMobile: false, autoPlay: false }); // owlCarousel team var owl = jQuery( "#owl-team" ); owl.owlCarousel( { items: 3, pagination: false, itemsDesktop: [ 1000, 2 ], itemsDesktopSmall: [ 900, 2 ], itemsTablet: [ 600, 1 ], itemsMobile: false, autoPlay: false, navigation: true, navigationText: [ "", "" ] } ); // owlCarousel brand var owl = jQuery("#owl-brand"); owl.owlCarousel({ items : 5, itemsDesktop : [1000,4], itemsDesktopSmall : [900,3], itemsTablet: [600,2], itemsMobile : false, autoPlay : 2000, stopOnHover : true, pagination: false }); // owl slider home var time = 7; // time in seconds var jQueryprogressBar, jQuerybar, jQueryelem, isPause, tick, percentTime; // Init the carousel jQuery( "#owl-slider-home" ) .owlCarousel( { slideSpeed: 1000, paginationSpeed: 1000, pagination: false, singleItem: true, transitionStyle: 'fade', afterInit: progressBar, afterMove: moved, loop: true, autoHeight: true, touchDrag: false, mouseDrag: false, navigation: true, navigationText: [ "", "" ] } ); // Init progressBar where elem is jQuery("#owl-slider-home") function progressBar( elem ) { jQueryelem = elem; // build progress bar elements buildProgressBar(); // start counting start(); } // create div#progressBar and div#bar then prepend to jQuery("#owl-slider-home") function buildProgressBar() { jQueryprogressBar = jQuery( "