init.js 699 B

12345678910111213141516171819202122232425262728293031
  1. $(document).ready(function() {
  2. $(window).scroll(function() {
  3. var nav_img = $('.navbar-brand img');
  4. if ($(document).scrollTop() < 130) {
  5. $('nav').addClass('transparent');
  6. nav_img.attr("src","img/biotherm-white-dots.png");
  7. } else {
  8. $('nav').removeClass('transparent').css('color: black');
  9. nav_img.attr("src","img/biotherm-black-dots.png");
  10. }
  11. });
  12. if (window.location.hash) {
  13. var hash = window.location.hash;
  14. $('html, body').animate({
  15. scrollTop : $(hash).offset().top
  16. }, 500);
  17. };
  18. });
  19. $(document).on('click', '[data-toggle="lightbox"]', function(event) {
  20. event.preventDefault();
  21. $(this).ekkoLightbox();
  22. });
  23. $('#front-carousel').carousel({
  24. interval: 8000
  25. });