/*Theme : assan * Author : Design_mylife * Version : V2.6 * */ $( window ).resize(function() { $(".navbar-collapse").css({ maxHeight: $(window).height() - $(".navbar-header").height() + "px" }); }); //sticky header on scroll $(document).ready(function () { $(window).load(function () { $(".sticky").sticky({topSpacing: 0}); }); }); // ¸ð¹ÙÀÏ Ã¼Å© var filter = "win16|win32|win64|mac"; if(navigator.platform){ if(0 > filter.indexOf(navigator.platform.toLowerCase())){ // mobile /* $(".navbar-nav>.dropdown").hover(function(){ $('ul:first',this).show(); }, function(){ $('ul:first',this).hide(); }); */ }else{ // pc $(".navbar-nav>.dropdown").hover(function(){ $('ul:first',this).show(); }, function(){ $('ul:first',this).hide(); }); } } /* ============================================== WOW plugin triggers animate.css on scroll =============================================== */ $(document).ready(function () { var wow = new WOW( { boxClass: 'wow', // animated element css class (default is wow) animateClass: 'animated', // animation css class (default is animated) offset: 100, // distance to the element when triggering the animation (default is 0) mobile: false // trigger animations on mobile devices (true is default) } ); wow.init(); }); //parallax $(document).ready(function () { $(window).stellar({ horizontalScrolling: false, responsive: true/*, scrollProperty: 'scroll', parallaxElements: false, horizontalScrolling: false, horizontalOffset: 0, verticalOffset: 0*/ }); }); //owl carousel for work $(document).ready(function () { $("#work-carousel").owlCarousel({ loop:true, margin:0, nav:false, responsive:{ 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:4 } } }); }); //owl carousel for news $(document).ready(function () { $("#news-carousel").owlCarousel({ // Most important owl features items: 2, itemsCustom: false, itemsDesktop: [1199, 2], itemsDesktopSmall: [980, 2], itemsTablet: [768, 2], itemsTabletSmall: false, itemsMobile: [479, 1], singleItem: false, startDragging: true, autoPlay: 4000 }); }); //owl carousel for testimonials $(document).ready(function () { $("#testi-carousel").owlCarousel({ loop:true, margin:0, nav:false, responsive:{ 0:{ items:1 }, 600:{ items:1 }, 1000:{ items:1 } } }); }); //featured work carousel slider $(document).ready(function () { $("#featured-work").owlCarousel({ loop:true, margin:0, nav:false, responsive:{ 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:4 } } }); }); /* ============================================== Counter Up =============================================== */ jQuery(document).ready(function ($) { $('.counter').counterUp({ delay: 10, time: 800 }); }); //MAGNIFIC POPUP $(document).ready(function () { $('.show-image').magnificPopup({type: 'image'}); }); /* ============================================== flex slider =============================================== */ $(document).ready(function () { $('.main-flex-slider,.testi-slide').flexslider({ slideshowSpeed: 5000, directionNav: false, animation: "fade" }); $('.testi-slide').flexslider({ slideshowSpeed: 5000, directionNav: false, animation: "fade", smoothHeight:true }); }); //OWL CAROUSEL $(document).ready(function () { $("#clients-slider").owlCarousel({ loop:true, margin:10, nav:false, responsive:{ 0:{ items:1 }, 600:{ items:3 }, 1000:{ items:5 } } }); }); /*========tooltip and popovers====*/ $(document).ready(function () { $("[data-toggle=popover]").popover(); $("[data-toggle=tooltip]").tooltip(); }); //transparent header $(document).ready(function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.transparent-header').css("background", "#252525"); } else { $('.transparent-header').css("background", "transparent"); } }); }); //Search (function () { $('.top-search').on('click', function() { $('.search').fadeIn(500, function() { $(this).toggleClass('search-toggle'); }); }); $('.search-close').on('click', function() { $('.search').fadeOut(500, function() { $(this).removeClass('search-toggle'); }); }); }()); /*********************************************************** * ACCORDION ***********************************************************/ $('.panel-ico a[data-toggle="collapse"]').on('click', function () { if ($(this).closest('.panel-heading').hasClass('active')) { $(this).closest('.panel-heading').removeClass('active'); } else { $('.panel-heading a[data-toggle="collapse"]').closest('.panel-heading').removeClass('active'); $(this).closest('.panel-heading').addClass('active'); } }); /*********************************************************** * owl-carousel 2017-08-03 ***********************************************************/ $(document).ready(function(){ $('.owl-carousel').owlCarousel({ items:1, autoHeight:true, merge:true, loop:true, margin:10, video:true, lazyLoad:true, center:true, responsive:{ 480:{ items:2 }, 600:{ items:5 } } }) }); /*********************************************************** * select 2017-08-03 ***********************************************************/ var urlmenu = document.getElementById( 'select-link' ); urlmenu.onchange = function() { window.open( this.options[ this.selectedIndex ].value ); }; /*********************************************************** * google map ***********************************************************/ function initMap() { var uluru = {lat: 37.566652, lng: 126.977956}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 18, center: uluru }); var marker = new google.maps.Marker({ position: uluru, map: map }); } $(document).ready(function(){ $('.breadcrumb-wrap').backstretch([ "../img/img/sub-1.png", "../img/img/sub-2.png", "../img/img/sub-3.png", "../img/img/sub-5.png", "../img/img/sub-6.png" ], { fade: 750, duration: 4000 }); });