// JavaScript for Conceito jQuery.noConflict(); jQuery(document).ready(function($) { "use strict"; // Scroll down opacity jQuery('.lead-text').vopacity(0.20, true); // Parallax effect jQuery.stellar({ horizontalScrolling: false, verticalOffset: 40, responsive:true }); // Header particles effect jQuery('#particles').particleground({ dotColor: '#666', lineColor: '#666' }); // Header fixed jQuery('#nav').affix({ offset: { top: 580 } }); // Count to jQuery(function() { jQuery('.countto').appear(function() { jQuery(".number_counter .number_count").each(function() { var count_element = jQuery(this).html(); jQuery(this).countTo({ from: 0, to: count_element, speed: 2500, refreshInterval: 50, }); }); }); }); // Scale video jQuery(".scale_vid").fitVids(); // Header menu smooth scroll jQuery('nav a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = jQuery(this.hash); target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); if (target.length) { jQuery('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); // Header text typewriter effect jQuery("#typed").typed({ strings: ["de resultados?", "de um site?", "fazer vendas online?", "estar nas redes sociais?"], typeSpeed: 100, backDelay: 4000, loop: true, loopCount: false, callback: function(){ foo(); }, resetCallback: function() { newTyped(); } }); jQuery(".reset").click(function(){ jQuery("#typed").typed('reset'); }); function newTyped(){ /* A new typed object */ } function foo(){ console.log("Callback"); } // OWL Carousels jQuery('.posts-carousel').owlCarousel({ loop:true, margin:0, autoplay:false, responsiveClass:true, responsive:{ 0:{ items:1, nav:false }, 600:{ items:1, nav:false }, 960:{ items:2, nav:false }, 1281:{ items:2, nav:false } } }); jQuery('.testimonials-list').owlCarousel({ loop:true, margin:0, autoplay:true, controls:true, responsiveClass:true, responsive:{ 0:{ items:1, nav:false }, 600:{ items:1, nav:false }, 960:{ items:1, nav:false }, 1281:{ items:1, nav:false } } }); jQuery('.logos-list').owlCarousel({ loop:true, margin:0, autoplay:true, responsiveClass:true, responsive:{ 0:{ items:2, nav:false }, 600:{ items:3, nav:false }, 960:{ items:4, nav:false }, 1281:{ items:4, nav:false } } }); }); jQuery(window).load(function() { jQuery(".loader").fadeOut("fast"); /* Flexslider */ jQuery('.flexslider').flexslider({ touchSwipe: true, controlNav: true, slideshow: true, slideshowSpeed: 7000, animationDuration: 600, randomize: false, pauseOnAction: true, pauseOnHover: false, }); }); // Isotope works filter jQuery(window).load(function(){ var $container = jQuery('.works-container'); $container.isotope({ filter: '*', animationOptions: { duration: 750, easing: 'linear', queue: false } }); jQuery('.filter a').click(function(){ jQuery('.filter .current').removeClass('current'); jQuery(this).addClass('current'); var selector = jQuery(this).attr('data-filter'); $container.isotope({ filter: selector, animationOptions: { duration: 750, easing: 'linear', queue: false } }); return false; }); }); // validate contact form jQuery(function($) { jQuery("#contact").validate({ rules: { name: { required: true, minlength: 2 }, email: { required: true, email: true }, subject: { required: true }, message: { required: true } }, messages: { name: { required: "Please type your name", minlength: "Please type your name correctly" }, email: { required: "Please type your e-mail correctly" }, subject: { required: "Please type about subject", minlength: "To short subject" }, message: { required: "Please type your message", minlength: "To short message" } }, submitHandler: function(form) { jQuery(form).ajaxSubmit({ type:"POST", data: jQuery(form).serialize(), url:"process.php", success: function() { jQuery('#contact :input').attr('disabled', 'disabled'); jQuery('#contact').fadeTo( "slow", 0.15, function() { jQuery(this).find(':input').attr('disabled', 'disabled'); jQuery(this).find('label').css('cursor','default'); jQuery('#success').fadeIn(); }); }, error: function() { jQuery('#contact').fadeTo( "slow", 0.15, function() { jQuery('#error').fadeIn(); }); } }); } }); });