PageSourceSearch

https://www.ncpamumbai.com/wp-content/themes/ncpa/assets/js/common.js?ver=20260924001107

js ncpamumbai.com collected 2026-09-24 19:45:34 UTC 78,502 bytes, 2,802 lines download raw bytes

1$(window).bind("pageshow", function (event) {
2	if (event.originalEvent.persisted) {
3		window.location.reload();
4	}
5
6});
7
8jQuery(document).ready(function ($) {
9
10	jQuery('#welcome-form').click(function(){
11		jQuery("a[href='#Registration']").click();		
12	});
13
14
15	var autoplay = 10000;
16	var id;
17	var flag = false;
18	var top_navbar = $(".navbar-top").outerHeight();
19	var hash = window.location.hash;
20
21	var host = window.location.host;
22	var siteurl = host;
23	var modalHtml = $("#seatLayoutModal").find(".modal-body").html(); // this is varibale, in which we will save modal html before open
24	
25	if (host == "localhost") {
26		siteurl = host + "/ncpa/";
27	} else if (host == "ncpa.noesis.tech") {
28		siteurl = "https://" + host + "/";
29	} else {
30		siteurl = "https://" + host + "/";
31	}
32	
33	if (sessionStorage.getItem("currentURL")) {
34		url = sessionStorage.getItem("currentURL");
35		sessionStorage.removeItem("currentURL");
36		window.location.href = url;
37	}
38	//display none prev button if events are less than 3
39	if ($(".genre-cat-article-multi-arts")[0]){
40		if($(".swiper-wrapper .swiper-slide").length < 3){
41			$(".genre-cat-article-multi-arts .swiper-button-next").css("display", "none");
42		}
43	}
44	// Showing file name on file uploading.
45	jQuery('input[type="file"]').change(function (e) {
46		var $this = jQuery(this);
47		var file = e.target.files[0].name;
48		$this.closest(".ginput_container_fileupload").find(".pfilename").html("");
49		if ($this.closest(".ginput_container_fileupload").find(".pfilename").length > 0) {
50			$this.closest(".ginput_container_fileupload").find(".pfilename").text(file);
51		}
52		else {
53			$this.closest(".ginput_container_fileupload").append("<p class='pfilename'>" + file + "</p>");
54		}
55	});
56
57	/* $('#input_11_94').change(function(e) { 
58		var file = e.target.files[0].name; 
59		$(".pfilename_11_94").html("");
60		$( "<p class='pfilename_11_94'>"+file+"</p>" ).insertAfter( "#live_validation_message_11_94" );
61	}); 
62	
63	
64	$('#input_11_14').change(function(e) { 
65		var file = e.target.files[0].name; 
66		$(".pfilename_11_14").html("");
67		$( "<p class='pfilename_11_14'>"+file+"</p>" ).insertAfter( "#live_validation_message_11_14" );
68	}); 
69	
70	$('#input_11_15').change(function(e) { 
71		var file = e.target.files[0].name; 
72		$(".pfilename_11_15").html("");
73		$( "<p class='pfilename_11_15'>"+file+"</p>" ).insertAfter( "#live_validation_message_11_15" );
74	}); 
75	
76	$('#input_11_16').change(function(e) { 
77		var file = e.target.files[0].name; 
78		$(".pfilename_11_16").html("");
79		$( "<p class='pfilename_11_16'>"+file+"</p>" ).insertAfter( "#live_validation_message_11_16" );
80	}); 
81	
82	$('#input_11_17').change(function(e) { 
83		var file = e.target.files[0].name; 
84		$(".pfilename_11_17").html("");
85		$( "<p class='pfilename_11_17'>"+file+"</p>" ).insertAfter( "#live_validation_message_11_17" );
86	});  */
87
88	/*
89	if(window.location.href == "https://ncpa.noesis.tech/"){
90		
91		
92		if($("#introModal").length > 0){
93			$("#introModal").modal();
94		}
95	}
96	
97	
98	if(window.location.href == "https://stagingncpa.noesis.tech/" || window.location.href == "https://www2.ncpamumbai.com/" || window.location.href == "https://www.ncpamumbai.com/"){
99		
100		
101		if($("#introModal").length > 0){
102			$("#introModal").modal();
103		}
104	}
105	*/
106
107	/*$('#introModal').on('hidden.bs.modal', function () {
108			  //hopscoth tour
109	
110	  *var tour = {
111		id: "hello-hopscotch",
112		steps: [
113		  {
114			target: "logo-cls",
115			title: "Welcome to NCPA!",
116			content: "NCPA completes 50 years",
117			placement: "bottom",
118			arrowOffset: 60
119		  },
120		  {
121			target: document.querySelector("#primary-menu > li:first-child a"),
122			title: "About NCPA!",
123			content: "Hey there! This is an example Hopscotch tour. There will be plenty of time to read documentation and sample code, but let's just take some time to see how Hopscotch actually works.",
124			placement: "bottom",
125			arrowOffset: 10
126		  },
127		  {
128			target: document.querySelector("#primary-menu > li:nth-child(2) a"),
129			title: "Genre Events!",
130			content: "Hey there! This is an example Hopscotch tour. There will be plenty of time to read documentation and sample code, but let's just take some time to see how Hopscotch actually works.",
131			placement: "bottom",
132			arrowOffset: 10
133		  },
134		],
135		showPrevButton: true,
136		scrollTopMargin: 100
137	  };
138	 
139		hopscotch.startTour(tour);
140	
141	});  */
142
143	//$('.book-now-btn').attr("href","https://www.youtube.com/playlist?list=PLINe1lIYrgRgm9aqzCNzPy4ZsvGFIkvgt");
144	/*$('.book-now-btn').text("Watch Live");
145	$('.free-event').text("Watch Live");
146	$('.book-now-btn').on('click',function(){
147		$("#watchvideoModal").modal();	
148	});
149	$('.free-event').on('click',function(){
150		$("#watchvideoModal").modal();	
151	});*/
152	//check user logged in and has mobile number
153	if ($('body').hasClass('logged-in') == false) {
154		check_user_mobile();
155	}
156
157	$(".calender-icon").parent("a").attr("href", siteurl + "event-calendar");
158	$(".subscribe_form").hide();
159	$(".close_newsletter_form").hide();
160	/* show subscribe to newsletter from */
161	$(".subscribe_newsletter").on('click', function (e) {
162		e.preventDefault();
163		$(".subscribe_form").show(1000);
164		$(".subscribe_newsletter").hide();
165		$(".close_newsletter_form").show();
166		if (typeof (ga) != 'undefined') {
167			ga('send', {
168				hitType: 'event',
169				eventCategory: 'Newsletter',
170				eventAction: 'click',
171				eventLabel: 'Subscribe To Newsletter'
172			});
173		}
174	});
175	$("#terms_bms").parents(".form-group").hide();
176	$("#bms_login_div").find("#terms_bms").parents(".form-group").show();
177	$("#bms_reg_div").find("#terms_bms").parents(".form-group").show();
178
179	$('#bms_login_div').find('form[name="login"]').on("submit", function () {
180		/*
181		   if($('input[id="terms_bms"]:checked').length <= 0 ){
182				toastr.warning("Please agree to terms and conditions!");
183				return false;	   
184		   }
185		*/
186		//sessionStorage.setItem("currentURL", window.location);
187
188	});
189	$("#bms_reg_div").find('.cta-social').on('click', function () {
190		/*
191			 if($('input[id="terms_bms"]:checked').length <= 0 ){
192				toastr.warning("Please agree to terms and conditions!");
193				return false;	   
194		   }
195		*/
196		event_code = '';
197		if ($("#event_code_val").length > 0) {
198			event_code = '?l=' + $("#event_code_val").val();
199		}
200		url = window.location + event_code;
201		sessionStorage.setItem("currentURL", url);
202	});
203	$("#bms_login_div").find('.cta-social').on('click', function () {
204		/*
205			 if($('input[id="terms_bms"]:checked').length <= 0 ){
206				toastr.warning("Please agree to terms and conditions!");
207				return false;	   
208		   }
209		*/
210		event_code = '';
211		if ($("#event_code_val").length > 0) {
212			event_code = '?l=' + $("#event_code_val").val();
213		}
214		url = window.location + event_code;
215		sessionStorage.setItem("currentURL", url);
216	});
217
218
219	$(".close_newsletter_form").on('click', function (e) {
220		e.preventDefault();
221
222		$("#gform_8").trigger("reset");
223		$(".subscribe_form").find('li.gfield_error div.validation_message').remove(); // remove the validation meesages
224		$(".subscribe_form").find('li.gfield_error').removeClass('gfield_error'); // remove the validation classes.
225		$(".subscribe_form").find(".validation_error").remove();
226		$(".subscribe_form").hide(1000);
227		$(".subscribe_newsletter").show();
228		$(".close_newsletter_form").hide();
229	});
230
231	$(".date-wrapper").on("mouseover", function () {
232		$(this).css("border-color", "red");
233	});
234	$(".date-wrapper").on("mouseout", function () {
235		$(this).css("border-color", "#ffffff");
236	});
237
238	var originalModalHTML = $('#seatLayoutModal').find(".modal-body").html();
239	$('#seatLayoutModal').on('hidden.bs.modal', function () {
240		$("#seatLayoutModal").find(".modal-body").html(originalModalHTML);
241	});
242
243
244	/* reset password */
245	$('.reset_password_form').on('submit', function (e) {
246		e.preventDefault();
247		var $form = $(this);
248		$.post($form.attr('action'), $form.serialize(), function (data) {
249			if (data.error == true) {
250				toastr.warning(data.error_message);
251			} else {
252				toastr.success("Password Updated Successfully");
253				$(".logout-wrapper").find("a").click();
254				window.location.reload();
255			}
256		}, 'json');
257	});
258
259	/* reset password */
260	$('.user_detail_form').on('submit', function (e) {
261		e.preventDefault();
262		var $form = $(this);
263		$.post($form.attr('action'), $form.serialize(), function (data) {
264			if (data.error == true) {
265				toastr.warning(data.error_message);
266			} else {
267				toastr.success("User Details Updated Successfully");
268				//$(".edit_information_wrap").hide();
269				//$(".user_info").show();
270				window.location.reload();
271			}
272		}, 'json');
273	});
274
275
276	/* my account page details section */
277	$(".edit_information_wrap").hide();
278	$(".cancel_user_info").on('click', function (e) {
279		e.preventDefault();
280		$(".user_info").show();
281		$(".edit_information_wrap").hide();
282	});
283
284	$(".edit_user_info").on('click', function (e) {
285		e.preventDefault();
286		$(".user_info").hide();
287		$(".edit_information_wrap").show();
288	});
289
290	/* login and register div toggle */
291	$("#register_link").on('click', function (e) {
292		e.preventDefault();
293		$(".register_div").show();
294		$(".login_div").hide();
295	});
296	$("#login_link").on('click', function (e) {
297		e.preventDefault();
298		$(".register_div").hide();
299		$(".login_div").show();
300	});
301
302
303	/* search result scroll to latest div */
304	var urlParams = new URLSearchParams(window.location.search);
305	if (urlParams.has('l')) {
306		get_bms_seat_layout(urlParams.get('l'));
307	}
308	if (urlParams.has('w')) {
309		$(".watch-live-btn").trigger('click');
310	}
311
312	if (urlParams.has('ec')) {
313		toastr.success("Event is added to google calendar");
314	}
315
316
317	if (urlParams.has('m_flg')) {
318
319		$(".membership-tab-wrap ul.nav li:nth-child(3)").addClass('active_tab');
320		$(".membership-tab-wrap ul.nav li:nth-child(1)").removeClass('active_tab');
321		// $(".membership-tab-wrap ul.nav li:nth-child(3) a").trigger('click');
322		if ($('body').hasClass('logged-in') == false) {
323			$("#loginModal").find('[name="redirect_to"]').val(siteurl + "support-us-membership" + "?m_flg=1");
324			$("#loginModal").modal();
325			return false;
326		}
327	}
328
329	offset = urlParams.has('offset');
330	offset_val = urlParams.get('offset');
331	if (offset) {
332		var pos = $(".search-result .col-sm-6:eq(" + (offset_val * 10 - 9) + ")").offset().top;
333		$('body, html').scrollTop(pos - 200);
334	}
335
336	$('ul.nav.nav-pills a[href="' + hash + '"]').tab('show');
337
338	$(".member-bott-btn a").click(function () {
339		var url_hash = $(this).attr('href').replace(/^.*?(#|$)/, ''); //get url
340		$('ul.nav.nav-pills a[href="#' + url_hash + '"]').click();
341
342		// 	  	jQuery(window).scrollTop(-80);
343	});
344
345
346	/*
347	var elem = document.getElementById("progress"); 
348	var width = 1;
349	var autoplayTime = autoplay / 100;
350	var id;
351	
352	function frame() {
353		if (width >= 100) {
354			clearInterval(id);
355		} else {
356			width++; 
357			//console.log(width);
358			elem.style.width = width + '%'; 
359		}
360	 }
361	*/
362
363	/*
364	function move() {
365		var elem = document.getElementById("progress"); 
366		var width = 1;
367		var autoplayTime = autoplay / 100;
368		var id = setInterval(frame, autoplayTime);
369		function frame() {
370			if (width >= 100) {
371				clearInterval(id);
372			} else {
373				width++; 
374				elem.style.width = width + '%'; 
375			}
376		}
377	}
378	*/
379
380	function customProgressBar(current, total) {
381		var ratio = current / total;
382
383		var progressBarStyle = 'style=\'transform: translate3d(0px, 0px, 0px) scaleX(' + ratio + ') scaleY(1); transition-duration: 300ms;\'';
384		var progressBar = '<span class=\'swiper-pagination-progressbar-fill\' ' + progressBarStyle + '></span>';
385
386		var progressBarContainer = '<div class=\'swiper-pagination-progressbar\' style=\'height: 2px; top: 6px; width: 100%;\'>';
387		progressBarContainer += progressBar;
388		progressBarContainer += '</span></div>';
389
390		return progressBarContainer;
391	}
392
393	function show_load_image() {
394		$("#loading_image").html('<img src="' + siteurl + 'wp-content/themes/ncpa/assets/images/ajax_loader_red.gif" width="30" />');
395	}
396
397	let options = {};
398	///console.log($(".banner .swiper-container .swiper-slide").length);
399
400	/*
401	if ( $(".banner .swiper-container .swiper-slide").length == 1 ) {
402		options = {
403			loop: false,
404			autoplay: 10000,
405			afterAction: function(current) {
406			//current.find('video').get(0).play();
407			}
408		}
409	    
410	} else {
411		options = {
412		    
413			// loop: true,
414			navigation: {
415			nextEl: '.swiper-button-next',
416			prevEl: '.swiper-button-prev',
417			},
418		   autoplay: {
419			delay: 10000,
420			  },
421			  
422		}
423	}
424	*/
425	
426	
427	if ( $(".banner .swiper-container .swiper-slide").length == 1 ) {
428		options = {
429			loop: false,
430			navigation: {
431				nextEl: '.banner .swiper-button-next',
432				prevEl: '.banner .swiper-button-prev',
433			}
434
435		}
436	    
437	} else {
438		options = {
439		  loop: true,
440		navigation: {
441			nextEl: '.banner .swiper-button-next',
442			prevEl: '.banner .swiper-button-prev',
443		},
444		autoplay: {
445			delay: 8000,
446		},
447
448		on: {
449			init: function () {
450			//	console.log(this.slides.length );
451				if (this.slides.length <= 1) {
452					console.log("inside 1");
453				}
454				var $this = this;
455				var currentnxt = this.slides[this.activeIndex];
456				// $('.swiper-slide.swiper-slide-active').find('video').prop("muted",false);
457
458				setTimeout(function () {
459					var slidervideoFlag = $(currentnxt).find("iframe").length == 1;
460					if (slidervideoFlag) {
461						swiper_1.autoplay.stop();
462						//console.log("start in");
463					}
464
465					$(currentnxt).find("iframe").on('ended', function () {
466						//console.log('Video has ended!');
467						$this.autoplay.start();
468						setTimeout(function () {
469							$this.slideNext();
470							//console.log("ended");
471						}, 2000);
472
473					});
474
475
476				}, 2000);
477
478				//var currentVideo =  $("[data-swiper-slide-index=" + this.realIndex + "]").find("video");
479				//currentVideo.trigger('play');
480			},
481
482
483		}  
484			
485			  
486		}
487	}
488	
489	var sliderVideos = $(".banner .swiper-slide video");
490	var swiper_1 = new Swiper('.banner .swiper-container', options);
491	/*
492var swiper_1 = new Swiper('.banner .swiper-container', {
493		loop: true,
494		navigation: {
495			nextEl: '.banner .swiper-button-next',
496			prevEl: '.banner .swiper-button-prev',
497		},
498		autoplay: {
499			delay: 8000,
500		},
501
502		on: {
503			init: function () {
504				console.log(this.slides.length );
505				if (this.slides.length <= 1) {
506					console.log("inside 1");
507				}
508				var $this = this;
509				var currentnxt = this.slides[this.activeIndex];
510				// $('.swiper-slide.swiper-slide-active').find('video').prop("muted",false);
511
512				setTimeout(function () {
513					var slidervideoFlag = $(currentnxt).find("video").length == 1;
514					if (slidervideoFlag) {
515						swiper_1.autoplay.stop();
516						//console.log("start in");
517					}
518
519					$(currentnxt).find("video").on('ended', function () {
520						//console.log('Video has ended!');
521						$this.autoplay.start();
522						setTimeout(function () {
523							$this.slideNext();
524							//console.log("ended");
525						}, 2000);
526
527					});
528
529
530				}, 2000);
531
532				//var currentVideo =  $("[data-swiper-slide-index=" + this.realIndex + "]").find("video");
533				//currentVideo.trigger('play');
534			},
535
536
537		}
538	});
539*/
540
541	if (sliderVideos.length != 0) {
542		swiper_1.on('slideChange', function () {
543			var $this = this;
544			setTimeout(function () {
545				//console.log(swiper_1.autoplay.running,"running before");
546				if (!swiper_1.autoplay.running) {
547					swiper_1.autoplay.start();
548				}
549				//console.log(swiper_1.autoplay.running,"running after");
550				var currentnxt = $this.slides[$this.activeIndex];
551
552				//console.log('slide changed',$('.swiper-slide-active').find("video").length);
553				var sliderVideos = $(".banner .swiper-slide video");
554				var slidervideoFlag = $(currentnxt).find("video").length == 1;
555				//console.log(slidervideoFlag,"slidervideoFlag");
556
557				setTimeout(function () {
558					sliderVideos.each(function (index) {
559						$this.currentTime = 0;
560					});
561				}, 100);
562
563				var prevVideo = $("[data-swiper-slide-index=" + $this.previousIndex + "]").find("video");
564				// 		if we want slider to be in loop
565				// 		var currentVideo =  $("[data-swiper-slide-index=" + $this.realIndex + "]").find("video");
566				var currentVideo = $("[data-swiper-slide-index=" + $this.activeIndex + "]").find("video");
567
568				var v = document.getElementsByTagName("video")[0];
569				//setTimeout(function(){
570				if (slidervideoFlag) {
571					swiper_1.autoplay.stop();
572					//console.log("start in");
573				}
574
575				if (slidervideoFlag) {
576					$(currentnxt).find("video").on('ended', function () {
577						//console.log('Video has ended!');
578						swiper_1.autoplay.start();
579						setTimeout(function () {
580							swiper_1.slideNext();
581							//console.log("ended");
582						}, 2000);
583
584					});
585				}
586
587				/*
588						v.addEventListener("ended", function () {
589							swiper_1.autoplay.start();
590							swiper_1.slideNext();
591							console.log("ended");
592						}, true);
593				*/
594
595				setTimeout(function () {
596					// console.log($this.previousIndex);
597					$('.swiper-slide').find('video').each(function () {
598						this.pause();
599						$(this).prop("muted", true);
600					});
601
602					//$(".swiper-slide[data-swiper-slide-index=" + ($this.previousIndex-1) + "] video").get(0).pause();
603					//currentVideo.trigger('play');
604				}, 100);
605				setTimeout(function () {
606					// console.log($('.swiper-slide.swiper-slide-active').find('video').length);
607					if ($('.swiper-slide.swiper-slide-active').find('video').length != 0) {
608						$('.swiper-slide.swiper-slide-active').find('video').get(0).play();
609						//$('.swiper-slide.swiper-slide-active').find('video').prop("muted",false);
610
611					}
612					//currentVideo.trigger('play');
613					//console.log("inplay");
614				}, 1000);
615			});
616		}, 2000);
617	}
618
619
620	/*
621	swiper_1.on('slideChange', function () {
622	  console.log("Slide Changed");	
623	  jQuery('.banner .swiper-container video').get(0).play();
624	});
625	*/
626
627	/*
628	var swiper_1 = new Swiper('.banner .swiper-container', {
629			loop:$('banner .swiper-container .swiper-slide').length < 1 ? true : false,
630		  pagination: {
631			el: '.swiper-pagination',
632			type: 'custom',
633			renderCustom: function (swiper, current, total) {
634				 return customProgressBar(current, total);
635			}
636		 },
637		  watchSlidesProgress: true,  
638		  autoplay: {
639			delay: autoplay,
640			  },
641					    
642		  on: {
643			  progress : function(){
644				  
645				   var elem = document.getElementById("progress"); 
646				   var width = 1;
647				   var autoplayTime = autoplay / 100;
648				   function frame() {
649						if (width >= 100) {
650							clearInterval(id);
651							width = 1;
652						} else {
653							width++; 
654							elem.style.width = width + '%'; 
655						}
656					}
657				    
658			  },
659			  init: function () {
660				var totalSlider = this.slides.length
661				if(totalSlider<10){
662					totalSlider = "0"+totalSlider;
663				}
664				  $(".slider-total-page").html(totalSlider);
665			  },
666			  slideChange: function () {
667				this.update();
668				flag = true;
669				var currentIndex = this.activeIndex+1;
670				
671				if(currentIndex < 10){
672					currentIndex = "0"+currentIndex;
673				}
674				
675				 $(".slider-current-page").html(currentIndex);
676			  }
677			},
678		  navigation: {
679			nextEl: '.swiper-button-next',
680			prevEl: '.swiper-button-prev',
681		  },
682		});
683	*/
684
685
686
687
688	var swiper_home_news = new Swiper('.home-news-section .swiper-container', {
689		slidesPerView: 3,
690		spaceBetween: 30,
691		centeredSlides: false,
692		navigation: {
693			nextEl: '.home-news-section .swiper-button-next',
694			prevEl: '.home-news-section .swiper-button-prev',
695		},
696		breakpoints: {
697			// when window width is <= 320px
698			320: {
699				slidesPerView: 1,
700				spaceBetween: 10
701			},
702			// when window width is <= 480px
703			480: {
704				slidesPerView: 1,
705				spaceBetween: 20
706			},
707			// when window width is <= 640px
708			640: {
709				slidesPerView: 1,
710				spaceBetween: 30
711			},
712			768: {
713				slidesPerView: 2,
714				spaceBetween: 30
715			},
716
717			1024: {
718				slidesPerView: 3,
719				spaceBetween: 30
720			},
721
722		},
723
724		on: {
725			slideChange: function () {
726				var activeIndex = this.activeIndex;
727				$('.swiper-slide').removeClass('swiper-prev-visible swiper-next-visible');
728				this.slides.eq(activeIndex).prev().addClass('swiper-prev-visible');
729				this.slides.eq(activeIndex).next().addClass('swiper-next-visible');
730				//var realIndex = this.slides.eq(activeIndex).attr('data-swiper-slide-index');
731				console.log(this.activeIndex);
732				if (this.activeIndex == this.slides.length - 1) {
733					console.log("end");
734				}
735				/*
736						 $('.swiper-slide').removeClass('swiper-slide-nth-prev-2 swiper-slide-nth-next-2');
737						 $('.swiper-slide[data-swiper-slide-index="'+activeIndex+'"]').prev().prev().addClass('swiper-slide-nth-prev-2');
738						 $('.swiper-slide[data-swiper-slide-index="'+activeIndex+'"]').next().addClass('swiper-slide-nth-next-2');
739				*/
740			},
741		}
742	});
743
744
745
746	var genre_fest_upcoming_slider = new Swiper('.genre-wrapper .swiper-container', {
747		//slidesPerView: 4,
748		spaceBetween: 20,
749		//loop: true,
750		//        centeredSlides: true,
751		slidesPerView: 'auto',
752		//loopedSlides: 4,
753
754		navigation: {
755			nextEl: '.genre-wrapper .swiper-button-next',
756			prevEl: '.genre-wrapper .swiper-button-prev',
757		},
758	});
759
760
761
762	var swiper_3 = new Swiper('.up_event_wrap_slider .swiper-container', {
763		//slidesPerView: 4,
764		spaceBetween: 20,
765		//loop: true,
766		//        centeredSlides: true,
767		slidesPerView: 'auto',
768		//loopedSlides: 4,
769
770		navigation: {
771			nextEl: '.up_event_wrap_slider .swiper-button-next',
772			prevEl: '.up_event_wrap_slider .swiper-button-prev',
773		},
774	});
775
776
777	var single_related_swiper_slider = new Swiper('.single_related_swiper_slider .swiper-container', {
778		//slidesPerView: 4,
779		spaceBetween: 20,
780		//loop: true,
781		//        centeredSlides: true,
782		slidesPerView: 'auto',
783		//loopedSlides: 4,
784
785		navigation: {
786			nextEl: '.single_related_swiper_slider .swiper-button-next',
787			prevEl: '.single_related_swiper_slider .swiper-button-prev',
788		},
789	});
790
791
792
793
794	var genre_tax_upcoming_slider = new Swiper('.genre-tax-upcoming-slider .swiper-container', {
795		//slidesPerView: 4,
796		spaceBetween: 20,
797		//loop: true,
798		//        centeredSlides: true,
799		slidesPerView: 'auto',
800		//loopedSlides: 4,
801
802		navigation: {
803			nextEl: '.genre-tax-upcoming-slider .swiper-button-next',
804			prevEl: '.genre-tax-upcoming-slider .swiper-button-prev',
805		},
806	});
807
808
809	var swiper_home_sub_up_event_slider = new Swiper('.home_sub_up_event_slider .swiper-container', {
810		//slidesPerView: 4,
811		spaceBetween: 20,
812		//loop: true,
813		//        centeredSlides: true,
814		slidesPerView: 'auto',
815		//loopedSlides: 4,
816
817		navigation: {
818			nextEl: '.home_sub_up_event_slider .swiper-button-next',
819			prevEl: '.home_sub_up_event_slider  .swiper-button-prev',
820		},
821	});
822
823
824
825
826	$('.silck-slider-container').slick({
827		slidesToShow: 3,
828		autoplay: true,
829		arrows: true,
830		centerPadding: '20px',
831		touchMove: false,
832		slidesToScroll: 1,
833		dots: false,
834		centerMode: true,
835		focusOnSelect: true
836	});
837
838
839	///media-archive event year and genre select
840	$('.list-style-none .eventYear').on('click', function () {
841		var filteryear = document.querySelector('input[name = "filter-year"]:checked').value;
842
843		//$("#eventYearView").html(filteryear);
844		$("#EventYearType").val(filteryear);
845		console.log(filteryear);
846
847	});
848	var genreData = new Array();
849
850	$('.chackBoxRow').on('click', function () {
851
852		var genre = $('input[name="eventGenre"]:checked').map(function () {
853			return this.value;
854		}).get();
855		var genreData = genre.join(",");
856		$("#EventGenreType").val(genreData);
857
858		var year = $('input[name="filter-year"]:checked').map(function () {
859			return this.value;
860		}).get();
861		var yearData = year.join(",");
862		$("#EventYearType").val(yearData);
863	});
864
865
866
867
868	$("#applyEvent").on("click", function (event) {
869		event.preventDefault();
870		$(".dropdown-seelct").removeClass("active");
871
872		var year = $("#EventYearType").val();
873		var genre = $("#EventGenreType").val();
874		//alert("dsdads");		
875		$('.archive-evenet-list .load_more').attr('data-number', '1');
876
877		//if(year || genre){
878		$.ajax({
879			type: "GET",
880			url: siteurl + "wp-json/mediaEvent/v1/post",
881			data: { year: year, genre: genre },
882			dataType: "html",
883			cache: false,
884			beforeSend: function (html) {
885				show_load_image();
886				$(".archive-evenet-list").hide();
887				$(".archive-evenet-list .col-md-6").remove();
888				$(".archive-evenet-list #total_event_count").remove();
889			},
890			success: function (html) {
891				$('#EventMediahide').prepend(html);
892				$("#loading_image").html("");
893				$(".archive-evenet-list").show();
894				if ($("#total_event_count").val() != '0') {
895					if ($("#total_event_count").val() > 6) {
896						$('.archive-evenet-list .load_more').parent("div").show();
897					} else {
898						$('.archive-evenet-list .load_more').parent("div").hide();
899					}
900					$('.archive-evenet-list .load_more').attr('data-count', $("#total_event_count").val());
901					$('.archive-evenet-list .load_more').attr('filter', '1');
902					$('.archive-evenet-list .no_data').hide();
903				} else {
904					$('.archive-evenet-list .load_more').parent("div").hide();
905					$('.archive-evenet-list .no_data').show();
906				}
907				$("#total_event_count").remove();
908			},
909			error: function (xhr, status, error) {
910				var err = eval("(" + xhr.responseText + ")");
911				alert(err.Message);
912			}
913		});
914		//return false;
915		//}
916	});
917
918	$("#applyMedia").on("click", function (event) {
919		event.preventDefault();
920		$(".dropdown-seelct").removeClass("active");
921		var year = $("#EventYearType").val();
922		var genre = $("#EventGenreType").val();
923		$('.archive-media-list .load_more').attr('data-number', '1');
924		//if(year || genre){
925		$.ajax({
926			type: "GET",
927			url: siteurl + "wp-json/mediaArchive/v1/post",
928			data: { year: year, genre: genre },
929			dataType: "html",
930			cache: false,
931			beforeSend: function (html) {
932				show_load_image();
933				$(".archive-media-list").hide();
934				$(".archive-media-list .col-sm-4").remove();
935				$(".archive-evenet-list #total_media_count").remove();
936			},
937			success: function (html) {
938				$('#Mediahide').prepend(html);
939				$("#loading_image").html("");
940				$(".archive-media-list").show();
941				if ($("#total_media_count").val() != '0') {
942					if ($("#total_media_count").val() > 6) {
943						$('.archive-media-list .load_more').parent("div").show();
944					} else {
945						$('.archive-media-list .load_more').parent("div").hide();
946					}
947					$('.archive-media-list .load_more').attr('data-count', $("#total_media_count").val());
948					$('.archive-media-list .load_more').attr('filter', '1');
949					$('.archive-media-list .no_data').hide();
950				} else {
951					$('.archive-media-list .load_more').parent("div").hide();
952					$('.archive-media-list .no_data').show();
953				}
954				$("#total_media_count").remove();
955			},
956			error: function (xhr, status, error) {
957				var err = eval("(" + xhr.responseText + ")");
958				alert(err.Message);
959			}
960		});
961		//return false;
962		//}
963	});
964
965
966	$("#searchEvent").on("click", function (event) {
967		var search = $("#search").val();
968		var offset = parseInt($(this).attr('data-number'));
969		if (search) {
970			$.ajax({
971				type: "GET",
972				url: siteurl + "wp-json/searchEvent/v1/post",
973				data: { year: year, genre: genre, offset: offset },
974				dataType: "html",
975				cache: false,
976				beforeSend: function (html) {
977					document.getElementById("Viewevent").innerHTML = '';
978					show_load_image();
979					$("#Viewevent").html(html);
980				},
981				success: function (html) {
982					$("#Viewevent").show();
983					$("#Viewevent").html(html);
984					$("#loading_image").hide();
985					$("#EventMediahide").hide();
986					var offsetValue = offset + 4;
987
988				},
989				error: function (jq, status, message) {
990					alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
991				}
992			});
993			return false;
994		}
995	});
996
997
998	$("#applyJob").on("click", function (event) {
999		event.preventDefault();
1000		var job_title = $("#job_title").val();
1001		var job_category = $("#job_category").val();
1002
1003		$('.jobs-list .load_more').attr('data-number', '1');
1004		$.ajax({
1005			type: "GET",
1006			url: siteurl + "wp-json/jobSearch/v1/post",
1007			data: { title: job_title, category: job_category },
1008			dataType: "html",
1009			cache: false,
1010			beforeSend: function (html) {
1011				show_load_image();
1012				$(".jobs-list").hide();
1013				$(".jobs-list .col-sm-6").remove();
1014				$(".jobs-list #total_job_count").remove();
1015			},
1016			success: function (html) {
1017				$('#JobDataDiv').prepend(html);
1018				$("#loading_image").html("");
1019				$(".jobs-list").show();
1020				if ($("#total_job_count").val() != '0') {
1021					if ($("#total_job_count").val() > 6) {
1022						$('.jobs-list .load_more').parent("div").show();
1023					} else {
1024						$('.jobs-list .load_more').parent("div").hide();
1025					}
1026					$('.jobs-list .load_more').attr('data-count', $("#total_job_count").val());
1027					$('.jobs-list .load_more').attr('filter', '1');
1028					$('.jobs-list .no_data').hide();
1029				} else {
1030					$('.jobs-list .load_more').parent("div").hide();
1031					$('.jobs-list .no_data').show();
1032				}
1033				$("#total_job_count").remove();
1034			},
1035			error: function (xhr, status, error) {
1036				var err = eval("(" + xhr.responseText + ")");
1037				alert(err.Message);
1038			}
1039		});
1040		return false;
1041	});
1042
1043	$("#applyKnowledgeSearch").on("click", function (event) {
1044		event.preventDefault();
1045		var genre = $("#genre_select").val();
1046		var year = $("#year_select").val();
1047		var month = $("#month_select").val();
1048		var type = $("#news_type").val();
1049		var cat = "";
1050		if (type != "news") {
1051			cat = $("#news_cat").find("li.active_tab").find("a").attr("data-id");
1052		}
1053		$('.news-list .load_more').attr('data-number', '1');
1054		$.ajax({
1055			type: "GET",
1056			url: siteurl + "wp-json/newsSearch/v1/post",
1057			data: { genre: genre, year: year, month: month, type: type, cat: cat },
1058			dataType: "html",
1059			cache: false,
1060			beforeSend: function (html) {
1061				show_load_image();
1062				$(".news-list").hide();
1063				$(".news-list .col-sm-4").remove();
1064				$(".news-list .section-news-at-ncpa").remove();
1065				$(".news-list #total_news_count").remove();
1066			},
1067			success: function (html) {
1068				$('#NewsDataDiv').prepend(html);
1069				$("#loading_image").html("");
1070				$(".news-list").show();
1071				var divs = $(".news-div");
1072				for (var i = 0; i < divs.length; i += 3) {
1073					divs.slice(i, i + 3).wrapAll('<div class="row home-news-section section-news-at-ncpa"></div>');
1074				}
1075				if ($("#total_news_count").val() != '0') {
1076					if ($("#total_news_count").val() > 6) {
1077						$('.news-list .load_more').parent("div").show();
1078					} else {
1079						$('.news-list .load_more').parent("div").hide();
1080					}
1081					$('.news-list .load_more').attr('data-count', $("#total_news_count").val());
1082					$('.news-list .load_more').attr('filter', '1');
1083					$('.news-list .no_data').hide();
1084				} else {
1085					$('.news-list .load_more').parent("div").hide();
1086					$('.news-list .no_data').show();
1087				}
1088				$("#total_news_count").remove();
1089			},
1090			error: function (xhr, status, error) {
1091				var err = eval("(" + xhr.responseText + ")");
1092				alert(err.Message);
1093			}
1094		});
1095		return false;
1096	});
1097
1098	$("#news_cat a").on("click", function (event) {
1099		event.preventDefault();
1100		var genre = $("#genre_select").val();
1101		var year = $("#year_select").val();
1102		var month = $("#month_select").val();
1103		var type = $("#news_type").val();
1104		var cat = $(this).attr("data-id");
1105		$('.news-list .load_more').attr('data-number', '1');
1106		$.ajax({
1107			type: "GET",
1108			url: siteurl + "wp-json/newsSearch/v1/post",
1109			data: { genre: genre, year: year, month: month, type: type, cat: cat },
1110			dataType: "html",
1111			cache: false,
1112			beforeSend: function (html) {
1113				show_load_image();
1114				$(".news-list").hide();
1115				$(".news-list .col-sm-4").remove();
1116				$(".news-list .section-news-at-ncpa").remove();
1117				$(".news-list #total_news_count").remove();
1118			},
1119			success: function (html) {
1120				$('#NewsDataDiv').prepend(html);
1121				var divs = $(".news-div");
1122				for (var i = 0; i < divs.length; i += 3) {
1123					divs.slice(i, i + 3).wrapAll('<div class="row home-news-section section-news-at-ncpa"></div>');
1124				}
1125				$("#loading_image").html("");
1126				$(".news-list").show();
1127				if ($("#total_news_count").val() != '0') {
1128					if ($("#total_news_count").val() > 6) {
1129						$('.news-list .load_more').parent("div").show();
1130					} else {
1131						$('.news-list .load_more').parent("div").hide();
1132					}
1133					$('.news-list .load_more').attr('data-count', $("#total_news_count").val());
1134					$('.news-list .load_more').attr('filter', '1');
1135					$('.news-list .no_data').hide();
1136				} else {
1137					$('.news-list .load_more').parent("div").hide();
1138					$('.news-list .no_data').show();
1139				}
1140				$("#total_news_count").remove();
1141			},
1142			error: function (xhr, status, error) {
1143				var err = eval("(" + xhr.responseText + ")");
1144				alert(err.Message);
1145			}
1146		});
1147		return false;
1148	});
1149
1150
1151	$('.scroll-links li a').on('click', function () {
1152		var $el = $(this), id = $el.attr('href');
1153		console.log(id);
1154		$('.scroll-links').find('li a').removeClass('active');
1155		$el.addClass("active");
1156		$('html, body').animate({
1157			scrollTop: $(id).offset().top
1158		}, 2000);
1159		$(".mobile-menu-wrapper").hide();
1160		$(".menu-open").removeClass('open');
1161
1162		return false;
1163	});
1164
1165
1166	//$(".mobile-menu-wrapper").hide();
1167	$('.menu-open').click(function () {
1168		$(this).toggleClass('open');
1169		$('.mobile-menu-wrapper').toggleClass("show");
1170		var bd = $('<div class="modal-backdrop menuFade"></div>');
1171		if (!$(this).hasClass("open")) {
1172			$(document.body).find(".menuFade").remove();
1173			$(document.body).removeClass("modal-open");
1174		} else {
1175			bd.appendTo(document.body);
1176			$(document.body).addClass("modal-open");
1177		}
1178		//$("body").append('<div class="modal-backdrop fade show ss"></div>');
1179	});
1180
1181	/*
1182		var c, currentScrollTop,x = 0,navbar = $('#navbar');
1183		$(window).scroll(function() {
1184	
1185	
1186			var a = $(window).scrollTop();
1187		  var b = navbar.height();
1188		  
1189		 
1190		  currentScrollTop = a;
1191		 
1192		  if (c < currentScrollTop && a > b + b) {
1193			navbar.addClass("scrollUp");
1194		  } else if (c > currentScrollTop && !(a <= b)) {
1195			navbar.removeClass("scrollUp");
1196		  }
1197		  c = currentScrollTop;
1198	
1199	
1200	
1201	});
1202	*/
1203
1204	var swiper_4 = new Swiper('.about_bann .swiper-container', {
1205
1206		navigation: {
1207			nextEl: '.swiper-button-next',
1208			prevEl: '.swiper-button-prev',
1209		},
1210	});
1211
1212
1213
1214
1215	var swiper_5 = new Swiper('.related_event_wrap .swiper-container', {
1216		slidesPerView: 4,
1217		spaceBetween: 20,
1218		slidesPerView: 'auto',
1219		loopedSlides: 4,
1220
1221		navigation: {
1222			nextEl: '.swiper-button-next',
1223			prevEl: '.swiper-button-prev',
1224		},
1225	});
1226
1227
1228
1229
1230	if ($(this).width() > 768) {
1231		$(".scroller").mCustomScrollbar({
1232			setHeight: 400,
1233			theme: "my-scroller"
1234		});
1235	} else {
1236		$(".scroller").mCustomScrollbar("destroy");
1237	}
1238
1239	var txt_slider_events = new Swiper('.txt-slider-events .swiper-container', {
1240		/*
1241				effect: 'fade',
1242				fadeEffect: { crossFade: true },
1243		*/
1244		speed: 800,
1245	});
1246
1247	var swiper_slider_events = new Swiper('.genre-upcoming-events .swiper_container_images', {
1248
1249		speed: 800,
1250		spaceBetween: 10,
1251		navigation: {
1252			nextEl: '.upcoming-event-next',
1253			prevEl: '.upcoming-event-prev',
1254		},
1255		effect: 'coverflow',
1256		grabCursor: false,
1257		initialSlide: 1,
1258		centeredSlides: true,
1259		slidesPerView: 2,
1260		coverflowEffect: {
1261			rotate: 0,
1262			stretch: -240,
1263			depth: 350,
1264			modifier: 1,
1265			slideShadows: false
1266		},
1267
1268
1269		breakpoints: {
1270			320: {
1271				slidesPerView: 1,
1272				spaceBetween: 20,
1273				effect: 'slide',
1274			},
1275			480: {
1276				slidesPerView: 1,
1277				spaceBetween: 20,
1278				effect: 'slide',
1279
1280
1281			},
1282			640: {
1283				slidesPerView: 1,
1284				spaceBetween: 20,
1285				effect: 'slide',
1286			},
1287			1024: {
1288				slidesPerView: 1,
1289				spaceBetween: 20,
1290				effect: 'slide',
1291			},
1292		},
1293	});
1294
1295	if (swiper_slider_events.slides) {
1296		swiper_slider_events.controller.control = txt_slider_events;
1297		txt_slider_events.controller.control = swiper_slider_events;
1298	}
1299	var swiper_venue_upcoming = new Swiper('.venue_upcoming_events .swiper-container', {
1300
1301		speed: 800,
1302		spaceBetween: 20,
1303		navigation: {
1304			nextEl: '.upcoming-event-next',
1305			prevEl: '.upcoming-event-prev',
1306		},
1307		effect: 'coverflow',
1308		grabCursor: false,
1309		initialSlide: 1,
1310		centeredSlides: true,
1311		slidesPerView: 2,
1312		coverflowEffect: {
1313			rotate: 0,
1314			stretch: -240,
1315			depth: 350,
1316			modifier: 1,
1317			slideShadows: false
1318		},
1319
1320
1321		breakpoints: {
1322			320: {
1323				slidesPerView: 1,
1324				spaceBetween: 20,
1325				effect: 'slide',
1326			},
1327			480: {
1328				slidesPerView: 1,
1329				spaceBetween: 20,
1330				effect: 'slide',
1331
1332
1333			},
1334			640: {
1335				slidesPerView: 1,
1336				spaceBetween: 20,
1337				effect: 'slide',
1338			},
1339			1024: {
1340				slidesPerView: 1,
1341				spaceBetween: 20,
1342				effect: 'slide',
1343			},
1344		},
1345
1346
1347	});
1348
1349
1350
1351
1352
1353	var swiper_festival_img = new Swiper('.genre-festivals-img-slider', {
1354		navigation: {
1355			nextEl: '.swiper-button-next',
1356			prevEl: '.swiper-button-prev',
1357		},
1358	});
1359
1360	var swiper_festival_content = new Swiper('.genre-festivals-content-slider', {
1361		on: {
1362			init: function () {
1363				if (this.slides.eq(this.activeIndex).hasClass("fastivals-slider")) {
1364					$(".banner-content-slider-wrapper").find(".festival-tag-wrapper").addClass("show-tag");
1365					$(".banner-content-slider-wrapper").find(".series-tag-wrapper").removeClass("show-tag");
1366				} else {
1367					$(".banner-content-slider-wrapper").find(".festival-tag-wrapper").removeClass("show-tag");
1368					$(".banner-content-slider-wrapper").find(".series-tag-wrapper").addClass("show-tag");
1369				}
1370			},
1371			slideChange: function () {
1372				if (this.slides.eq(this.activeIndex).hasClass("fastivals-slider")) {
1373					$(".banner-content-slider-wrapper").find(".festival-tag-wrapper").addClass("show-tag");
1374					$(".banner-content-slider-wrapper").find(".series-tag-wrapper").removeClass("show-tag");
1375				} else {
1376					$(".banner-content-slider-wrapper").find(".festival-tag-wrapper").removeClass("show-tag");
1377					$(".banner-content-slider-wrapper").find(".series-tag-wrapper").addClass("show-tag");
1378				}
1379			}
1380		}
1381	});
1382
1383
1384	var genre_video_wrapper = new Swiper('.genre-videos-wrapper .swiper-container', {
1385		slidesPerView: 4,
1386		centeredSlides: false,
1387		spaceBetween: 30,
1388		navigation: {
1389			nextEl: '.gallery-button-next',
1390			prevEl: '.gallery-button-prev',
1391		},
1392		breakpoints: {
1393			// when window width is <= 640px
1394			640: {
1395				slidesPerView: 1,
1396				spaceBetween: 10
1397			}
1398		}
1399	});
1400
1401	if (swiper_festival_img.slides) {
1402		swiper_festival_img.controller.control = swiper_festival_content;
1403		swiper_festival_content.controller.control = swiper_festival_img;
1404	}
1405
1406	$(".genre-videos-wrapper .btn-primary").on("click", function (event) {
1407		var dataURL = $(this).attr('data-url');
1408		$("#YoutubeVideo").attr('src', dataURL);
1409		event.preventDefault();
1410		$('#videoModal').modal();
1411	});
1412	$(".view-trailer").on("click", function (event) {
1413		event.preventDefault();
1414		if (typeof (ga) !== 'undefined') {
1415			ga('send', {
1416				hitType: 'event',
1417				eventCategory: 'Trailer',
1418				eventAction: 'Play',
1419				eventLabel: ajax_object.post.post_title
1420			});
1421		}
1422		$('#eventvideoModal').modal();
1423	});
1424
1425	$("body").delegate('.read_more_link', 'click', function (event) {
1426		event.preventDefault();
1427		var id = $(this).attr("data-id");
1428		$('#readMore_' + id).modal();
1429	});
1430
1431	$(".videoModal").on('hidden.bs.modal', function (e) {
1432		$(".videoModal iframe").attr("src", $(".videoModal iframe").attr("src"));
1433	});
1434
1435	$("#gform_6").on("submit", function (e) {
1436		if ($('body').hasClass('logged-in') == false) {
1437			$("#loginModal").find('[name="redirect_to"]').val(siteurl + "support-us-membership" + "?m_flg=1");
1438			$("#loginModal").modal();
1439			return false;
1440		}
1441	});
1442
1443	// Uncommenting this block to see if it sorts the login 16/12/2024
1444
1445	$(".membership-tab-wrap ul.nav li:nth-child(3) a").on('click', function () {
1446	var tab_name = $(".membership-tab-wrap ul.nav li:nth-child(3) a").html();
1447		if(tab_name != 'FAQ'){
1448			if ($('body').hasClass('logged-in') == false) {
1449				$("#loginModal").find('[name="redirect_to"]').val(siteurl + "support-us-membership" + "?m_flg=1");
1450				$("#loginModal").modal();
1451				return false;
1452			}
1453		}
1454	
1455	});
1456
1457	// end block 16/12/2024
1458
1459	$(".online-ragi").on('click', function(){
1460		if ($('body').hasClass('logged-in') == false) {
1461			//$("#loginModal").find('[name="redirect_to"]').val(siteurl + "donation" + "?m_flg=1");
1462			$("#loginModal").find('[name="redirect_to"]').val(siteurl + "support-us-membership/#Registration");
1463			$("#loginModal").modal();
1464			return false;
1465		}
1466		
1467	});
1468
1469	$("#gform_10").on("submit", function (e) {
1470		if ($('body').hasClass('logged-in') == false) {
1471			$("#loginModal").find('[name="redirect_to"]').val(siteurl + "support-us-membership" + "?m_flg=1");
1472			$("#loginModal").modal();
1473			return false;
1474		}
1475	});
1476
1477	$("body").delegate('.book-now-btn', 'click', function (event) {
1478		if($(this).attr('href') == ''){
1479			
1480		
1481		event.preventDefault();
1482		var dataDate = $(this).attr('data-date');
1483		var eventStartTime = $(this).attr('data-event-time');
1484
1485		var dateCompare = new Date(dataDate);
1486		var CurrentDate = new Date();
1487		var dataEventCode = $(this).attr('data-code');
1488		var eventDate = new Date($(this).attr('data-event-date') + " " + eventStartTime);
1489		
1490		var compareDate = new Date(eventDate.getTime() + 15 * 60000);
1491		
1492		if (typeof (ga) != 'undefined') {
1493			//console.log(ajax_object.post.post_title,"ajax_object.post.post_tile")
1494/*
1495			console.log(ajax_object.post.post_tile,"ajax_object.post.post_tile")
1496			gtag('event', 'Book Now Clicked', {
1497			  'event_label': 'Book Now',
1498			  'event_category': 'Booking',
1499			  'select_content':ajax_object.post.post_tile,
1500			});
1501*/
1502			ga('send', {
1503				hitType: 'event',
1504				eventCategory: 'Booking',
1505				eventAction: 'Book Now',
1506				eventLabel: ajax_object.post.post_title
1507			});
1508		}
1509		if (eventDate) {
1510			
1511			//var compareDate_1 = moment.utc(compareDate+15*60000).format('YYYY-MM-DD');
1512			//var CurrentDate_1 = moment.utc(CurrentDate).format('YYYY-MM-DD');
1513
1514			
1515			//console.log('1500 '+compareDate_1 +' === '+ CurrentDate_1);
1516			//console.log('11 '+compareDate_1.getTime());
1517			//console.log('12 '+CurrentDate_1.getTime());
1518
1519
1520			if ((compareDate >= CurrentDate)) {
1521			//if ((compareDate_1 >= CurrentDate_1)) {
1522
1523				var status = $(this).attr('data-status');
1524				
1525				if (status == "0") {
1526					
1527					console.log('1505');
1528
1529					$("#loginModal").find('[name="redirect_to"]').val(window.location.href + "?l=" + dataEventCode);
1530					$("#loginModal").modal();
1531				} else {
1532					//console.log('1512 '+dataEventCode);
1533					//window.location.href = "https://in.bookmyshow.com/ncpa";
1534					get_bms_seat_layout(dataEventCode,this);
1535				}
1536				return false;
1537			}
1538			$("#bookDateModal").modal();
1539			var dataText = "Tickets for this event are currently not available for sale..";
1540			$("#TicketText").html(dataText);
1541			$("#bookDateModal").find("#content_div").hide();
1542			/*if(dateCompare > CurrentDate){
1543				var dataText = "Tickets for this event will be available for sale on <span>"+dataDate+"</span>";
1544				$("#TicketText").html(dataText);
1545			}else if(dateCompare < CurrentDate){
1546				var dataText = "Tickets for this event are currently not available for sale..";
1547				$("#TicketText").html(dataText);
1548				$("#bookDateModal").find("#content_div").hide();
1549			}*/
1550		} else {
1551			var dataText = "Please Leave Your Email To Get Notified About Tickets Sale ";
1552			$("#TicketText").html(dataText);
1553		}
1554	}
1555	});
1556
1557	$("body").delegate('.watch-live-btn', 'click', function (event) {
1558		event.preventDefault();
1559		var CurrentDate = new Date();
1560		var dataId = $(this).attr('data-id');
1561		if (typeof (ga) != 'undefined') {
1562			ga('send', {
1563				hitType: 'event',
1564				eventCategory: 'Watch Live',
1565				eventAction: 'Watch Live',
1566				eventLabel: ajax_object.post.post_tile
1567			});
1568		}
1569
1570		if (dataId) {
1571			$.ajax({
1572				type: "POST",
1573				url: ajax_object.ajax_url,
1574				data: { 'action': 'watch_live_fn', 'event_id': dataId },
1575				dataType: "json",
1576				cache: false,
1577				success: function (resp) {
1578					if (resp.no_login) {
1579						$("#loginModal").find('[name="redirect_to"]').val(window.location.href + "?w=" + resp.event_code);
1580						$("#loginModal").modal();
1581					} else if (resp.future_date) {
1582						$("#watchLiveModal").modal();
1583						var dataText = "You can watch this event live on " + resp.future_date_val;
1584						$("#watchLiveModal").find("#watchLiveModalText").text(dataText);
1585					} else if (resp.live_url) {
1586						$("#watchLiveModal").modal();
1587						$("#watchLiveModal").find(".modal-body").html('<iframe width="560" height="315" src="' + resp.live_url + '" frameborder="0" allowfullscreen></iframe>');
1588					} else {
1589						$("#watchLiveModal").modal();
1590						var dataText = "Please try again";
1591						$("#watchLiveModalText").html(dataText);
1592					}
1593				},
1594				error: function (jq, status, message) {
1595					alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1596				}
1597			});
1598		} else {
1599			$("#watchLiveModal").modal();
1600			var dataText = "Please try again !";
1601			$("#watchLiveModalText").html(dataText);
1602		}
1603
1604	});
1605
1606	$("body").delegate(".img-gallary-section .img-col", 'click', function (e) {
1607		e.preventDefault();
1608		var ImgSrc = $(this).attr('data-image');
1609		var title = $(this).find("h5").text();
1610		$("#MediaFullImage").attr('src', ImgSrc);
1611		$("#MediaFullImage_caption").text(title);
1612		$('#img-gallery').modal();
1613	});
1614
1615
1616
1617
1618	//Timeline post
1619	$(".timeline-wrap .load_more").on("click", function (event) {
1620
1621		var offset = parseInt($(this).attr('data-number'));
1622
1623		$.ajax({
1624			type: "GET",
1625			url: siteurl + "wp-json/timeline/v1/post",
1626			data: { offset: offset },
1627			dataType: "html",
1628			cache: false,
1629			beforeSend: function (html) {
1630				document.getElementById("timelinepost").innerHTML = '';
1631				show_load_image();
1632				$("#timelinepost").html(html);
1633			},
1634			success: function (html) {
1635				$("#timelinepost").show();
1636				$("#timelinepost").html(html);
1637				$("#loading_image").html("Load More");
1638				var offsetValue = offset + 4;
1639				$("#load_more").attr("data-number", offsetValue);
1640			},
1641			error: function (jq, status, message) {
1642				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1643			}
1644		});
1645		return false;
1646	});
1647
1648
1649	//archive events load more
1650	$(".archive-evenet-list .load_more").on("click", function (event) {
1651		var offset = parseInt($(this).attr('data-number'));
1652		var total = parseInt($(this).attr('data-count'));
1653		data = {};
1654		data.offset = offset;
1655		data.year = $("#EventYearType").val();
1656		if ($(this).attr('filter')) {
1657			data.genre = $("#EventGenreType").val();
1658		}
1659		var link_ele = $(this);
1660		$.ajax({
1661			type: "GET",
1662			url: siteurl + "wp-json/event/v1/loadMoreEvent",
1663			data: data,
1664			dataType: "html",
1665			cache: false,
1666			beforeSend: function (html) {
1667				show_load_image();
1668			},
1669			success: function (html) {
1670				//console.log($('#EventMediahide').last('.col-md-6'));
1671				$('#EventMediahide .col-md-6').last().after(html);
1672				$("#loading_image").html("");
1673				if ($('#EventMediahide').find('.col-md-6').length >= total) {
1674					link_ele.parent("div").hide();
1675				} else {
1676					var offsetValue = offset + 1;
1677					link_ele.attr("data-number", offsetValue);
1678				}
1679
1680			},
1681			error: function (jq, status, message) {
1682				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1683			}
1684		});
1685		return false;
1686	});
1687
1688	$(".archive-media-list .load_more").on("click", function (event) {
1689
1690		var offset = parseInt($(this).attr('data-number'));
1691		var total = parseInt($(this).attr('data-count'));
1692		data = {};
1693		data.offset = offset;
1694		data.year = $("#EventYearType").val();
1695		//if($(this).attr('filter')){
1696		data.genre = $("#EventGenreType").val();
1697		//}
1698		var link_ele = $(this);
1699		$.ajax({
1700			type: "GET",
1701			url: siteurl + "wp-json/event/v1/loadMoreMedia",
1702			data: data,
1703			dataType: "html",
1704			cache: false,
1705			beforeSend: function (html) {
1706				show_load_image();
1707			},
1708			success: function (html) {
1709				$('#Mediahide').find('.col-sm-4:last').after(html);
1710				$("#loading_image").html("");
1711				if ($('#Mediahide').find('.col-sm-4').length >= total) {
1712					link_ele.parent("div").hide();
1713				} else {
1714					var offsetValue = offset + 1;
1715					link_ele.attr("data-number", offsetValue);
1716				}
1717
1718			},
1719			error: function (jq, status, message) {
1720				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1721			}
1722		});
1723		return false;
1724	});
1725
1726	//archive jobs load more
1727	$(".jobs-list .load_more").on("click", function (event) {
1728		event.preventDefault();
1729		var offset = parseInt($(this).attr('data-number'));
1730		var total = parseInt($(this).attr('data-count'));
1731		data = {};
1732		data.offset = offset;
1733		if ($(this).attr('filter')) {
1734			data.title = $("#job_title").val();
1735			data.category = $("#job_category").val();
1736		}
1737		var link_ele = $(this);
1738		$.ajax({
1739			type: "GET",
1740			url: siteurl + "wp-json/job/v1/loadMoreJob",
1741			data: data,
1742			dataType: "html",
1743			cache: false,
1744			beforeSend: function (html) {
1745				show_load_image();
1746			},
1747			success: function (html) {
1748				$('#JobDataDiv').find('.col-sm-6:last').after(html);
1749				$("#loading_image").html("");
1750				if ($('#JobDataDiv').find('.col-sm-6').length >= total) {
1751					link_ele.parent("div").hide();
1752				} else {
1753					var offsetValue = offset + 1;
1754					link_ele.attr("data-number", offsetValue);
1755				}
1756
1757			},
1758			error: function (jq, status, message) {
1759				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1760			}
1761		});
1762		return false;
1763	});
1764
1765	//archive news load more
1766	$(".news-list .load_more").on("click", function (event) {
1767		event.preventDefault();
1768		var offset = parseInt($(this).attr('data-number'));
1769		var total = parseInt($(this).attr('data-count'));
1770		data = {};
1771		data.offset = offset;
1772		var cat = "";
1773		if ($("#news_type").val() != "news") {
1774			cat = $("#news_cat .active_tab a").attr("data-id");
1775		}
1776		data.type = $("#news_type").val();
1777		data.cat = cat;
1778		if ($(this).attr('filter')) {
1779			data.genre = $("#genre_select").val();
1780			data.month = $("#month_select").val();
1781			data.year = $("#year_select").val();
1782		}
1783		var link_ele = $(this);
1784		$.ajax({
1785			type: "GET",
1786			url: siteurl + "wp-json/news/v1/loadMoreNews",
1787			data: data,
1788			dataType: "html",
1789			cache: false,
1790			beforeSend: function (html) {
1791				show_load_image();
1792			},
1793			success: function (html) {
1794				$('#NewsDataDiv').find('.col-sm-4:last').after(html);
1795				$("#loading_image").html("");
1796				$(".news-div").unwrap();
1797				var divs = $(".news-div");
1798				for (var i = 0; i < divs.length; i += 3) {
1799					divs.slice(i, i + 3).wrapAll('<div class="row home-news-section section-news-at-ncpa"></div>');
1800				}
1801				if ($('#NewsDataDiv').find('.col-sm-4').length >= total) {
1802					link_ele.parent("div").hide();
1803				} else {
1804					var offsetValue = offset + 1;
1805					link_ele.attr("data-number", offsetValue);
1806				}
1807
1808			},
1809			error: function (jq, status, message) {
1810				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
1811			}
1812		});
1813		return false;
1814	});
1815
1816	//Managment Page User Info
1817	$(".management_team_wrap .btn-primary").on("click", function (event) {
1818		var dataname = $(this).attr('data-name');
1819		var datadesignation = $(this).attr('data-designation');
1820		var dataintro = $(this).next(".intro").val();
1821		var dataimage = $(this).attr('data-image');
1822
1823		$("#userImage").html(dataimage);
1824		$("#userName").text(dataname);
1825		$("#userDesignation").text(datadesignation);
1826		$("#userIntro").html(dataintro);
1827		event.preventDefault();
1828		$('#managmentInfo').modal();
1829
1830	});
1831
1832	var text_incress;
1833	var current_fontsize;
1834	//var $affectedElements = $("p"), $("blockquote")
1835	$(".text-maginifier").on("click", ".current_text", function () {
1836		text_incress = $(this).parent().parent().find("p, .event_detail_content, blockquote");
1837		current_fontsize = parseInt($(this).parents().parents().css('font-size'));
1838		$(this).parent().toggleClass("active-open");
1839		console.log("yes", text_incress);
1840	});
1841
1842	$(".text-maginifier").on("click", ".txt-small", function () {
1843		$(text_incress).css("font-size", current_fontsize - 2);
1844		$(".txt-maginifier-tag").removeClass("active");
1845		$(this).addClass("active");
1846	});
1847	$(".text-maginifier").on("click", ".txt-big", function () {
1848		$(text_incress).css("font-size", current_fontsize + 2);
1849		$(".txt-maginifier-tag").removeClass("active");
1850		$(this).addClass("active");
1851	});
1852
1853	$(".text-maginifier").on("click", ".txt-regular", function () {
1854		$(text_incress).css("font-size", current_fontsize);
1855		$(".txt-maginifier-tag").removeClass("active");
1856		$(this).addClass("active");
1857	});
1858
1859	/*
1860		$(".event-wrapper .event-viedo").on("click", function(event){
1861			event.preventDefault();
1862			$('#eventvideoModal').modal();
1863		});
1864	*/
1865
1866
1867	$(".event_share_btn").on("click", ".share_btn", function (e) {
1868		e.preventDefault();
1869		$(this).next().toggleClass("open_social_menu");
1870	});
1871
1872	var galleryTop = new Swiper('.gallery-top', {
1873		spaceBetween: 10,
1874		navigation: {
1875			nextEl: '.swiper-button-next',
1876			prevEl: '.swiper-button-prev',
1877		},
1878		loop: true,
1879		loopedSlides: 50,
1880
1881	});
1882	var galleryThumbs = new Swiper('.gallery-thumbs', {
1883		spaceBetween: 10,
1884		centeredSlides: true,
1885		slidesPerView: 5,
1886		touchRatio: 0.2,
1887		slideToClickedSlide: true,
1888		loop: true,
1889		loopedSlides: 50,
1890		breakpoints: {
1891			786: {
1892				slidesPerView: 5,
1893				spaceBetween: 10
1894			},
1895			// when window width is <= 640px
1896			640: {
1897				slidesPerView: 1,
1898				spaceBetween: 10
1899			}
1900
1901		}
1902	});
1903	if ($(".gallery-top").length > 0) {
1904		galleryTop.controller.control = galleryThumbs;
1905		galleryThumbs.controller.control = galleryTop;
1906		$(".gallery-top").find(".swiper-button-next, .swiper-button-prev").removeClass("swiper-button-disabled");
1907
1908	}
1909
1910
1911	//console.log($(".venue-news-section").css('padding-top'),"Toppadding");
1912	/*
1913		if ($(".venue-news-section").length > 0) {
1914			var venue_news_section = parseInt($(".venue-news-section").css('padding-top'));
1915			var total_space_section = Math.abs($(".venue-about-wrap .venue_info").outerHeight() - $(".venue-about-wrap").outerHeight());
1916		
1917			console.log(venue_news_section,"venue_news_section");
1918			console.log(total_space_section,"total_space_section");
1919		
1920			$(".venue-news-section").css("padding-top",venue_news_section+total_space_section);
1921		}
1922	*/
1923
1924	/*
1925		var CODE = '';
1926		if (CODE) {
1927			generateRefreshToken();
1928		} else {
1929			//generateAuthUrl();
1930		}
1931	*/
1932
1933
1934	AOS.init({
1935		duration: 1200,
1936	});
1937
1938
1939
1940	var swiper_testimonial = new Swiper('.soi-about-section-swiper', {
1941		pagination: {
1942			el: '.soi-tstimonial .swiper-pagination',
1943			type: 'custom',
1944			renderCustom: function (swiper, current, total) {
1945				return customProgressBar(current, total);
1946			}
1947		},
1948		watchSlidesProgress: true,
1949		autoplay: {
1950			delay: autoplay,
1951		},
1952
1953		on: {
1954			init: function () {
1955				var totalSlider = this.slides.length
1956				if (totalSlider < 10) {
1957					totalSlider = "0" + totalSlider;
1958				}
1959				$(".slider-total-page").html(totalSlider);
1960			},
1961			slideChange: function () {
1962				this.update();
1963				flag = true;
1964				var currentIndex = this.activeIndex + 1;
1965
1966				if (currentIndex < 10) {
1967					currentIndex = "0" + currentIndex;
1968				}
1969
1970				$(".slider-current-page").html(currentIndex);
1971			}
1972		},
1973		navigation: {
1974			nextEl: '.soi-tstimonial .swiper-button-next',
1975			prevEl: '.soi-tstimonial .swiper-button-prev',
1976		},
1977	});
1978
1979
1980
1981	var swiper_news = new Swiper('.soi-media-wrapper .swiper-container', {
1982		slidesPerView: 3,
1983		spaceBetween: 30,
1984		centeredSlides: false,
1985		navigation: {
1986			nextEl: '.soi-media-swiper-next',
1987			prevEl: '.soi-media-swiper-prev',
1988		},
1989		breakpoints: {
1990			// when window width is <= 320px
1991			320: {
1992				slidesPerView: 1,
1993				spaceBetween: 10
1994			},
1995			// when window width is <= 480px
1996			480: {
1997				slidesPerView: 1,
1998				spaceBetween: 20
1999			},
2000			// when window width is <= 640px
2001			640: {
2002				slidesPerView: 1,
2003				spaceBetween: 30
2004			},
2005			768: {
2006				slidesPerView: 2,
2007				spaceBetween: 30
2008			},
2009		},
2010
2011		on: {
2012			slideChange: function () {
2013				var activeIndex = this.activeIndex;
2014				$('.swiper-slide').removeClass('swiper-prev-visible swiper-next-visible');
2015				this.slides.eq(activeIndex).prev().addClass('swiper-prev-visible');
2016				this.slides.eq(activeIndex).next().addClass('swiper-next-visible');
2017				//var realIndex = this.slides.eq(activeIndex).attr('data-swiper-slide-index');
2018				//console.log(this.activeIndex);
2019				if (this.activeIndex == this.slides.length - 1) {
2020					console.log("end");
2021				}
2022			},
2023		}
2024	});
2025
2026
2027	$(".dropdown-btn").on("click", function (e) {
2028		e.preventDefault();
2029		//console.log($(this).parent().next().find(".dropdown-seelct"));
2030		//console.log();
2031		$(this).parent().siblings().find(".dropdown-seelct").removeClass("active");
2032		//$(this).next().siblings().next(".dropdown-seelct").removeClass("active");
2033		if ($(this).next(".dropdown-seelct").hasClass("active")) {
2034			$(".dropdown-seelct").removeClass("active");
2035		} else {
2036			$(this).next(".dropdown-seelct").addClass("active");
2037		}
2038		//$(".dropdown-seelct").removeClass("active");
2039
2040	});
2041	$(".tab-wrapper .nav-item a").on("click", function () {
2042		// console.log($(this).parent());
2043		$(".tab-wrapper .nav-item").removeClass("active_tab");
2044		//if($(this).hasClass("active")){
2045		$(this).parent().addClass("active_tab");
2046
2047		window.location.hash = $(this).attr('href');
2048		//}
2049
2050	});
2051
2052	$(window).on('hashchange', function(){
2053		// console.log("hash changed", window.location.hash);
2054		if(window.location.hash == '#Welcome' || window.location.hash == '#FAQ' || window.location.hash == '#Member' || window.location.hash == '#Registration'){
2055			let hash = window.location.hash;
2056			$(".tab-wrapper .nav-item").removeClass("active_tab");
2057			$(".tab-wrapper .nav-item a[href='" + hash + "']").parent().addClass("active_tab");
2058			$('.tab-content > .container').removeClass('active show');
2059			$(hash).addClass('active show');
2060			window.scrollTo({
2061				top: 0,
2062				behavior: 'smooth'
2063			});
2064		}
2065	})
2066
2067	$('.member-bott-btn .registeration-link').on('click', function(){
2068		let option = $(this).data('option');
2069
2070		$('#gform_11 .gfield_select').val(option).change();
2071	})
2072
2073	$("body").delegate('.read-more-btn', 'click', function (e) {
2074		e.preventDefault();
2075		var btn_txt = $(this).find(".btn-txt").text();
2076		if (btn_txt == "Read More") {
2077			$(this).find(".btn-txt").text("Read Less");
2078			$(this).parent().find(".rfa_brand_partner_text_wrapper").removeClass("rfa_brand_partner_text");
2079		} else {
2080			$(this).find(".btn-txt").text("Read More");
2081			$(this).parent().find(".rfa_brand_partner_text_wrapper").addClass("rfa_brand_partner_text");
2082		}
2083		$(this).parent().find(".read-more-txt").slideToggle();
2084	});
2085
2086	$("body").delegate('.media-list-div .section-news-at-ncpa .btn-primary', 'click', function () {
2087		var dataURL = $(this).attr('data-href');
2088		if (dataURL != undefined && dataURL != "") {
2089			event.preventDefault();
2090			$("#mediaCaverageDetails").find('.modal-body').html('<img style="width:100%" src="' + dataURL + '" alt="">');
2091			window.$("#mediaCaverageDetails").modal();
2092		}
2093	});
2094
2095	$(".view-trailer-home").on("click", function (event) {
2096		event.preventDefault();
2097		swiper_1.autoplay.stop();
2098		if (typeof (ga) != 'undefined') {
2099			ga('send', {
2100				hitType: 'event',
2101				eventCategory: 'Trailer',
2102				eventAction: 'play',
2103				eventLabel: 'Watch Trailer'
2104			});
2105		}
2106		$("#eventvideoModal_" + $(this).attr("data-id")).modal();
2107	});
2108	$(".videoTrailerModal .close").on("click", function (event) {
2109		swiper_1.autoplay.start();
2110	});
2111	$('#mediaCaverageDetails').on('show.bs.modal', function () {
2112		$(this).find('.modal-body').css({
2113			width: 'auto', //probably not needed
2114			height: 'auto', //probably not needed 
2115			'max-height': '100%'
2116		});
2117	});
2118
2119	$(".social_share_wrapper .share_btn").on("click", function (event) {
2120		event.preventDefault();
2121		$(".social-links").toggleClass("open_social_menu");
2122	});
2123
2124	$(".space-top").css({ "height": top_navbar });
2125
2126	// Listen for orientation changes
2127	window.addEventListener("resize", function () {
2128		var top_navbar = $(".navbar-top").outerHeight();
2129		$(".space-top").css({ "height": top_navbar });
2130	}, false);
2131
2132	$(".upload_resume").on("click", "a", function (event) {
2133		event.preventDefault();
2134		$("#input_7_7").click();
2135	});
2136
2137	/*
2138	jQuery(document).bind('gform_post_render', function(){
2139	
2140	   $(".upload_resume").on("click","a", function(event){
2141			event.preventDefault();
2142			$("#input_7_7").click();
2143		});
2144		
2145		$('#input_7_7').change(function(e){
2146		var fileName = e.target.files[0].name;
2147		//console.log('The file "' + fileName +  '" has been selected.');
2148		$(".fileName").html(fileName);
2149	 });
2150	
2151	});
2152	*/
2153
2154	$('#input_7_7').change(function (e) {
2155		var fileName = e.target.files[0].name;
2156		//console.log('The file "' + fileName +  '" has been selected.');
2157		$(".fileName").html(fileName);
2158	});
2159
2160
2161	/*
2162	$('#resetPassworFom').submit(function(e) {
2163		 e.preventDefault();
2164		 
2165		 
2166	});
2167	*/
2168
2169	$('.calender-icon').closest('.btn-primary').hide();
2170
2171	if ($(".banner .swiper-container").length > 0) {
2172		$(".banner .swiper-container").find(".swiper-button-next, .swiper-button-prev").removeClass("swiper-button-disabled");
2173	}
2174
2175	if ($(".tax-genre .genre-wrapper .swiper-container").length > 0) {
2176		$(".tax-genre .genre-wrapper .swiper-container").find(".swiper-button-next").removeClass("swiper-button-disabled");    	
2177	}
2178	if ($(".page-template-homepage-new .genre-wrapper .swiper-container").length > 0) {
2179		//$(".page-template-homepage-new .genre-wrapper .swiper-container").find(".swiper-button-next, .swiper-button-prev").removeClass("swiper-button-disabled");    	
2180	}
2181
2182	$('.com-select-wrapper select').each(function () {
2183		var $this = $(this), numberOfOptions = $(this).children('option').length;
2184		console.log($this);
2185		$this.addClass('select-hidden');
2186		$this.wrap('<div class="select"></div>');
2187		$this.after('<div class="select-styled"></div>');
2188
2189		var $styledSelect = $this.next('div.select-styled');
2190		$styledSelect.html("<span>" + $this.children('option').eq(0).text() + "</span>");
2191
2192		var $list = $('<ul />', {
2193			'class': 'select-options'
2194		}).insertAfter($styledSelect);
2195
2196		//console.log(numberOfOptions);
2197		if (numberOfOptions >= 10) {
2198			$list.addClass("inOverflow-list");
2199		}
2200
2201
2202		for (var i = 0; i < numberOfOptions; i++) {
2203			$('<li />', {
2204				text: $this.children('option').eq(i).text(),
2205				rel: $this.children('option').eq(i).val()
2206			}).appendTo($list);
2207		}
2208
2209		var $listItems = $list.children('li');
2210
2211		$styledSelect.click(function (e) {
2212			e.stopPropagation();
2213			$('div.select-styled.active').not(this).each(function () {
2214				$(this).removeClass('active').next('ul.select-options').hide();
2215			});
2216			$(this).toggleClass('active').next('ul.select-options').toggle();
2217		});
2218
2219		$listItems.click(function (e) {
2220			e.stopPropagation();
2221			$styledSelect.html("<span>" + $(this).text() + "</span>").removeClass('active');
2222			$this.val($(this).attr('rel'));
2223			$list.hide();
2224			// console.log($this.val());
2225			$(this).parents('.select').find('select').trigger('change');
2226		});
2227
2228		$(document).click(function () {
2229			$styledSelect.removeClass('active');
2230			$list.hide();
2231		});
2232
2233	});
2234
2235	/* GET ALL VIDEOS */
2236	/*
2237	swiper_1.on('slideChange', function () {
2238		setTimeout(function()
2239		{
2240			sliderVideos.each(function( index ) 
2241			{
2242				this.currentTime = 0;
2243			});
2244		},100);
2245		  
2246		//$('.swiper-slide-active').find("video")
2247		let index_currentSlide = swiper_1.activeIndex,
2248		currentSlide = swiper_1.slides[index_currentSlide];
2249	
2250		if(jQuery(".swiper-slide-active").find("video").length != 0)
2251		{
2252			var v = document.getElementsByTagName("video")[0];
2253			v.addEventListener("canplay", function () {
2254				swiper_1.autoplay.stop();
2255				console.log("start");
2256			}, true);
2257	
2258			v.addEventListener("ended", function () {
2259				swiper_1.autoplay.start();
2260				swiper_1.slideNext();
2261				console.log("ended");
2262			}, true);
2263		}
2264	});
2265	*/
2266	/*
2267	
2268	var sliderVideos = $(".banner .swiper-slide video");
2269	
2270	if(sliderVideos.length != 0){
2271		swiper_1.on('slideChange', function () {
2272			//console.log(swiper_1.slides[this.activeIndex]);
2273			//console.log('slide changed',$('.swiper-slide-active').find("video"));
2274		  setTimeout(function(){
2275		  sliderVideos.each(function( index ) {
2276			this.currentTime = 0;
2277		  });},100);
2278		  
2279		  var prevVideo =  $("[data-swiper-slide-index=" + this.previousIndex + "]").find("video");
2280		  var currentVideo =  $("[data-swiper-slide-index=" + this.realIndex + "]").find("video");
2281		  
2282		  
2283		  //video autoplay section
2284		   var v = document.getElementsByTagName("video")[0];
2285		   console.log(currentVideo.length);
2286			v.addEventListener("canplay", function () {
2287				swiper_1.autoplay.stop();
2288				console.log("start");
2289			}, true);
2290	
2291			v.addEventListener("ended", function () {
2292				swiper_1.autoplay.start();
2293				swiper_1.slideNext();
2294				console.log("ended");
2295			}, true);
2296		    
2297		    
2298		
2299		 
2300		  //console.log(currentVideo);
2301		  setTimeout(function(){
2302				prevVideo.trigger('stop');
2303				currentVideo.trigger('play');
2304		  },100);
2305		});
2306	}
2307	*/
2308
2309
2310		var iframe = $('.swiper-container').find('iframe');
2311		// for(let i=0; i<iframe.length; i++){
2312		// 	iframe[i].css({'visibility':'hidden'});
2313		// }
2314
2315		
2316			$('.swiper-button-next').click(function(){
2317				iframe.hide();
2318				for(let i=0; i<iframe.length; i++){
2319					iframe[i].src = iframe[i].src;
2320					setTimeout(function(){
2321						iframe.show();
2322					},600);
2323				}
2324			});
2325			$('.swiper-button-prev').click(function(){
2326				iframe.hide();
2327				for(let i=0; i<iframe.length; i++){
2328					iframe[i].src = iframe[i].src;
2329					setTimeout(function(){
2330						iframe.show();
2331					},600);
2332				}
2333		});
2334			
2335		
2336		
2337
2338});
2339$(".soi-about-txt-wraper a").on("click", function (event) {
2340	event.preventDefault();
2341});
2342
2343$('input').attr('autocomplete', 'off');
2344
2345$('[data-toggle="popover"]').popover({
2346	//trigger: 'focus',
2347	trigger: 'hover',
2348	html: true,
2349	placement: 'auto',
2350	boundary: 'viewport',
2351	content: function () {
2352		return '<div class="popover-txt-inside"> <h3>' + $(this).data('title') + '</h3> <span>' + $(this).data('post') + '</span> </div><img class="img-fluid" src="' + $(this).data('img') + '" /><div>';
2353	},
2354})
2355
2356
2357/**
2358 * Generates a refresh token given the authorization code.
2359 */
2360/*
2361function generateRefreshToken() {
2362	var cilent_id = jQuery('.calendar-keys').data('cilent_id');
2363	var client_secret = jQuery('.calendar-keys').data('client_secret');
2364	var redirect_url = jQuery('.calendar-keys').data('redirect_url');
2365  var payload = {
2366	code: CODE,
2367	client_id: cilent_id,
2368	client_secret: client_secret,
2369	// Specify that no redirection should take place
2370	// This is Google-specific and not part of the OAuth2 specification.
2371	redirect_uri: redirect_url,
2372	grant_type: 'authorization_code'
2373  };
2374  var options = {method: 'POST', payload: payload};
2375  var response = UrlFetchApp.fetch(TOKEN_URL, options);
2376  var data = JSON.parse(response.getContentText());
2377  if (data.refresh_token) {
2378	var msg = 'Success! Refresh token: ' + data.refresh_token +
2379	  '\n\nThe following may also be a useful format for pasting into your ' +
2380	  'script:\n\n' +
2381	  'var CLIENT_ID = \'' + client_id + '\';\n' +
2382	  'var CLIENT_SECRET = \'' + client_secret + '\';\n' +
2383	  'var REFRESH_TOKEN = \'' + data.refresh_token + '\';';
2384	Logger.log(msg);
2385  } else {
2386	Logger.log(
2387		'Error, failed to generate Refresh token: ' +
2388		response.getContentText());
2389  }
2390}
2391*/
2392
2393$(".get_media_on_stage").click(function (e) {
2394	e.preventDefault();
2395	$this = $(this);
2396	$this.attr('disabled', 'disabled').text('Loading...');
2397	var post_id = $this.attr('data-post_id');
2398
2399	$.ajax({
2400		type: 'POST',
2401		url: ajax_object.ajax_url,
2402		data: { 'action': 'get_media_on_stage', 'post_id': post_id },
2403		success: function (response) {
2404			console.log(response);
2405			$(".media_on_stage").append(response);
2406			$this.hide();
2407		}
2408	});
2409});
2410
2411$(".save_event").on("click", function (e) {
2412	e.preventDefault();
2413	var event_id = $(this).attr('data-id');
2414	var data = { 'action': 'save_event', 'event_id': event_id };
2415	var href = $(this).attr("href");
2416	if (href == "#") {
2417		data.user = "1";
2418	}
2419	if (typeof (ga) != 'undefined') {
2420		ga('send', {
2421			hitType: 'event',
2422			eventCategory: 'Videos',
2423			eventAction: 'save',
2424			eventLabel: 'Save Event'
2425		});
2426	}
2427
2428	$.ajax({
2429		type: 'POST',
2430		url: ajax_object.ajax_url,
2431		data: data,
2432		success: function (response) {
2433
2434			if ($('body').hasClass('logged-in') == false) {
2435				resp = $.parseJSON(response);
2436				$("#loginModal").find('[name="redirect_to"]').val(window.location.href + "?w=" + resp.event_code);
2437				$("#loginModal").modal();
2438				return false;
2439			}
2440			if (response == "0") {
2441				window.location.href = href;
2442				return false;
2443			}
2444			var msg = "Event Saved Successfully";
2445			if (response) {
2446				msg = "Already Saved";
2447			}
2448			toastr.options = {
2449				"preventDuplicates": true,
2450				"preventOpenDuplicates": true
2451			};
2452			toastr.clear();
2453			setTimeout(function () {
2454				toastr.success(msg);
2455			}, 200);
2456		}
2457	});
2458});
2459
2460$(".share_event").on("click", function (e) {
2461	e.preventDefault();
2462	var event_id = $(this).attr('data-id');
2463	var data = { 'action': 'share_event', 'event_id': event_id };
2464	var href = $(this).attr("href");
2465	if (href == "#") {
2466		data.user = "1";
2467	}
2468	if (typeof (ga) != 'undefined') {
2469		ga('send', {
2470			hitType: 'event',
2471			eventCategory: 'event',
2472			eventAction: 'share',
2473			eventLabel: 'Share Event'
2474		});
2475	}
2476
2477	$.ajax({
2478		type: 'POST',
2479		url: ajax_object.ajax_url,
2480		data: data,
2481		success: function (response) {
2482			resp = $.parseJSON(response);
2483			if (response == "1") {
2484				return true;
2485			} else if (typeof (resp) == "object" && resp.no_login) {
2486				$("#loginModal").find('[name="redirect_to"]').val(window.location.href + "?w=" + resp.event_code);
2487				$("#loginModal").modal();
2488				return false;
2489			} else {
2490				return true;
2491			}
2492		}
2493	});
2494});
2495
2496
2497$(".remove_saved_event").on("click", function (e) {
2498	e.preventDefault();
2499	var event_id = $(this).attr('data-id');
2500	$.ajax({
2501		type: 'POST',
2502		url: ajax_object.ajax_url,
2503		data: { 'action': 'remove_saved_event', 'event_id': event_id },
2504		success: function (response) {
2505			var msg = "Event Removed Successfully";
2506			if (response) {
2507				msg = "Already Removed";
2508			}
2509			$('a[data-id="' + event_id + '"]').parents(".col-md-6").remove();
2510			toastr.success(msg);
2511		}
2512	});
2513});
2514
2515$(".home_news_letter").on("click", function (e) {
2516	e.preventDefault();
2517	$("#newsletterModal").modal();
2518});
2519
2520
2521$(".top-signup-bar a, .right-nav a, .sign-up-head a").on("click", function (e) {
2522	e.preventDefault();
2523	$("#subscribeModal").modal();
2524});
2525
2526
2527$('#newsletterModal').on('hidden.bs.modal', function () {
2528	$('#newsletterModal form')[0].reset();
2529	$(this).find('input[type=text]').val('');
2530	$(this).find(".validation_error").hide();
2531	$(this).find('li.gfield_error div.validation_message').remove(); // remove the validation meesages
2532	$(this).find('li.gfield_error').removeClass('gfield_error'); // remove the validation classes.
2533});
2534
2535$("body").delegate('#save_show_timings', 'click', function (e) {
2536	e.preventDefault();
2537	if (!$("input:radio[name='timing_radio']").is(":checked")) {
2538		toastr.error("Please select show timings");
2539	} else {
2540		var select_ele = $(this).parents(".modal-body").find("input[name='timing_radio']:checked");
2541		var event_code = $(this).parent("div").find("#event_code_hdn").val();
2542		var session_id = select_ele.attr("data-session");
2543		var show_date = select_ele.parents(".show-date-container").attr("id");
2544		var show_time = select_ele.parents(".show-date-container").find(".radio-tile-label").text();
2545		$.ajax({
2546			type: "POST",
2547			url: ajax_object.ajax_url,
2548			data: {
2549				'action': 'bms_get_event_detail_fn',
2550				event_code: event_code,
2551				event_date: show_date,
2552				event_time: show_time,
2553				event_sess: session_id
2554			},
2555			dataType: "json",
2556			async: false,
2557			cache: false,
2558			success: function (resp) {
2559				venue_code = resp.venue_code;
2560				$("#seatLayoutModal").find(".btn_div").append("<a id='bms_link_ele' target='_blank' href='#'></a>");
2561				$('#bms_link_ele').attr("href", "https://in.testbms.com/mumbai/events/test-event-vista/seat-layout/seatsview/" + event_code + "/" + venue_code + "/" + session_id);
2562				$('#bms_link_ele')[0].click();
2563				$('#bms_link_ele').remove();
2564				return false;
2565			},
2566			error: function (jq, status, message) {
2567				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
2568			}
2569		});
2570	}
2571});
2572
2573
2574$(".support-crs-edu-wrapper").on("click", ".rfa_load_more_tab_content", function (e) {
2575	e.preventDefault();
2576	var $this = $(this);
2577	$this.css("pointer-events", "none");
2578	var next = $this.attr('data-next');
2579	var total = $this.attr('data-total');
2580	//var tab = $this.attr('data-tab');
2581	var limit = $this.attr('data-limit');
2582	var tab_index = $this.attr('data-tab_index');
2583	var post_id = $this.attr('data-post_id');
2584
2585	$.ajax({
2586		url: ajax_object.ajax_url,
2587		type: 'POST',
2588		data: { 'action': 'get_edu_read_more', 'next': next, 'total': total, 'limit': limit, 'tab_index': tab_index, 'post_id': post_id },
2589		success: function (response) {
2590			var result = JSON.parse(response);
2591			//console.log(result);
2592
2593			$this.closest('.show_more').before(result.content);
2594			if (result.isReadMore) {
2595				$this.attr('data-next', parseInt(next) + 2);
2596			}
2597			else {
2598				$this.hide();
2599			}
2600		},
2601		complete: function () {
2602			$this.css("pointer-events", "initial");
2603		},
2604		error: function (jq, status, message) {
2605			alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
2606		}
2607	});
2608});
2609
2610
2611function GetQueryStringParams(sParam) {
2612	var sPageURL = window.location.search.substring(1);
2613	var sURLVariables = sPageURL.split('&');
2614	for (var i = 0; i < sURLVariables.length; i++) {
2615		var sParameterName = sURLVariables[i].split('=');
2616		if (sParameterName[0] == sParam) {
2617			return sParameterName[1];
2618		}
2619	}
2620}
2621
2622$("#save_mobile_btn").on('click', function (e) {
2623	e.preventDefault();
2624	var mobile_number = $("#mobile_number_val").val();
2625	if (mobile_number == "") {
2626		toastr.warning("Please enter mobile number");
2627		return false;
2628	}
2629
2630	$.ajax({
2631		type: "POST",
2632		url: ajax_object.ajax_url,
2633		data: { 'action': 'save_user_mobile', 'mobile_number': mobile_number },
2634		dataType: "json",
2635		cache: false,
2636		success: function (resp) {
2637			toastr.success("mobile number updated successfully");
2638			window.location.reload();
2639		},
2640		error: function (jq, status, message) {
2641			alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
2642		}
2643	});
2644	$('.mobileNumberModal').modal('hide');
2645
2646});
2647
2648
2649function check_user_mobile() {
2650	if ($('body').hasClass('logged-in')) {
2651		$.ajax({
2652			type: "POST",
2653			url: ajax_object.ajax_url,
2654			data: { 'action': 'check_user_mobile' },
2655			dataType: "json",
2656			cache: false,
2657			success: function (resp) {
2658				if (resp == "false" || resp == false) {
2659					$(".mobileNumberModal").modal();
2660				}
2661			},
2662			error: function (jq, status, message) {
2663				alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
2664			}
2665		});
2666
2667	}
2668}
2669
2670function get_bms_seat_layout(event_code, el = null) {
2671	if (!$('body').hasClass('logged-in')) {
2672		$("#loginModal").find('[name="redirect_to"]').val(window.location.href + "?l=" + event_code);
2673		$("#loginModal").modal();
2674		return false;
2675	}
2676	$.ajax({
2677		type: "POST",
2678		url: ajax_object.ajax_url,
2679		data: { 'action': 'bms_seat_layout_fn', 'event_code': event_code },
2680		dataType: "json",
2681		cache: false,
2682		success: function (resp) {
2683			if (resp.status == "400") {
2684				toastr.error(resp.message);
2685				return false;
2686			}
2687			var resp_json = JSON.parse(resp.message.body);
2688			if (resp_json.BookMyShow.arrEventInfo[0] != undefined) {
2689				var booking_url = resp_json.BookMyShow.arrEventInfo[0].EventWebRedirectURL;
2690				var data = resp.bms_data;
2691				var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), ajax_object.bms_k).toString();
2692				//window.location=booking_url+"?data="+ciphertext;
2693				var hostname = $('<a>').prop('href', booking_url).prop('hostname');
2694				booking_url = booking_url.replace('in.bookmyshow.com', 'cap-in.bookmyshow.com');
2695				//console.log(hostname);
2696				console.log(booking_url + "?data=" + ciphertext);
2697				//window.open(booking_url + "?data=" + ciphertext, '_blank');
2698				
2699				var some_url =booking_url + "?data=" + ciphertext;
2700				el.href = some_url;
2701				el.click();
2702				//if(!window.open(some_url, '_blank')) {
2703					//window.location.href = some_url;
2704					//window.location.assign(some_url);
2705					/*var a = window.document.createElement("a");
2706					a.target = '_blank';
2707					a.href = some_url;
2708					
2709					// Dispatch fake click
2710					var e = window.document.createEvent("MouseEvents");
2711					e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
2712					a.dispatchEvent(e);*/
2713					
2714					//window.location.assign(some_url);
2715					
2716				//}
2717				//window.location.assign(booking_url + "?data=" + ciphertext, '_blank');
2718				/*const a = document.createElement("a");
2719				a.setAttribute('href', booking_url + "?data=" + ciphertext, '_blank');
2720				a.setAttribute('target', '_blank');
2721				a.click();*/
2722			} else {
2723				toastr.warning("This event is no longer available for booking!");
2724			}
2725			/*
2726				var show_dates = resp_json.BookMyShow.arrVenues[0].arrShowDates;
2727				var ele = $("#seatLayoutModal").find(".modal-body").find(".container");
2728				var i = 0;
2729				
2730				$.each(show_dates, function(index, item){
2731					ele.append(ele.find(".show-date-container").first().clone().attr("id",item.ShowDateCode));
2732					$("#"+item.ShowDateCode).find(".date-container").text(item.ShowDateDisplay);
2733					
2734					var radio_ele = $("#"+item.ShowDateCode).find(".radio-tile-group");	
2735					$.each(item.arrShowTimes, function(index, timing_item){
2736						cloned_radio = radio_ele.find(".input-container").first().clone();
2737						radio_ele.append(cloned_radio);
2738						cloned_radio.find(".radio-button").attr("data-session",timing_item.SessionId);
2739						cloned_radio.find(".radio-tile-label").text(timing_item.ShowTimeDisplay);
2740					});
2741					radio_ele.find(".input-container").first().remove();
2742				});
2743				ele.find(".show-date-container").first().remove();
2744				$("#seatLayoutModal").find("#event_code_hdn").val(event_code);
2745				$("#seatLayoutModal").modal();
2746			*/
2747		},
2748		error: function (jq, status, message) {
2749			alert('A jQuery error has occurred. Status: ' + status + ' - Message: ' + message);
2750		}
2751	});
2752}
2753
2754function clear_imput_file(ele) {
2755	$("#ele").val('');
2756}
2757window.onload = function () {
2758	setTimeout(function () {
2759		if ($(".stream_wrap").find(".swiper-slide").length == 0) {
2760			$(".stream_title").parent().hide();
2761		}
2762
2763		if ($(".new-banner-design").find(".swiper-slide").length <= 1) {
2764			$(".new-banner-design .swiper-button-next").hide();
2765			$(".new-banner-design .swiper-button-prev").hide();
2766		} else {
2767			$(".new-banner-design .swiper-button-next").show();
2768			$(".new-banner-design .swiper-button-prev").show();
2769		}
2770
2771		if ($(".stream_wrap_upcoming").find(".swiper-slide").length == 0) {
2772			$(".stream_title_upcoming").parent().hide();
2773		}
2774
2775		if ($(".upcoming_container").find(".swiper-slide").length == 0) {
2776			$(".upcoming_container").parent().hide();
2777		}
2778		if ($(".genre-upcoming-workshop").find(".swiper-slide").length == 0) {
2779			$(".workshop-upcomming").parent().hide();
2780		}
2781
2782		if ($(".venue-wrap-events").find(".swiper-slide").length == 0) {
2783			$(".venue-wrap-events").hide();
2784		}
2785
2786		if ($(".fest-div").find(".swiper-slide").length == 0) {
2787			$(".fest-div").hide();
2788		}
2789
2790		$(".home-gen-wrapper").each(function () {
2791			if ($(this).find(".container-fluid").find(".col-12").length == 1) {
2792				$(this).hide();
2793			}
2794		});
2795	}, 1000);
2796}
2797
2798if($("#gform_confirmation_message_13").is(":visible")){
2799	$('#membership-form .col-md-10 h2').css('display', 'none');
2800	$('#membership-form .col-md-10 p').css('display', 'none');
2801
2802}

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.