PageSourceSearch

http://gaira.ru/assets/js/theme-scripts.js

js gaira.ru collected 2026-10-05 00:27:25 UTC 7,683 bytes, 295 lines download raw bytes

1// ========== TABLE OF CONTENTS =========== //
2//
3// 1. PAGE LOADER 
4// 2. ACTIVE CLASS
5// 3. STYLE SWITCHER
6// 4. BOOTSTRAP CAROUSEL SLIDER
7// 5. SCROLL TO TOP BUTTON
8// 6. TEAM DISPLAY DROP DOWNS
9// 7. FADE IN NAVIGATION
10// 8. POST PAGE - FORCE MAIN IMAGE TO 75% OF SCREEN HEIGHT
11// 9. SCROLL TO SCRIPT USED FOR ONE PAGE THEME
12// 10. PARALLAX BACKGROUNDS
13// 11. BOOTSTRAP ACCORDION
14// 12. OWL SLIDER
15// 13. SCROLL TO REPLY SECTION ON POST PAGES
16// 14. CLOSE MOBILE MENU ON SELECT
17//
18// ======================================= //
19
20// ========== 1. START PAGE LOADER ========== //
21 (function($) { "use strict";
22
23$(window).load(function() {
24	$(".loader-img").delay(500).fadeOut();
25	$("#pageloader").delay(1000).fadeOut("slow");
26	var hash = window.location.hash;
27	if(!hash) { 
28	// Do nothing //
29	} else {
30	$(document).scrollTop( $(hash).offset().top -78); 
31}
32});
33 })(jQuery);
34 // ========== END PAGE LOADER ========== //
35(function($) { "use strict";
36  $(function(){
37      //2. Получить элемент, к которому необходимо добавить маску
38      $("#phone").mask("+7(999) 999-9999");
39    });
40  })(jQuery);
41
42    // ========== 2. ADDS "active" CLASS TO ANY CLICKED BUTTONS ========== //
43    (function($) { "use strict";
44 $(document).ready(function(){
45  $('a.btn').click(function(){
46  $('a.btn').removeClass('active');
47  $(this).addClass('active');
48  });
49});
50 })(jQuery);
51   // ========== END ACTIVE CLASS ========== // 
52	
53
54	   // ========== 4. START BOOTSTRAP CAROUSEL ========== //
55	 (function($) { "use strict";
56$('.carousel').carousel({
57  interval: 5000,
58  pause: "hover",
59});
60 })(jQuery);
61		   // ========== END BOOTSTRAP CAROUSEL ========== //
62	
63 // ========== 5. START SCROLL TO TOP ========== //
64 // Button
65 (function($) { "use strict";
66$(document).ready(function() {
67     $(".scrollup").hide();
68     $(window).scroll(function() {
69         if ($(this).scrollTop() > 400) {
70             $('.scrollup').fadeIn();
71         } else {
72             $('.scrollup').fadeOut();
73         }
74     });
75 });
76 })(jQuery);
77 // Action
78   (function($) { "use strict";
79$("a.scrolltotop").on('click', function(e) {
80
81   // prevent default anchor click behavior
82   e.preventDefault();
83
84   // store hash
85   var hash = this.hash;
86
87   // animate
88   $('html, body').stop().animate({scrollTop:0}, 1000, 'easeOutExpo');
89
90});
91 })(jQuery);
92  // ========== END SCROLL TO TOP ========== //
93 
94// ========== 7 START FADE IN NAVIGATION ========== //
95 (function($) { "use strict";
96$(document).ready(function() {
97     $(".nav-fadein").hide();
98     $(window).on('scroll load', function() {
99         if ($(this).scrollTop() > 400) {
100             $('.nav-fadein').fadeIn();
101         } else {
102             $('.nav-fadein').fadeOut();
103         }
104     });
105 });
106 })(jQuery);
107// ========== END FADE IN NAVIGATION ========== //
108
109 // ========== 8. POST PAGE - MAKE IMAGE 75% OF SCREEN HEIGHT ========== //
110  (function($) { "use strict";
111$(document).ready(function() {
112     $(window).on('resize load', function() {
113       var newheight = $(window).height() * .75;
114	   $('.post-img-lg').height(newheight);
115     });
116 });
117 })(jQuery);
118 
119// ========== 9. START SCROLLTO SCRIPT ========== //
120     (function($) { "use strict";
121$("a.scrollto[href^='#']").on('click', function(e) {
122
123   // prevent default anchor click behavior
124   e.preventDefault();
125
126   // store hash
127   var hash = this.hash;
128
129   // animate
130   $('html, body').stop().animate({
131       scrollTop: $(hash).offset().top -78}, 1200, 'easeInOutExpo');
132
133});
134 })(jQuery);
135 // ========== END SCROLL TO SCRIPT ========== //
136
137  // ========== 10. START PARALLAX SETTINGS ========== //
138 (function($) { "use strict";
139				$('.parallax').stellar();
140			$.stellar({
141				horizontalScrolling: false,
142				verticalOffset: 0
143			});
144		 })(jQuery);
145		  (function($) { "use strict";
146				$('.parallax-repeat').stellar();
147			$.stellar({
148				horizontalScrolling: false,
149				verticalOffset: 0
150			});
151		 })(jQuery);
152  // ========== END PARALLAX SETTINGS ========== //
153  
154    // ========== 11. BOOTSTRAP ACCORDION SETTINGS ========== //
155(function($) { "use strict";
156var $accordion = $('#accordion .panel a');
157$accordion.click(function(){
158   $accordion.removeClass('selected');
159   $(this).addClass('selected');
160});
161$('#accordion .panel a').on('click',function(e){
162    if($(this).parents('.panel').children('.panel-collapse').hasClass('in')){
163     $accordion.removeClass('selected');
164    }
165});
166})(jQuery);
167// ========= END BOOTSTRAP ACCORDION SETTINGS ========== //
168
169// ========== 12. START OWL SLIDER SETTINGS ========== //
170$(document).ready(function() {
171     
172     var owl = $("#team-slider");
173     
174     
175    $("#team-slider").owlCarousel({
176        items: 3,
177        loop: true,
178        lazyLoad: true,
179        itemsScaleUp: true,
180        autoplay: true,
181        autoplayTimeout: 5000,
182        autoplaySpeed: 2000,
183        autoplayHoverPause: true,
184        nav: true,
185        navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"],
186        responsiveClass:true,
187        responsive:{
188            0:{
189                items:1
190                
191            },
192            768:{
193                items:2
194            },
195            1000:{
196                items:3
197               
198            }
199        }
200        
201    });
202    $("#team-slider2").owlCarousel({
203        items: 3,
204        loop: true,
205        itemsScaleUp: true,
206        autoplay: true,
207        autoplayTimeout: 3000,
208        autoplaySpeed: 2000,
209        autoplayHoverPause: true,
210        nav: true,
211        navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"],
212        responsiveClass:true,
213        responsive:{
214            0:{
215                items:1
216            },
217            768:{
218                items:2
219            },
220            1000:{
221                items:3
222            }
223        }
224       
225    });
226    
227    $("#owl-slider-main").owlCarousel({
228        
229        items: 1,
230        loop: true,
231        autoplay: true,
232        autoplayTimeout: 5000,
233        autoplaySpeed: 3000,
234        autoplayHoverPause: true,
235        nav: true,
236        navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
237        dots: true
238    });
239    
240    $("#prev_slide").click(function() {
241		owl.trigger("prev.owl.carousel");
242	});
243
244	$("#next_slide").click(function() {
245		owl.trigger("next.owl.carousel");
246	});
247	
248});
249// ========== END OWL SLIDER SETTINGS ========== //
250 
251// ========== 13. SCROLL TO REPLY SECTION ON BLOG ========== // 
252  (function($) { "use strict";
253		$(".go-to-reply").click(function() {
254     $('html, body').animate({
255         scrollTop: $("#reply").offset().top -60 }, 600);
256 });
257 })(jQuery);
258// ========== SCROLL TO REPLY SECTION ON BLOG ========== //
259
260    // ========== 14. CLOSE MOBILE MENU ON SELECT ========== //
261    (function($) { "use strict";
262 $(document).ready(function(){
263  $('.nav li a').click(function(){
264  $('.navbar-collapse').removeClass('in');
265  });
266   $('.nav li.dropdown a').click(function(){
267  $('.navbar-collapse').addClass('in');
268  });
269});
270 })(jQuery);
271   // ========== END CLOSE MOBILE MENU ON SELECT ========== //
272    
273 (function($) { "use strict";
274 $(document).ready(function(){
275    $("a.fancybox").fancybox({
276    //protect : true,
277    slideShow: false,
278    infobar : true,
279    animationEffect: false
280  });
281    });
282  })(jQuery);
283  
284  (function($) { "use strict";
285 $(document).ready(function(){
286     $('#btn-form').prop('disabled',true);
287     $('#personal').change(function(){
288         if ($(this).prop('checked')==false) {
289             $('#btn-form').prop('disabled',true); 
290           }else{
291             $('#btn-form').prop('disabled',false); 
292           }
293     });
294    });
295  })(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.