PageSourceSearch

https://www.vbspaces.com/js/interface.js

js vbspaces.com collected 2026-10-04 13:25:35 UTC 9,491 bytes, 388 lines download raw bytes

1( function($) {
2  'use strict';
3
4
5
6  	/*-------------------------------------------------------------------------------
7	  Detect mobile device 
8	-------------------------------------------------------------------------------*/
9
10
11
12	var mobileDevice = false; 
13
14	if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
15	  	$('html').addClass('mobile');
16	  	mobileDevice = true;
17	}
18
19	else{
20		$('html').addClass('no-mobile');
21		mobileDevice = false;
22	}
23
24
25
26    /*-------------------------------------------------------------------------------
27	  Window load
28	-------------------------------------------------------------------------------*/
29
30
31
32	/*$(window).load(function(){
33
34		$('.loader').fadeOut();
35
36    	var wow = new WOW({
37		    offset: 100,          
38		    mobile: false
39		  }
40		);
41		wow.init();
42	});*/
43
44	var navbar=$('.js-navbar-affix');
45	var navbarAffixHeight=65
46
47
48
49	/*-------------------------------------------------------------------------------
50	  Affix
51	-------------------------------------------------------------------------------*/
52
53
54
55	navbar.affix({
56	  offset: {
57	    top: 12
58	  }
59	});
60
61	navbar.on('affix.bs.affix', function() {
62		if (!navbar.hasClass('affix')){
63			navbar.addClass('animated slideInDown');
64  			navbar.find('.js-brand-hinge').addClass('animated hinge');
65		}
66	});
67
68	navbar.on('affix-top.bs.affix', function() {
69	  	navbar.removeClass('animated slideInDown');
70	  	$('.navbar-collapse').collapse('hide');
71	});
72
73
74	
75	/*-------------------------------------------------------------------------------
76	 Navbar collapse
77	-------------------------------------------------------------------------------*/
78
79
80
81	$('.navbar-collapse').on('show.bs.collapse', function () {
82	 	navbar.addClass('affix');
83	});
84
85	$('.navbar-collapse').on('hide.bs.collapse', function () {
86		if (navbar.hasClass('affix-top')){
87			navbar.removeClass('affix');
88		}
89	});
90
91	$(".navbar-nav > li > a").on('click', function() {
92	    $(".navbar-collapse").collapse('hide');
93	});
94
95
96
97	/*-------------------------------------------------------------------------------
98	  Smooth scroll to anchor
99	-------------------------------------------------------------------------------*/
100
101
102
103    $('.js-target-scroll').on('click', function() {
104        var target = $(this.hash);
105        if (target.length) {
106            $('html,body').animate({
107                scrollTop: (target.offset().top - navbarAffixHeight + 1)
108            }, 1000);
109            return false;
110        }
111    });
112
113
114    /*-------------------------------------------------------------------------------
115	 Scrollspy
116	-------------------------------------------------------------------------------*/
117
118
119
120	$('body').scrollspy({
121		offset:  navbarAffixHeight + 1
122	});
123
124
125
126    /*-------------------------------------------------------------------------------
127	  Parallax
128	-------------------------------------------------------------------------------*/
129
130
131
132	if(!mobileDevice){
133		$(window).stellar({
134		  	responsive: true,
135		  	horizontalScrolling: false,
136		  	hideDistantElements: false,
137		  	horizontalOffset: 0,
138		  	verticalOffset: 0,
139		});
140	}
141
142
143
144	/*-------------------------------------------------------------------------------
145	  Progress Bars
146	-------------------------------------------------------------------------------*/
147
148
149
150	function progress_bars() {
151		$(".progress .progress-bar:in-viewport").each(function() {
152			if (!$(this).hasClass("animated")) {
153				$(this).addClass("animated");
154				$(this).width($(this).attr("data-width") + "%");
155			}
156			
157		});
158	}
159
160
161
162	/*-------------------------------------------------------------------------------
163	  Counter
164	-------------------------------------------------------------------------------*/
165
166
167
168	function counter() {
169		
170		if (typeof $.fn.jQuerySimpleCounter !== 'undefined') {
171		
172			$(".counter .counter-value:in-viewport").each(function() {
173				
174				if (!$(this).hasClass("animated")) {
175					$(this).addClass("animated");
176					$(this).jQuerySimpleCounter({
177						start: 0,
178						end: $(this).attr("data-value"),
179						duration: 2000
180					});	
181				}
182			
183			});
184			
185		}
186	}
187
188
189
190	/*-------------------------------------------------------------------------------
191	  Windows scroll
192	-------------------------------------------------------------------------------*/
193
194
195
196	$(window).scroll(function() {
197		progress_bars();
198		counter();
199	});
200
201
202
203	/*-------------------------------------------------------------------------------
204	  Portfolio masonry
205	-------------------------------------------------------------------------------*/
206
207
208
209	$('.isotope').each(function() {		
210		var $container = $(this);
211		$container.imagesLoaded( function(){
212			$container.isotope({		 
213				itemSelector: '.isotope-item',
214				percentPosition: true,
215				layoutMode: 'masonry',	
216				masonry: {
217				  columnWidth: '.isotope-item'
218				}	
219			});	
220		});
221    }); 
222
223
224	$('.filter li a').on('click', function() {
225		$('.filter .active').removeClass('active');
226		$(this).closest('li').addClass('active');
227		var selector = $(this).attr('data-filter');
228		$('.isotope').isotope({
229			filter: selector,
230			animationOptions: {
231				duration: 500,
232				queue: false
233			}
234		});
235		return false;
236	});
237
238
239
240	/*-------------------------------------------------------------------------------
241	  Gallery
242	-------------------------------------------------------------------------------*/
243
244
245
246	$('.js-gallery').each(function(){
247		$(this).magnificPopup({
248			delegate: 'a',
249		    type: 'image',
250		    removalDelay: 300,
251		    tLoading: 'Loading image #%curr%...',
252		    gallery: {
253		       enabled: true,
254		       navigateByImgClick: true,
255		       preload:[0,1]
256		    },
257		    image: {
258		       tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
259		       titleSrc: function(item) {
260		          return item.el.attr('title') + '<small></small>';
261		       }
262		    }
263
264		});
265	});
266
267
268	/*-------------------------------------------------------------------------------
269	 Partners Carousel
270	-------------------------------------------------------------------------------*/
271
272
273
274	$(".partners-carousel").owlCarousel({
275		items : 4,
276	    itemsDesktop : [1199,4],
277	    itemsDesktopSmall : [980,3],
278	    itemsTablet: [768,2],
279	    itemsMobile : [479,1],
280		responsiveRefreshRate:0,
281	 	autoHeight : true,
282    	responsiveRefreshRate : 0
283	});
284
285
286
287	/*-------------------------------------------------------------------------------
288	  Reviews carousel
289	-------------------------------------------------------------------------------*/
290
291
292
293	$(".js-review-carousel").owlCarousel({
294		singleItem:true,
295		responsiveRefreshRate:0,
296	 	autoHeight : true
297	});
298
299
300
301	/*-------------------------------------------------------------------------------
302	  Reviews carousel 2
303	-------------------------------------------------------------------------------*/
304
305
306
307	$(".js-review-carousel-2").owlCarousel({
308		items : 2,
309	    itemsDesktop : [1199,2],
310	    itemsDesktopSmall : [980,1],
311	    itemsTablet: [768,1],
312	    itemsMobile : [479,1],
313		responsiveRefreshRate:0,
314	 	autoHeight : true
315	});
316
317
318
319	/*-------------------------------------------------------------------------------
320	  Gallery carousel
321	-------------------------------------------------------------------------------*/
322
323
324	
325	$(".gallery-carousel").owlCarousel({
326		singleItem:true,
327	 	autoHeight : true,
328	 	pagination:false,
329	 	navigation:true,
330	 	transitionStyle : "fadeUp",
331	 	navigationText:["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"]
332	});
333
334
335	/*-------------------------------------------------------------------------------
336	  Ajax Mailchimp
337	-------------------------------------------------------------------------------*/
338
339
340
341 	$('.js-subscribe-form').ajaxChimp({
342        language: 'cm',
343        url: 'http://csmthemes.us3.list-manage.com/subscribe/post?u=9666c25a337f497687875a388&id=5b881a50fb'
344            //http://xxx.xxx.list-manage.com/subscribe/post?u=xxx&id=xxx
345    });
346
347
348    $.ajaxChimp.translations.cm = {
349        'submit': 'Submitting...',
350        0: '<i class="fa fa-envelope"></i> Awesome! We have sent you a confirmation email',
351        1: '<i class="fa fa-exclamation-triangle"></i> Please enter a value',
352        2: '<i class="fa fa-exclamation-triangle"></i> An email address must contain a single @',
353        3: '<i class="fa fa-exclamation-triangle"></i> The domain portion of the email address is invalid (the portion after the @: )',
354        4: '<i class="fa fa-exclamation-triangle"></i> The username portion of the email address is invalid (the portion before the @: )',
355        5: '<i class="fa fa-exclamation-triangle"></i> This email address looks fake or invalid. Please enter a real email address'
356    };
357
358
359	/*-------------------------------------------------------------------------------
360	  Ajax Form
361	-------------------------------------------------------------------------------*/
362
363
364
365	if ($('.js-ajax-form').length) {
366		$('.js-ajax-form').each(function(){
367			$(this).validate({
368				errorClass: 'error wobble-error',
369			    submitHandler: function(form){
370		        	$.ajax({
371			            type: "POST",
372			            url:"mail.php",
373			            data: $(form).serialize(),
374			            success: function() {
375			                $('.modal').modal('hide');
376		                	$('#success').modal('show');
377		                },
378
379		                error: function(){
380			            	$('.modal').modal('hide');
381			                $('#error').modal('show');
382			            }
383			        });
384			    }
385			});
386		});
387	}
388})(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.