/* ------------------------------------------ */ /* TABLE OF CONTENTS /* ------------------------------------------ */ /* 01 - Revolution Slider */ /* 02 - MENU */ /* 03 - Sticky Navigation */ /* 04 - owl Slider */ /* 05 - Portfolio */ /* 06 - Hover Portfolio */ /* 07 - Loading Overlay */ /* 08 - Search */ /* 09 - Contact form */ /* 10 - Fancybox */ /* 11 - Progress-Bar */ /* 12 - Accordions */ /* 13 - Flickr */ /* 14 - Tweet */ /* 15 - Back to top button */ /* 16 - Parallax Mobile */ /* 17 - WOW Animation */ "use strict"; /*-----------------------------------------------------------------------------------*/ /* Start Revolution Slider /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function() { var revapi = jQuery("#rev_slider").revolution({ sliderType:"standard", jsFileLocation:"../style/rs-plugin/js/", dottedOverlay:"none", delay:9000, navigation: { arrows:{enable:true,style:"metis"}, bullets: { enable:true, hide_onmobile:false, hide_under:778, style:"hermes", hide_onleave:false, direction:"horizontal", h_align:"center", v_align:"bottom", h_offset:30, v_offset:20, space:5, tmp:'' }, }, parallax: { type:"mouse", origo:"slidercenter", speed:2000, levels:[2,3,4,5,6,7,10,11,12,13], }, responsiveLevels:[1240,1024,778,480], gridwidth:[1240,1024,778,480], gridheight:[520,480,580,400], }); }); /*ready*/ /*-----------------------------------------------------------------------------------*/ /* End Revolution Slider /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Start MENU /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Start Menu fadeInUp /*-----------------------------------------------------------------------------------*/ $(".flexnav").flexNav({ 'animationSpeed': 250, // default for drop down animation speed }); /*-----------------------------------------------------------------------------------*/ /* End Menu fadeInUp /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Start Sticky Navigation /*-----------------------------------------------------------------------------------*/ //menu header// jQuery(document).ready(function($){ //if you change this breakpoint in the style.css file (or _layout.scss if you use SASS), don't forget to update this value as well var MQL = 1170; //primary navigation slide-in effect if($(window).width() > MQL) { var headerHeight = $('.navbar-collapse').height(); $(window).on('scroll', { previousTop: 0 }, function () { var currentTop = $(window).scrollTop(); //check if user is scrolling up if (currentTop < this.previousTop ) { //if scrolling up... if (currentTop > 0 && $('.navbar-collapse').hasClass('is-fixed')) { $('.navbar-collapse').addClass('is-visible'); } else { $('.navbar-collapse').removeClass('is-visible is-fixed'); } } else { //if scrolling down... $('.navbar-collapse').removeClass('is-visible'); if( currentTop > headerHeight && !$('.navbar-collapse').hasClass('is-fixed')) $('.navbar-collapse').addClass('is-fixed'); } this.previousTop = currentTop; }); } }); $(document).ready(function () { if($('.navbar-collapse').attr('data-sticky') == "true"){ $(window).on("scroll",function(){ var Scrl = $(window).scrollTop(); if (Scrl > 1) { $('.Navbar-Header').addClass('sticky animated fadeInDown'); }else{ $('.Navbar-Header').removeClass('sticky animated fadeInDown'); } }); $('document').ready(function(){ var Scrl = $(window).scrollTop(); if (Scrl > 1) { $('.Navbar-Header').addClass('sticky animated fadeInDown'); }else{ $('.Navbar-Header').removeClass('sticky animated fadeInDown'); } }); } }); /*-----------------------------------------------------------------------------------*/ /* End Sticky Navigation /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* End MENU /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Start owl Slider /*-----------------------------------------------------------------------------------*/ $(document).ready(function() { $("#Testimonials-1col").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 1, itemsDesktop : [1000,2], //5 items between 1000px and 901px itemsDesktopSmall : [900,2], // betweem 900px and 601px itemsTablet: [600,1], //2 items between 600 and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); $("#Testimonials-2col").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 2, }); $("#Testimonials-3col").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 3, itemsDesktop : [1000,2], //5 items between 1000px and 901px itemsDesktopSmall : [900,2], // betweem 900px and 481px itemsTablet: [480,1], //2 items between 480px and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); }); $(document).ready(function() { $("#Our-clients").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 6, pagination: false, itemsDesktop : [1000,4], //5 items between 1000px and 901px itemsDesktopSmall : [900,4], // betweem 900px and 601px itemsTablet: [600,3], //2 items between 600 and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); $("#our-clients-3col").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 3, pagination: false, itemsDesktop : [1000,4], //5 items between 1000px and 901px itemsDesktopSmall : [900,4], // betweem 900px and 601px itemsTablet: [600,3], //2 items between 600 and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); $("#our-clients-3col2").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 3, pagination: false, }); }); $(document).ready(function() { var owl = $("#slider-blog"); owl.owlCarousel({ slideSpeed : 500, paginationSpeed : 400, singleItem:true, autoPlay : 3000, items : 10, //10 items above 1000px browser width itemsDesktop : [1000,5], //5 items between 1000px and 901px itemsDesktopSmall : [900,3], // betweem 900px and 601px itemsTablet: [600,2], //2 items between 600 and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); // Custom Navigation Events $(".next").click(function(){ owl.trigger('owl.next'); }) $(".prev").click(function(){ owl.trigger('owl.prev'); }) }); $(document).ready(function() { var owl = $("#slider-projects"); owl.owlCarousel({ slideSpeed : 500, paginationSpeed : 400, singleItem:true, autoPlay : 3000, items : 10, //10 items above 1000px browser width itemsDesktop : [1000,5], //5 items between 1000px and 901px itemsDesktopSmall : [900,3], // betweem 900px and 601px itemsTablet: [600,2], //2 items between 600 and 0 itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option }); // Custom Navigation Events $(".next").click(function(){ owl.trigger('owl.next'); }) $(".prev").click(function(){ owl.trigger('owl.prev'); }) }); $(document).ready(function() { $("#Projects-Slider-full").owlCarousel({ navigation : true }); }); $(document).ready(function() { $("#Projects-Slider").owlCarousel({ slideSpeed : 300, items : 3, paginationSpeed : 400, // "singleItem:true" is a shortcut for: // items : 1, // itemsDesktop : false, // itemsDesktopSmall : false, // itemsTablet: false, // itemsMobile : false }); $("#projects-slider-4col").owlCarousel({ slideSpeed : 300, items : 5, paginationSpeed : 400, // "singleItem:true" is a shortcut for: // items : 1, // itemsDesktop : false, // itemsDesktopSmall : false, // itemsTablet: false, // itemsMobile : false }); }); /*-----------------------------------------------------------------------------------*/ /* End owl Slider /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Start Portfolio /*-----------------------------------------------------------------------------------*/ $(document).ready(function () { $('ul#filters li a').click(function(e) { e.preventDefault(); $('ul#filters .active-link').removeClass('active-link'); $(this).parent().addClass('active-link'); var filter = $(this).attr('data-filter').toLowerCase(); $('.portfolio-items .portfolio-item:visible').each(function(i) { $(this).fadeOut(0,function(){show(filter);}); $('.portfolio-items .portfolio-item').addClass('animated flipInY'); }); return false; }); function show(filter){ if(filter == '*') { $('.portfolio-items .portfolio-item').fadeIn(0); $('.portfolio-items .portfolio-item').removeClass('animated flipInY'); } else { $('.portfolio-items .portfolio-item').each(function() { if($(this).attr('data-filter') == filter) { $(this).fadeIn(0); } }); } } }); /*-----------------------------------------------------------------------------------*/ /* End Portfolio /*-----------------------------------------------------------------------------------* /*-----------------------------------------------------------------------------------*/ /* Start Hover Portfolio /*-----------------------------------------------------------------------------------*/ $(document).ready(function () { $('.portfolio-item').each(function(){ var $this = $(this), $index = $this.index(), contents = $this.find('.projectItem-hover'); $this.hover(function(){ contents.fadeIn(300).find('.projectItem-hover').addClass('animated fadeOutUp').addClass('animated fadeInDown'); contents.find('.projectItem-hover').addClass('animated fadeOutDown').addClass('animated fadeInUp'); return false; },function(){ contents.fadeOut(300).find('.projectItem-hover').addClass('animated fadeInDown').addClass('animated fadeOutUp'); contents.find('.projectItem-hover').addClass('animated fadeInUp').addClass('animated fadeOutDown'); return false; }); }); }); /*-----------------------------------------------------------------------------------*/ /* End Hover Portfolio /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Strat Loading Overlay /*-----------------------------------------------------------------------------------*/ $(window).load(function() { $(".loading-overlay .spinner").fadeOut(300); $(".loading-overlay").fadeOut(300); }); $(window).load(function() { $('body').css({'overflow':'auto', 'height':'auto', 'position':'relative'}); }); /*-----------------------------------------------------------------------------------*/ /* End Loading Overlay /*-----------------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------- */ /* Start Search /* ---------------------------------------------------------------------- */ $('.Icons-Search').click(function(){ if($(this).parent().find('.Block-Search').is(':visible')){ $('.Block-Search').fadeOut(300); $(this).parent().removeClass('selected'); $('body').removeClass('show-search'); return false; }else{ $('.Block-Search').fadeIn(100); $(this).parent().addClass('selected'); $('body').addClass('show-search'); return false; } }); $(window).load(function() { $('.Block-Search').css({'display':'none'}); }); $(".Icons-Search a").click(function() { $('html, body').animate({ scrollTop: $("body").offset().top }, 500); }); $( ".open-shop-cart" ).click(function() { $('.shop-cart-header').toggleClass("active animated flipInY"); $('.open-shop-cart').toggleClass("select"); }); /* ---------------------------------------------------------------------- */ /* End Search /* ---------------------------------------------------------------------- */ /*-----------------------------------------------------------------------------------*/ /* Start Contact form /*-----------------------------------------------------------------------------------*/ var frm = $('#cform'); frm.submit(function (ev) { if($('#legales:checked').length === 1){ $.ajax({ type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), success: function (data) { $('#cform').append("