Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.     try {
  3.         $('.close_f').click(function() {
  4.             $(this).parent('div').hide();
  5.             $('.error').hide();
  6.             $('.good').hide();
  7.         });
  8.     } catch(e){};
  9.     try {
  10.         //$("#contactForm").animated("zoomIn");
  11.     } catch(e){};
  12.     try {
  13.         $(".main_menu_button").click(function() {
  14.             $(".nav_menu ul").slideToggle();
  15.         });
  16.     } catch(e){};
  17.     try {
  18.         $(".a_f_orm1, .f_orm_bl1").click(function() {
  19.             $(".f_orm1").slideToggle();
  20.             $(".good").slideToggle();
  21.         });
  22.     } catch(e){};
  23.     try {
  24.         $(".a_f_orm2, .f_orm_bl2").click(function() {
  25.             $(".f_orm2").slideToggle();
  26.             $(".good").slideToggle();
  27.         });
  28.     } catch(e){};
  29.     try {
  30.         //Таймер обратного отсчета
  31.         //Документация: http://keith-wood.name/countdown.html
  32.         //<div class="countdown" date-time="2015-01-07"></div>
  33.         var austDay = new Date($(".countdown").attr("date-time"));
  34.         $(".countdown").countdown({
  35.             until: austDay,
  36.             format: 'dHMS'
  37.         });
  38.     } catch(e){};
  39.     try {
  40.         //$(".countdown").countdown({until: '3300'});
  41.         //Попап менеджер FancyBox
  42.         //Документация: http://fancybox.net/howto
  43.         //<a class="fancybox"><img src="image.jpg" /></a>
  44.         //<a class="fancybox" data-fancybox-group="group"><img src="image.jpg" /></a>
  45.  
  46.     } catch(e){};
  47.     try {
  48.         $('.prod').hover(function() {
  49.             $(this).children('.over').slideToggle(300, function() {
  50.                 $(this).children("a").animated("fadeInUp", "fadeInUp");
  51.             });
  52.         });
  53.     } catch(e){};
  54.     try {
  55.         $(".fancybox").fancybox();
  56.     } catch(e){};
  57.     try {
  58.         $("a.modalbox").fancybox({
  59.             width: '300',
  60.             height: '300'
  61.  
  62.         });
  63.     } catch(e){};
  64.     try {
  65.         $("a.modalbox2").fancybox({
  66.             width: '1000',
  67.             height: '500'
  68.  
  69.         });
  70.     } catch(e){};
  71.     try {
  72.  
  73.     //Навигация по Landing Page
  74.     //$(".top_mnu") - это верхняя панель со ссылками.
  75.     //Ссылки вида <a href="#contacts">Контакты</a>
  76.         $(".nav_menu").navigation();
  77.  
  78.     } catch(e){};
  79.     try {
  80.         //Добавляет классы дочерним блокам .block для анимации
  81.         //Документация: http://imakewebthings.com/jquery-waypoints/
  82.         $(".block").waypoint(function(direction) {
  83.             if (direction === "down") {
  84.                 $(".class").addClass("active");
  85.             } else if (direction === "up") {
  86.                 $(".class").removeClass("deactive");
  87.             };
  88.         }, {
  89.             offset: 100
  90.         });
  91.     } catch(e){};
  92.     try {
  93.  
  94.         //Плавный скролл до блока .div по клику на .scroll
  95.         //Документация: https://github.com/flesler/jquery.scrollTo
  96.         $("a.scroll").click(function() {
  97.             $.scrollTo($("#section9"), 2800, {
  98.                 offset: -120
  99.             });
  100.         });
  101.     } catch(e){};
  102.     try {
  103.     //СлайдШоу
  104.         $('.banner_top').flexslider({
  105.             animation: "fade",
  106.             slideshow: true,
  107.             slideshowSpeed: 5000,
  108.             animationDuration: 2000
  109.         });
  110.     } catch(e){};
  111.     try {
  112.         //Каруселька
  113.         //Документация: http://owlgraphic.com/owlcarousel/
  114.         var owl = $(".carousel");
  115.         owl.owlCarousel({
  116.             items: 1,
  117.             slideSpeed: 2000,
  118.             paginationSpeed: 400,
  119.             autoPlay: 10000,
  120.             singleItem: true
  121.         });
  122.         /*owl.on("mousewheel", ".owl-wrapper", function (e) {
  123.             if (e.deltaY > 0) {
  124.                 owl.trigger("owl.prev");
  125.             } else {
  126.                 owl.trigger("owl.next");
  127.             }
  128.             e.preventDefault();
  129.         });*/
  130.     } catch(e){};
  131.     try {
  132.         $(".next_button").click(function() {
  133.             owl.trigger("owl.next");
  134.         });
  135.     } catch(e){};
  136.     try {
  137.         $(".prev_button").click(function() {
  138.             owl.trigger("owl.prev");
  139.         });
  140.     } catch(e){};
  141.     try {
  142.         $(".clients").owlCarousel({
  143.             autoPlay: 3000,
  144.             items: 4,
  145.             slideSpeed: 2000,
  146.             itemsDesktop: [1199, 3],
  147.             itemsDesktopSmall: [979, 3]
  148.         });
  149.         //Кнопка "Наверх"
  150.         //Документация:
  151.         //http://api.jquery.com/scrolltop/
  152.         //http://api.jquery.com/animate/
  153.  
  154.     } catch(e){};
  155.     try {
  156.         $(window).scroll(function() {
  157.             if ($(this).scrollTop() > 1000) {
  158.  
  159.                 $('#totop').fadeIn();
  160.  
  161.             } else {
  162.  
  163.                 $('#totop').fadeOut();
  164.  
  165.             }
  166.         });
  167.     } catch(e){};
  168.     try {
  169.  
  170.         $("#totop").click(function() {
  171.             $("body, html").animate({
  172.                 scrollTop: 0
  173.             }, 2800);
  174.             return false;
  175.         });
  176.     } catch(e){};
  177.     try {
  178.         $("a.fancyform").fancybox();
  179.         //Аякс отправка форм
  180.         //Документация: http://api.jquery.com/jquery.ajax/
  181.     } catch(e){};
  182. });// end of $(ready)
  183.  
  184. $(window).load(function() {
  185.     try {
  186.         $(".prod, .sh_w").animated("fadeInUp", "fadeInUp");
  187.     } catch(e){};
  188.     try {
  189.         $(".plys3").animated("fadeIn", "fadeIn");
  190.     } catch(e){};
  191.     try {
  192.         $(".titleh2").animated("fadeInUp", "fadeInUp");
  193.     } catch(e){};
  194.     try {
  195.         $(".cl, .skem, .plus p, .poch p, .otz").animated("zoomIn", "zoomIn");
  196.     } catch(e){};
  197.     try {
  198.         $("#section3 p").animated("fadeIn", "fadeIn");
  199.     } catch(e){};
  200.     try {
  201.         $(".contact_f, .countdown, #section2 .open_form, .log_bl>div").animated("zoomIn", "zoomIn");
  202.     } catch(e){};
  203.     try {
  204.         setInterval(function() {
  205.             $("#pech").animated("swing", "swing");
  206.         }, 5000);
  207.         setInterval(function() {
  208.             $("#pech").removeClass();
  209.         }, 6000);
  210.     } catch(e){};
  211. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement