Advertisement
Guest User

Ewe chutka

a guest
Feb 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(function($) {'use strict';
  2.  
  3.     //Responsive Nav
  4.     $('li.dropdown').find('.fa-angle-down').each(function(){
  5.         $(this).on('click', function(){
  6.             if( $(window).width() < 768 ) {
  7.                 $(this).parent().next().slideToggle();
  8.             }
  9.             return false;
  10.         });
  11.     });
  12.  
  13.     //Fit Vids
  14.     if( $('#video-container').length ) {
  15.         $("#video-container").fitVids();
  16.     }
  17.  
  18.     //Initiat WOW JS
  19.     new WOW().init();
  20.  
  21.     // portfolio filter
  22.     $(window).load(function(){
  23.  
  24.         $('.main-slider').addClass('animate-in');
  25.         $('.preloader').remove();
  26.         //End Preloader
  27.  
  28.         if( $('.masonery_area').length ) {
  29.             $('.masonery_area').masonry();//Masonry
  30.         }
  31.  
  32.         var $portfolio_selectors = $('.portfolio-filter >li>a');
  33.        
  34.         if($portfolio_selectors.length) {
  35.            
  36.             var $portfolio = $('.portfolio-items');
  37.             $portfolio.isotope({
  38.                 itemSelector : '.portfolio-item',
  39.                 layoutMode : 'fitRows'
  40.             });
  41.            
  42.             $portfolio_selectors.on('click', function(){
  43.                 $portfolio_selectors.removeClass('active');
  44.                 $(this).addClass('active');
  45.                 var selector = $(this).attr('data-filter');
  46.                 $portfolio.isotope({ filter: selector });
  47.                 return false;
  48.             });
  49.         }
  50.  
  51.     });
  52.  
  53.  
  54.     $('.timer').each(count);
  55.     function count(options) {
  56.         var $this = $(this);
  57.         options = $.extend({}, options || {}, $this.data('countToOptions') || {});
  58.         $this.countTo(options);
  59.     }
  60.        
  61.     // Search
  62.     $('.fa-search').on('click', function() {
  63.         $('.field-toggle').fadeToggle(200);
  64.     });
  65.  
  66. //Contact form
  67. $('#main-contact-form').submit(function(e){
  68.     (e||event).preventDefault();
  69.    
  70.     var $this = $(this);
  71.     //Отправляем запрос
  72.     $.ajax({
  73.         url  : $this.attr('action'),
  74.         type: "post",
  75.         data: $this.serialize()
  76.     });
  77. });
  78.  
  79.     // Progress Bar
  80.     $.each($('div.progress-bar'),function(){
  81.         $(this).css('width', $(this).attr('data-transition')+'%');
  82.     });
  83.  
  84.     if( $('#gmap').length ) {
  85.         var map;
  86.  
  87.         map = new GMaps({
  88.             el: '#gmap',
  89.             lat: 43.04446,
  90.             lng: -76.130791,
  91.             scrollwheel:false,
  92.             zoom: 16,
  93.             zoomControl : false,
  94.             panControl : false,
  95.             streetViewControl : false,
  96.             mapTypeControl: false,
  97.             overviewMapControl: false,
  98.             clickable: false
  99.         });
  100.  
  101.         map.addMarker({
  102.             lat: 43.04446,
  103.             lng: -76.130791,
  104.             animation: google.maps.Animation.DROP,
  105.             verticalAlign: 'bottom',
  106.             horizontalAlign: 'center',
  107.             backgroundColor: '#3e8bff',
  108.         });
  109.     }
  110.  
  111. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement