E:
/
home
/
kbcomunicacao1
/
Web
/
feicon
/
js
/
Upload File
HOME
/* * Theme: Codeon - one page responsive template. * Version: v3.4 * Author: Design_mylife * Created on : May 31, 2014, 10:42:39 AM(india) * file: custome js(editable) */ /* ============================================== main flex slider =============================================== */ $(window).load(function() { $('.main-flex-slider').flexslider({ slideshowSpeed: 5000, directionNav: false, animation: "fade", controlNav:false }); }); /* ============================================== portfolio gallery slide =============================================== */ $(window).load(function() { $('.portfolio-slide').flexslider({ slideshowSpeed: 5000, directionNav: false, animation: "fade", controlNav:true }); }); //navbar collapse scroll on fix height $( window ).resize(function() { $(".navbar-collapse").css({ maxHeight: $(window).height() - $(".navbar-header").height() + "px" }); }); /* ============================================== Sticky Navbar =============================================== */ $(document).ready(function(){ $(".sticky").sticky({topSpacing:0}); }); /* ============================================== Auto Close Responsive Navbar on Click =============================================== */ function close_toggle() { if ($(window).width() <= 768) { $('.navbar-collapse a').on('click', function(){ $('.navbar-collapse').collapse('hide'); }); } else { $('.navbar .navbar-default a').off('click'); } } close_toggle(); $(window).resize(close_toggle); /* ============================================== Smooth Scroll To Anchor =============================================== */ $('.scrollto a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); /*=========================*/ /*========tooltip and popovers====*/ /*==========================*/ $("[data-toggle=popover]").popover(); $("[data-toggle=tooltip]").tooltip(); /*=========================*/ /*========Animation on scroll with wow.js====*/ /*==========================*/ wow = new WOW( { animateClass: 'animated', offset: 100, mobile: true } ); wow.init(); /*=========================*/ /*========on hover dropdown navigation====*/ /*==========================*/ $(document).ready(function() { $('.js-activated').dropdownHover({ instantlyCloseOthers: false, delay: 0 }).dropdown(); }); //parallax $(document).ready(function () { $(window).stellar({ horizontalScrolling: false, responsive: true/*, scrollProperty: 'scroll', parallaxElements: false, horizontalScrolling: false, horizontalOffset: 0, verticalOffset: 0*/ }); }); /* ============================================== Counter Up =============================================== */ jQuery(document).ready(function($) { $('.counter').counterUp({ delay: 100, time: 800 }); }); //owl carousel for testimonials $(document).ready(function() { $("#testi-carousel").owlCarousel({ // Most important owl features items : 1, itemsCustom : false, itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsTabletSmall: false, itemsMobile : [479,1], singleItem : false, startDragging : true }); }); /***=================easy pie charts================================= */ $('.chart').each(function () { var $this = $(this); var color = $(this).data('scale-color'); setTimeout(function () { $this.filter(':visible').waypoint(function (direction) { $(this).easyPieChart({ barColor: color, trackColor: '#fff', onStep: function (from, to, percent) { jQuery(this.el).find('.percent').text(Math.round(percent)); } }); }, {offset: '100%'}); }, 500); }); //back to top $(document).ready(function () { //Check to see if the window is top if not then display button $(window).scroll(function () { if ($(this).scrollTop() > 800) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll to top $('.scrollToTop').click(function () { $('html, body').animate({scrollTop: 0}, 800); return false; }); }); $(window).scroll(function(){ /* ------------------- Header Animation ---------------------*/ if ($(this).scrollTop() > 5){ $('.navbar-transparent').addClass("navbar-bg"); } else{ $('.navbar-transparent').removeClass("navbar-bg"); } });