PageSourceSearch

https://www.lake-chateau.com/js/wedding_script.js

js lake-chateau.com collected 2026-10-04 04:21:44 UTC 15,784 bytes, 601 lines download raw bytes

1(function($) {
2	"use strict"; // Start of use strict
3	
4	/* Logo Lettering */
5	var logo_rotate = $("header .wed_logo_animation").attr('data-rotate');
6	if (logo_rotate!='') {
7		$("header .wed_logo_animation").addClass('wed_logo_rotate_'+logo_rotate);
8	}
9	
10	$("header .wed_logo_animation").lettering();
11	$("header .wed_logo_animation span").each(function(){
12	 	var min = 0;
13	 	var max = 50;
14	 	var randomNumber = Math.floor(Math.random()*(max-min+1)+min);
15	 	$(this).css('transition-delay', '0.'+randomNumber+'s');
16	 });
17
18
19// Particles
20	if ($('.wed_particles').length>0) {
21		$('.wed_particles').particleground( {
22			   dotColor: '#fff',
23		    lineColor: '#fff',
24		    particleRadius: '3',
25		    lineWidth: '0.5'
26
27			});
28		};
29	/*Firefly*/
30	if ($('.jqueryFireFly').length>0) {
31		$('.jqueryFireFly').each(function(){
32			var total = $(this).attr('data-total');
33			var minPixel = $(this).attr('data-minPixel');
34			var maxPixel = $(this).attr('data-maxPixel');
35			$.firefly({
36			  minPixel: minPixel,
37       	maxPixel: maxPixel,
38				color: 'none',
39				total : total,
40				twinkle: 0.9,
41				on:'.wed_firefly'
42			});
43		});
44		
45	};
46	/*Youtube Player*/
47
48	if ($('#bgndVideo').length>0) {
49			$('#bgndVideo').YTPlayer();
50		};
51
52
53	/*CountTo*/
54	$('.wed_timer').appear(function() {
55        var e = $(this);
56        e.countTo({
57            from: 0,
58            to: e.html(),
59            speed: 1300,
60            refreshInterval: 60
61        })
62    })
63    $('.date_picker').datepicker();
64
65    /*RSVP Form*/
66    $(".wed_form").validate({
67	  submitHandler: function(form) {
68	  	var type = $(form).attr('id');
69	    send_form(type);
70		return false;
71	  }
72	 });
73	
74	function send_form(type){
75	  var arr = [];
76	  $("#"+type+" .form-control").each(function(){
77
78	          var element = $(this).attr('name');
79	          var value = $(this).val();
80	          $(this).css({border:"1px solid #c4c4c4"});
81	          if($(this).prop('required') && value =="") {
82	                  $(this).css({border:"2px solid red"});
83	                  $(this).focus();
84	                  return false;
85	          }
86	          if (!value == '') {
87	                  arr.push('&'+element+'='+value);
88	          }
89	  })
90
91
92	  var dataString = (arr.join (' '));
93	  $.ajax({
94	          method: "POST",
95	          //url: "https://formspree.io/[email protected]",
96	          data: dataString,
97	          dataType: "json",
98	          success: function() {
99	                  $("#"+type).html("<div id='form_send_message'>Thank you for your request, we will contact you as soon as possible.</div>", 1500);
100	          }
101	  });
102
103
104	}
105
106    /*Gallery Lightbox*/
107	$('.lightbox').magnificPopup({ 
108	  type: 'image'
109	});
110	
111	$('.banquet').magnificPopup({ 
112	  type: 'image'
113	});
114	
115	//side container processing
116	$('.side-container').each(function() {
117		var $container = $(this);
118		var $openButton = $container.find('.side-container-open');
119		var $closeButton = $container.find('.side-container-close');
120
121		$openButton.on('click', function() {
122			$container.addClass('active');
123		});
124
125		$closeButton.on('click', function() {
126			$container.removeClass('active');
127		});
128		
129		window.onkeydown = function(event) {
130			if(event.keyCode == 27)	{
131				$container.removeClass('active');
132			}
133		}
134	});
135	
136	$('.video').magnificPopup({
137	  type: 'iframe',
138	  iframe: {
139		  markup: '<div class="mfp-iframe-scaler">'+
140		            '<div class="mfp-close"></div>'+
141		            '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
142		          '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button
143
144		  patterns: {
145		    youtube: {
146		      index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index).
147
148		      id: 'v=', // String that splits URL in a two parts, second part should be %id%
149		      // Or null - full URL will be returned
150		      // Or a function that should return %id%, for example:
151		      // id: function(url) { return 'parsed id'; } 
152
153		      src: 'http://www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe. 
154		    },
155		    vimeo: {
156		      index: 'vimeo.com/',
157		      id: '/',
158		      src: 'http://player.vimeo.com/video/%id%?autoplay=1'
159		    },
160		    gmaps: {
161		      index: '//maps.google.',
162		      src: '%id%&output=embed'
163		    }
164
165		    // you may add here more sources
166
167		  },
168
169		  srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src".
170		}  
171	  
172	});
173	
174	/*OWL Intro Slider*/
175	$(".wed_slider_carousel").owlCarousel({
176 		navigation : true, 
177 		responsive: true, 
178 		responsiveRefreshRate : 200, 
179 		responsiveBaseElement:window, 
180 		slideSpeed : 200, 
181 		addClassActive:true,
182		paginationSpeed : 200, 
183		rewindSpeed : 200,
184		items:1,
185		autoPlay : false, 
186		touchDrag:false,
187		singleItem:true,
188		transitionStyle: 'fade',
189		navigationText:['<i class="ti ti-angle-left"></i>','<i class="ti ti-angle-right"></i>']
190	});
191
192    /*OWL Team*/
193	$(".wed_team_slider").owlCarousel({
194 		navigation : true, 
195 		responsive: true, 
196 		responsiveRefreshRate : 600, 
197 		responsiveBaseElement:window, 
198 		slideSpeed : 1500, 
199 		addClassActive:true,
200		paginationSpeed : 700, 
201		rewindSpeed : 3000,
202		items:3,
203		itemsTablet:[1000,2],
204		itemsMobile : [569,1],
205		itemsDesktop:3,
206		autoPlay : true, 
207		touchDrag:false, 
208		navigationText:['<i class="ti ti-angle-left"></i>','<i class="ti ti-angle-right"></i>']
209	});
210
211	/* OWL Team Single*/
212	$(".wed_team_slider_single").owlCarousel({
213 		navigation : true, 
214 		responsive: true, 
215 		responsiveRefreshRate : 200, 
216 		responsiveBaseElement:window, 
217 		slideSpeed : 200, 
218 		addClassActive:true,
219		paginationSpeed : 200, 
220		rewindSpeed : 200,
221		items:1,
222		autoPlay : true, 
223		singleItem:true,
224		autoHeight : true,
225		touchDrag:false, 
226		navigationText:['<i class="ti ti-angle-left"></i>','<i class="ti ti-angle-right"></i>']
227	});
228
229	/*OWL Carousel in Shop Item*/
230	
231		$(".wed_shop_item_slider").owlCarousel({
232	 		navigation : true, 
233	 		responsive: true, 
234	 		responsiveRefreshRate : 200, 
235	 		responsiveBaseElement:window, 
236	 		slideSpeed : 200, 
237	 		addClassActive:true,
238			paginationSpeed : 200, 
239			rewindSpeed : 200, 
240			singleItem:true, 
241			autoPlay : false, 	
242			touchDrag:false, 
243			navigationText:['<i class="ti ti-angle-left"></i>','<i class="ti ti-angle-right"></i>']
244		});
245
246	/*OWL Slide Gallery*/
247	
248    /*OWL Slide Gallery*/
249	$(".wed_slide_gallery").owlCarousel({
250 		navigation : true, 
251 		responsive: true, 
252 		responsiveRefreshRate : 600, 
253 		responsiveBaseElement:window, 
254 		slideSpeed : 1500, 
255 		addClassActive:true,
256		paginationSpeed : 700, 
257		rewindSpeed : 3000,
258		items:3,
259		itemsTablet:[1000,2],
260		itemsMobile : [569,1],
261		itemsDesktop:3,
262		autoPlay : true, 
263		touchDrag:false, 
264		navigationText:['<i class="ti ti-angle-left"></i>','<i class="ti ti-angle-right"></i>']
265	});
266
267
268    // Twitter Feed
269       $('.tweets-feed').each(function(index) {
270           jQuery(this).attr('id', 'tweets-' + index);
271       }).each(function(index) {
272           
273           var TweetConfig = {
274               "id": jQuery('#tweets-' + index).attr('data-widget-id'),
275               "domId": '',
276               "maxTweets": 1,
277               "enableLinks": true,
278               "showUser": true,
279               "showTime": true,
280               "dateFunction": '',
281               "showRetweet": false,
282               "customCallback": handleTweets
283           };
284           function handleTweets(tweets) {
285               var x = tweets.length;
286               var n = 0;
287               var element = document.getElementById('tweets-' + index);
288               var html = '<ul class="slides">';
289               while (n < x) {
290                   html += '<li>' + tweets[n] + '</li>';
291                   n++;
292               }
293               html += '</ul>';
294               element.innerHTML = html;
295               return html;
296           }
297           twitterFetcher.fetch(TweetConfig);
298       });
299
300	
301
302	/* Section Background */
303	$('.wed_image_bck').each(function(){
304		var image = $(this).attr('data-image');
305		var gradient = $(this).attr('data-gradient');
306		var color = $(this).attr('data-color');
307		var blend = $(this).attr('data-blend');
308		var opacity = $(this).attr('data-opacity');
309		var position = $(this).attr('data-position');
310		var height = $(this).attr('data-height');
311		if (image){
312			$(this).css('background-image', 'url('+image+')');	
313		}
314		if (gradient){
315			$(this).css('background-image', gradient);	
316		}
317		if (color){
318			$(this).css('background-color', color);	
319		}
320		if (blend){
321			$(this).css('background-blend-mode', blend);	
322		}
323		if (position){
324			$(this).css('background-position', position);	
325		}
326		if (opacity){
327			$(this).css('opacity', opacity);	
328		}
329		if (height){
330			$(this).css('height', height);	
331		}
332
333	});
334
335
336	/* Over */
337	$('.wed_over, .wed_head_bck').each(function(){
338		var color = $(this).attr('data-color');
339		var image = $(this).attr('data-image');
340		var opacity = $(this).attr('data-opacity');
341		var blend = $(this).attr('data-blend');
342		if (color){
343			$(this).css('background-color', color);	
344		}
345		if (image){
346			$(this).css('background-image', 'url('+image+')');	
347		}
348		if (opacity){
349			$(this).css('opacity', opacity);	
350		}
351		if (blend){
352			$(this).css('mix-blend-mode', blend);	
353		}
354	});
355
356	/* Map */
357	$('.wed_map_over').on("click", function(e){
358		$(this).parents('.wed_section_outter, .wed_inside_map').toggleClass('active_map');
359	});
360
361	/* Mobile Menu */
362	$('.wed_top_menu_mobile_link').on("click", function(e){
363		$(this).next('.wed_top_menu_cont').fadeToggle();
364		$(this).parents('.wed_light_nav').toggleClass('active');
365	});
366 	$('.wed_header_search').on({
367		mouseenter:function(){
368			$(this).find('.wed_header_search_cont, .wed_header_basket_cont').stop().fadeToggle();
369		},mouseleave:function(){
370			$(this).find('.wed_header_search_cont, .wed_header_basket_cont').stop().fadeToggle();
371		}
372	});
373	// Open Close Music
374    $('.wed_music_content').on('click',function(e){
375        e.preventDefault();
376        $(this).next('.wed_iframe').toggleClass('active');
377    });
378
379
380	/*Scroll Effect*/
381
382	$('.wed_go, .wed_top_menu_cont a').on("click", function(e){
383		var anchor = $(this);
384		$('html, body').stop().animate({
385			scrollTop: $(anchor.attr('href')).offset().top
386		}, 2300);
387		e.preventDefault();
388	});
389
390
391
392	/*Animation Block Delay*/
393	
394	$('div[data-animation=animation_blocks]').each(function(){
395	var i = 0;	
396		$(this).find('.wed_icon_box, .skill-bar-content,  .wed_bd, .wed_story_txt, .wed_portfolio_item_cont').each(function(){
397			$(this).css('transition-delay','0.'+i+'s');
398			i++;
399		})
400	})
401
402	/*Increase-Decrease*/
403    $('.increase-qty').on("click", function(e){
404    	var qtya = $(this).parents('.add-to-cart').find('.qty').val();
405    	var qtyb = qtya * 1 + 1;
406    	$(this).parents('.add-to-cart').find('#qty').val(qtyb);
407		e.preventDefault();
408	});
409	$('.decrease-qty').on("click", function(e){
410    	var qtya = $(this).parents('.add-to-cart').find('#qty').val();
411    	var qtyb = qtya * 1 - 1;
412    	if (qtyb < 1) {
413            qtyb = 1;
414        }
415    	$(this).parents('.add-to-cart').find('#qty').val(qtyb);
416		e.preventDefault();
417	});
418
419	/* Shortcode Nav */
420	var top_offset = $('header').height() - 1; 
421
422	$('#nav-sidebar, .wed_top_menu_cont').onePageNav({
423		currentClass: 'current',
424		changeHash: false,
425		scrollSpeed: 700,
426		scrollOffset: top_offset,
427		scrollThreshold: 0.5,
428		filter: '',
429		easing: 'swing',
430	});
431	
432	
433
434	/* Bootstrap */
435	$('[data-toggle="tooltip"]').tooltip();
436	$('[data-toggle="popover"]').popover();
437
438	/* Anchor Scroll */
439	$(window).scroll(function(){
440		if ($(window).scrollTop() > 100) {
441			$(".wed_logo").addClass('active');
442			$('body').addClass('wed_first_step');
443			
444		}
445		else {
446			$('body').removeClass('wed_first_step');
447			$(".wed_logo").removeClass('active');
448		}
449		if ($(window).scrollTop() > 500) {
450			$('body').addClass('wed_second_step');
451		}
452		else {
453			$('body').removeClass('wed_second_step');
454		}
455		if ($(window).scrollTop() > 800) {
456			$('body').addClass('wed_third_step');
457		}
458		else {
459			$('body').removeClass('wed_third_step');
460		}
461	});
462
463	/* Fixed for Parallax */
464	$(".wed_fixed").css("background-attachment","fixed");
465
466
467	/* Submenu */
468 	$('.wed_parent').on({
469		mouseenter:function(){
470			$(this).find('ul').stop().fadeIn(300);
471		},mouseleave:function(){
472			$(this).find('ul').stop().fadeOut(300);
473		}
474	});
475
476 	/* Mobile Menu */
477
478	$('.wed_mobile_menu_content .wed_parent').on("click", function(e){
479		$(this).find('ul').slideToggle(300);
480	});
481	$('.wed_mobile_menu').on("click", function(e){
482		$(this).toggleClass('active');
483		$('.wed_mobile_menu_hor').toggleClass('active');
484	});
485	$('.wed_header_search span').on("click", function(e){
486		$(this).next('.wed_header_search_cont').fadeToggle();
487	});
488
489	/* Block Autheight */
490	if( !device.tablet() && !device.mobile() ) {
491		$('.wed_auto_height').each(function(){
492			setEqualHeight($(this).find('div[class^="col"]'));
493		});
494	}
495	if( device.tablet() && device.landscape() ) {
496		$('.wed_auto_height').each(function(){
497			setEqualHeight($(this).find('div[class^="col"]'));
498		});
499	}
500
501	$(window).resize(function() {
502		if( !device.tablet() && !device.mobile() ) {
503			$('.wed_auto_height').each(function(){
504				setEqualHeight($(this).find('div[class^="col"]'));
505			});
506		}
507		if( device.tablet() && device.landscape() ) {
508			$('.wed_auto_height').each(function(){
509				setEqualHeight($(this).find('div[class^="col"]'));
510			});
511		}
512	});
513
514	/*Boxes AutoHeight*/
515	function setEqualHeight(columns)
516	{
517		var tallestcolumn = 0;
518		columns.each(
519			function()
520			{
521				$(this).css('height','auto');
522				var currentHeight = $(this).height();
523				if(currentHeight > tallestcolumn)
524					{
525					tallestcolumn = currentHeight;
526					}
527			}
528		);
529	columns.height(tallestcolumn);
530	}
531
532	$(window).on('load', function(){
533
534    // Page loader
535    $("body").imagesLoaded(function(){
536        $(".wed_page_loader div").fadeOut();
537        $(".wed_page_loader").delay(200).fadeOut("slow");
538    });
539
540	/*SkroolR*/
541// 	if( !device.tablet() && !device.mobile() ) {
542// 		var s = skrollr.init({
543// 			forceHeight: false,
544// 		});
545// 		$(window).stellar({
546// 		 	horizontalScrolling: false,
547// 			responsive: true,
548// 	 	});
549// 	}
550
551	if (!device.tablet() && !device.mobile()) {
552		skrollr.init({
553			forceHeight: false
554		});
555	}
556
557	/*Countdown*/
558	$('.wed_countdown').each(function(){
559		var year = $(this).attr('data-year');
560		var month = $(this).attr('data-month');
561		var day = $(this).attr('data-day');
562		$(this).countdown({until: new Date(year,month-1,day)});
563
564	});
565 	/*Masonry*/
566
567	var $grid = $('.grid').isotope({
568	  itemSelector: '.grid-item',
569	  percentPosition: true,
570	  masonry: {
571	    columnWidth: '.grid-item'
572	  }	  
573	});
574	$grid.imagesLoaded().progress( function() {
575	  $grid.isotope('layout');
576	});
577	$(window).resize(function(){
578	  $grid.isotope('layout');
579	});
580
581
582
583	$('.masonry').masonry({
584		itemSelector: '.masonry-item',
585	});
586
587	$('.filter-button-group').on( 'click', 'a', function() {
588	  $(this).parents('.filter-button-group').find('a').removeClass('active');
589	  $(this).addClass('active');
590	  var filterValue = $(this).attr('data-filter');
591	  $grid.isotope({ filter: filterValue });
592	});
593	
594	
595});
596
597	
598})(jQuery);
599
600
601

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.