PageSourceSearch

https://www.stirworld.com/js/common_func_js.js?Friday2ndofOctober202607:58:10AM

js stirworld.com collected 2026-10-02 02:29:13 UTC 23,560 bytes, 1,498 lines download raw bytes

1
2//Autocomplete Start
3
4	
5  $( function() {
6
7    $.widget( "custom.catcomplete", $.ui.autocomplete, {
8
9      _create: function() {
10
11        this._super();
12
13        this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
14
15      },
16
17      _renderMenu: function( ul, items ) {
18
19        var that = this,
20
21          currentCategory = "";
22
23        $.each( items, function( index, item ) {
24
25          var li;
26
27          if ( item.category != currentCategory ) {
28
29            ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
30
31            currentCategory = item.category;
32
33          }
34
35          li = that._renderItemData( ul, item );
36
37          if ( item.category ) {
38
39            //li.attr( "aria-label", item.category + " : " + item.label );
40
41            li.prepend(item.icon);
42
43            li.find('a').append("<span class='icon_box arrow_w'></span>");
44
45          }
46
47        });
48
49      }
50
51    });
52
53 
54
55    $( "#project" ).catcomplete({
56
57		delay: 0,
58
59		minLength: 2,
60
61		source: common_prev_slashes+'search.php'
62
63    }).catcomplete( "instance" )._renderItem = function( ul, item ) {
64
65			//$('.custom_search').addClass('d-none');
66
67			 var txt = String(item.value).replace(new RegExp(this.term, "gi"),"<b>$&</b>");
68
69			 
70
71			 /*Find Device start here*/
72
73			
74
75			if($(window).width() < 767)
76
77			{
78
79        		var device_type = "Mobile";
80
81        	}
82
83        	else
84
85        	{
86
87        		device_type = "Desktop";
88
89        	}
90
91			
92
93			/*Find Device end here*/
94
95			
96
97            return $("<li class='d-flex align-items-center search_list justify-content-start '></li>")
98
99                .data("ui-autocomplete-item", item)
100
101                .append("<a href='"+item.slug+"' onClick='gtag(&apos;event&apos;, &apos;click&apos;, {  &apos;event_category&apos;: &apos;STIRworld Search - Autosuggestion - utm ("+device_type+")&apos;,  &apos;event_label&apos;: &apos;Search - "+item.slug+"&apos;});'><span class='item_data'>" + txt + "</span></a>")
102
103                .appendTo(ul);	
104
105			
106
107		};
108	  
109	  
110	 /*device_width start here*/ 
111	  
112    var device_width = window.innerWidth;
113
114    /*
115     * Only update when the detected width changes
116     */
117    if (document.cookie.indexOf("device_width=" + device_width) === -1) {
118
119        document.cookie =
120            "device_width=" + device_width +
121            "; path=/; max-age=86400; SameSite=Lax";
122
123    }
124	 /*device_width end here*/ 
125
126  } );
127
128	
129
130	//Autocomplete End
131
132
133	//Search Engine focus Start
134
135	
136
137	$('#project,#project_s').focus(function (e) {
138
139		$(this).parent('.sform').addClass('focus_searchbar');
140
141		var c_val = $(this).val();
142
143		if(c_val.length <= 1)
144
145		{
146
147			$(this).parents('.searchbar').find('.custom_search').removeClass('d-none');
148
149			$('#button_ch').hide();
150
151			$('#button_c').hide();
152
153		}
154
155		else
156
157		{
158
159			setTimeout(function(){ $(this).parents('.searchbar').find('.custom_search').addClass('d-none'); }, 5000);
160
161			$('#button_ch').show();
162
163			$('#button_c').show();
164
165		}
166
167		if($(window).width() < 767 )
168
169		{
170
171			$('body').addClass('overflow-hidden');
172
173			$('.stirfri_sticky_footer').addClass('d-none');
174
175		}
176
177		if($(this).attr('id') == 'project_s' )
178
179		{
180
181			if(c_val == '')
182
183			{
184
185				//do nothing
186
187			}
188
189			else
190
191			{
192
193				$( "#ui-id-2" ).css({"display": "block"});
194
195			}
196
197		}
198
199	});
200
201	/*$('#project,#project_s').keydown(function (e) {
202
203		var s = encodeURIComponent($(this).val());
204
205		if(s == '')
206
207		{
208
209			$('.text_anim').show();
210
211		}
212
213		else
214
215		{
216
217			$('.text_anim').hide();
218
219		}
220
221	});*/
222
223	$('#project,#project_s').keyup(function (e) {
224
225		$(this).parent('.sform').addClass('focus_searchbar');
226
227			$('#button_ch').show();
228
229			$('#button_c').show();
230
231			$('.text_anim').hide();
232
233		var s = encodeURIComponent($(this).val());
234
235		if(s.length == 0)
236
237		{
238
239			$(this).parents('.searchbar').find('.custom_search').removeClass('d-none');
240
241			$('#button_ch').hide();
242
243			$('#button_c').hide();
244
245			$('.text_anim').show();
246
247		}
248
249		else if(s.length <= 1)
250
251		{
252
253			$(this).parents('.searchbar').find('.custom_search').removeClass('d-none');
254
255			//$('#button_ch').hide();
256
257			//$('#button_c').hide();
258
259		}
260
261		else 
262
263		{
264
265			$(this).parents('.searchbar').find('.custom_search').addClass('d-none');
266
267		}
268
269	});
270
271
272
273	$('#project,#project_s').focusout(function (e) {	
274
275		$(this).parent('.sform').removeClass('focus_searchbar');
276
277		if($(window).width() < 767 )
278
279		{
280
281			$('body').removeClass('overflow-hidden');
282
283			$('.stirfri_sticky_footer').removeClass('d-none');
284
285		}
286
287		//alert($(this).attr('id'));
288
289		if($(this).attr('id') == 'project_s' )
290
291		{
292
293			setTimeout(function(){ $('.custom_search').addClass('d-none'); }, 150);
294
295		}
296
297	});
298
299	//Search Engine focus End
300
301	
302
303	//Search Engine Start
304
305	$('#project').keypress(function (e) {
306
307		//$(".custom_search").addClass("d-none");
308
309		//$(".recent_search").removeClass("d-none");
310
311		
312
313		if (e.which == 13) 
314
315		{
316
317		   var s = encodeURIComponent($.trim($('#project').val()));
318
319		   //alert(s);
320
321		   if(s.length <= 1)
322
323		   {
324
325				event.stopPropagation();
326
327				event.preventDefault();
328
329				return false;
330
331		   }
332
333		   else
334
335		   {
336
337				var temp = 1;
338
339				$.post(common_prev_slashes+"csv-next.php",{s:s,temp:temp},function(result){
340
341					var url = common_prev_slashes+'search-result.php?s='+s;
342
343					window.location = url;
344
345				});
346
347		   }
348
349		}
350
351	});
352
353	//Search Engine End
354
355	
356
357	//Search button Start
358
359	$(document).on('click','#button_h',function()
360
361	{
362
363		$(function() {
364
365			var e = $.Event('keypress');
366
367			e.which = 13; // Character 'A'
368
369			$('#project').trigger(e);
370
371		});
372
373	});
374
375	//Search button End
376
377		
378
379	$(document).on('click','.cross-icon',function()
380
381	{
382
383		//$('#project_s').focus();
384
385		//$(".custom_search").removeClass("d-none");
386
387		setTimeout(function(){ $( "#project_s" ).trigger( "click" ); }, 100);
388
389		var c_this = $(this);
390
391		var c_id = c_this.attr('class').split(' ').pop();
392
393		//alert(c_id)
394
395		var temp = 1;
396
397
398
399		$.ajax({
400
401			type:'POST',
402
403			url:common_prev_slashes+'remove_csv.php',
404
405			data:{c_id:c_id,temp:temp},
406
407			success:function(html)
408
409			{
410
411				var count = c_this.parents('.recent_search').find("li").length;
412
413				//alert(c_id+' - '+ count);
414
415				c_this.parent('li').remove();
416
417				if(count == 1)
418
419				{
420
421					$('.recent_search').remove();
422
423					$('.search_divider').remove();
424
425				}
426
427			}
428
429		});
430
431
432
433	});
434
435	
436
437	//For Header Section End
438
439	//Sign Up Form Start
440
441	$(document).on('click','#signup_but',function()
442
443	{
444
445		$("#signup_form").find("#signup_span").hide();
446
447		$("#signup_form").append('<span class="loader _b">&nbsp;</span>');
448
449		$("#signup_form").find(".error_message").remove();		
450
451		$("#signup_form").find(".password").removeClass("error");
452
453		$("#signup_form").find(".profession").removeClass("error");
454
455		$("#signup_form").find(".profession_other").removeClass("error");
456
457		$("#signup_form").find(".email").removeClass("error");
458
459		$("#signup_form").find(".user").removeClass("error");
460
461		
462
463		var count_bug=0;
464
465		
466
467		var pswd = $('#validationTooltip04').val();
468
469		//var regularExpression = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]/;
470
471		var regularExpression = "^(?=.*[A-Z])(?=.*\\d)(?=.*[-+_!@#$%^&*.,?]).+$";
472
473		if (pswd == "")
474
475		{
476
477			$("#signup_form").find(".password").addClass("error");
478
479			//$("#signup_form").find(".password").after('<span class="error_message">Your new password must be at least 8 chararacters long</span>');
480
481			$("#signup_form").find(".password").after('<span class="error_message">Required</span>');
482
483			document.signup_form.validationTooltip04.focus();
484
485			if(eval(count_bug)==0)			
486
487			count_bug+=1;
488
489		}		
490
491		else if(pswd.length <= 7)
492
493		{
494
495			$("#signup_form").find(".password").addClass("error");
496
497			$("#signup_form").find(".password").after('<span class="error_message">Minimum 8 characters required for password.</span>');
498
499			//$("#signup_form").find(".password").after('<span class="error_message">Required</span>');
500
501			document.signup_form.validationTooltip04.focus();
502
503			if(eval(count_bug)==0)			
504
505			count_bug+=1;
506
507		}
508
509		else if(!(pswd.match(regularExpression)))
510
511		{
512
513			$("#signup_form").find(".password").addClass("error");
514
515			$("#signup_form").find(".password").after('<span class="error_message">Password must be contains one capital letter, one digit and one special character.</span>');
516
517			//$("#signup_form").find(".password").after('<span class="error_message">Required</span>');
518
519			document.signup_form.validationTooltip04.focus();
520
521			if(eval(count_bug)==0)			
522
523			count_bug+=1;
524
525		}
526
527		
528
529		/*if (document.signup_form.validationTooltip03.value=="")
530
531		{	
532
533			$("#signup_form").find(".profession").addClass("error");
534
535			document.signup_form.validationTooltip03.focus();
536
537			if(eval(count_bug)==0)			
538
539			count_bug+=1;
540
541		}
542
543		else if((document.signup_form.validationTooltip03.value == 'Specialist Consultant') || (document.signup_form.validationTooltip03.value == 'Other'))
544
545		{
546
547		
548
549			if (document.signup_form.validationTooltip05.value.trim() =="")
550
551			{	
552
553				$("#signup_form").find(".profession_other").addClass("error");
554
555				document.signup_form.validationTooltip05.focus();
556
557				if(eval(count_bug)==0)			
558
559				count_bug+=1;
560
561			}
562
563			else
564
565    		{
566
567        		var c_p_other = $( "#validationTooltip05" ).val();
568
569        		var check_c_p_other = validURL(c_p_other);
570
571        		//alert(check_c_p_other);
572
573        		if(check_c_p_other == false)
574
575        		{
576
577        		    //do nothing
578
579        		}
580
581        		else
582
583        		{
584
585    				$("#signup_form").find(".profession_other").addClass("error");
586
587    				document.signup_form.validationTooltip05.focus();
588
589    				if(eval(count_bug)==0)			
590
591    				count_bug+=1;
592
593        		}
594
595    		}
596
597			
598
599		}*/
600
601		
602
603		if (document.signup_form.validationTooltip02.value=="")
604
605		{
606
607			$("#signup_form").find(".email").addClass("error");
608
609			$("#signup_form").find(".email").after('<span class="error_message">Required</span>');	
610
611			document.signup_form.validationTooltip02.focus();
612
613
614			if(eval(count_bug)==0)			
615
616			count_bug+=1;
617
618		}
619		else
620		{
621
622			$( "#validationTooltip02" ).change();
623
624			var emailIn = $( "#validationTooltip02" ).val();
625
626			var check_email = check_email_now(emailIn);			
627
628
629
630			//alert(check_email);
631
632			if(check_email == false)
633
634			{		
635
636					count_bug+=1;
637
638			}
639		}
640
641		
642
643		if (document.signup_form.validationTooltip01.value=="")
644
645		{
646
647			$("#signup_form").find(".user").addClass("error");
648
649			$("#signup_form").find(".user").after('<span class="error_message">Required</span>');	
650
651			document.signup_form.validationTooltip01.focus();			
652
653			if(eval(count_bug)==0)			
654
655			count_bug+=1;
656
657		}
658
659		else
660
661		{
662
663    		var c_user = $( "#validationTooltip01" ).val();
664
665    		var check_c_p_user = validURL(c_user);
666
667    		//alert(check_c_p_user);
668
669    		if(check_c_p_user == false)
670
671    		{
672
673    		    //do nothing
674
675    		}
676
677    		else
678
679    		{
680
681    			$("#signup_form").find(".user").addClass("error");
682
683    			document.signup_form.validationTooltip01.focus();			
684
685    			if(eval(count_bug)==0)			
686
687    			count_bug+=1;
688
689    		}
690
691		}
692
693		
694
695		/*if(signup_form.customCheck.checked == false) 
696
697		{			
698
699			//$("#signup_form").find("#customCheck").parent(".custom-checkbox").after('<span class="error_message">Please agree with the terms of use and privacy policy.</span>');			
700
701			$("#signup_form").find("#customCheck").parent(".custom-checkbox").after('<span class="error_message">Required</span>');			
702
703			if(eval(count_bug)==0)			
704
705			count_bug+=1;
706
707		}
708
709		else
710
711		{
712
713			$("#signup_form").find("#customCheck").parent(".custom-checkbox").find(".error_message").remove();
714
715		}
716
717        
718
719        if(signup_form.stirfri_check.checked == true)*/
720
721		var stirfri_var = true;
722
723		if(stirfri_var == true)
724
725        {
726
727            var sf_pref = multiple_values('sf_pref');
728
729            if(sf_pref == '')
730
731            {
732
733                $("#signup_form").find(".prefrences_setting").append('<span class="mb-0 error_message error_msg">Required</span>');			
734
735                if(eval(count_bug)==0)			
736
737                count_bug+=1;
738
739            }
740
741        }
742
743		
744
745		
746
747		if(count_bug == 0)
748
749		{			
750
751			uname = document.signup_form.uname.value;
752
753			email = document.signup_form.email.value;
754
755			pass = document.signup_form.pass.value;
756
757			/*sources = document.signup_form.sources.value;
758
759			
760
761			if($.inArray('Other', sources) !== -1) 
762
763			{
764
765				p_other = document.signup_form.p_other.value;
766
767			}
768
769			else if($.inArray('Specialist Consultant', sources) !== -1) 
770
771			{
772
773				p_other = document.signup_form.p_other.value;
774
775			}
776
777			else
778
779			{
780
781				p_other = '';
782
783			}*/
784
785			sources = '';
786
787			p_other = '';
788
789			
790
791            //alert(sf_pref)
792
793			//if(signup_form.stirfri_check.checked == false) 
794
795			if(stirfri_var == false)
796
797			{			
798
799				stirfri_check = 'no';
800
801			}
802
803			else
804
805			{		
806
807				stirfri_check = 'yes';
808
809			}
810
811            //alert(stirfri_check);
812
813			$.post(stir_prev_slashes+"register-next.php",{email:email,pass:pass,uname:uname,sources:sources,p_other:p_other,stirfri_check:stirfri_check,sf_pref:sf_pref},function(result){
814
815            //alert(result);
816				if(result == 'ok')
817
818				{
819
820					$('#signup_popup').fadeOut('fast');
821
822					$(".vc_email_text").html(''+email+'');
823
824					
825
826					$('#verify_email_popup').fadeIn('slow');
827
828					//$("#vc_email").val(email);
829
830					
831
832					document.signup_form.uname.value = '';
833
834					document.signup_form.email.value = '';
835
836					document.signup_form.pass.value = '';
837
838					document.signup_form.p_other.value = '';
839
840					
841
842					//$("#s_profession").val('').trigger("liszt:updated");
843
844					$("#s_profession").val('');
845
846					$(".profession_other" ).fadeOut('slow');	
847
848					//setTimeout(function(){ $('.success').fadeOut();$('.success').remove(); }, 8000);
849
850					//event.stopPropagation();
851
852					//event.preventDefault();
853
854					$("#signup_form").find('._b').remove();
855
856					$("#signup_form").find("#signup_span").show();
857
858				}
859
860				else
861
862				{
863
864			         $("#signup_form").find("#customCheck").parent(".custom-checkbox").after(result);
865
866				}
867
868			});
869
870		}			
871
872		else
873
874		{
875
876			$("#signup_form").find('._b').remove();
877
878			$("#signup_form").find("#signup_span").show();
879
880			event.stopPropagation();
881
882
883			event.preventDefault();
884
885			return false;
886
887		}
888
889	});
890
891	
892
893	//Sign Up form End
894
895	
896
897	//Check Email Start
898
899	
900
901		$( "#validationTooltip02" ).change(function() 
902
903		{
904
905			$("#signup_form").find(".email").removeClass("error");
906
907			$("#signup_form").find(".email").next(".error_message").remove();
908
909			
910
911			var emailIn = $( "#validationTooltip02" ).val();
912
913			
914
915			var uname = $( "#validationTooltip01" ).val();			
916
917			
918
919			var check_email = check_email_now(emailIn);			
920
921			
922
923
924			if(check_email == false)
925
926			{
927
928				if(uname == '')
929
930				{	
931
932					$("#signup_form").find(".email").find(".error_message").remove();		
933
934					$("#signup_form").find(".user").addClass("error");
935
936					$("#signup_form").find(".email").addClass("error");	
937
938					//$("#signup_form").find(".email").after('<span class="error_message">Required</span>');	
939
940					document.signup_form.validationTooltip01.focus();
941
942					document.signup_form.validationTooltip02.focus();
943
944				}
945
946				
947
948				/*else if(emailIn == '')
949
950				{					
951
952					$("#signup_form").find(".email").find(".error_message").remove();			
953
954					$("#signup_form").find(".email").addClass("error");
955
956					$("#signup_form").find(".email").after('<span class="error_message">Invalid Email Id</span>');	
957
958					document.signup_form.validationTooltip02.focus();
959
960				}*/
961
962				if(emailIn != '')
963
964				{					
965
966					$("#signup_form").find(".email").find(".error_message").remove();		
967
968					$("#signup_form").find(".email").addClass("error");			
969
970					$("#signup_form").find(".email").after('<span class="error_message">Invalid Email Id</span>');	
971
972					//$(".email").append("<div class='invalid-tooltip' style='display:block' >Invalid Email Id</div>");	
973
974					document.signup_form.validationTooltip02.focus();
975
976					//$( "#validationTooltip02" ).val('');
977
978				}
979
980			}
981
982			else
983
984			{			
985
986				$.ajax({
987
988					type:'POST',
989
990					data:{email:emailIn},
991
992					url:common_prev_slashes+'check_email.php',
993
994					success:function(returnedData)
995
996					{
997						//alert(returnedData);
998
999						if(returnedData == 1)
1000
1001						{
1002
1003							$("#signup_form").find(".email").find(".error_message").remove();	
1004
1005							$("#signup_form").find(".email").addClass("error");
1006
1007							$("#signup_form").find(".email").after('<span class="error_message">Email Id already exist</span>');
1008
1009							document.signup_form.validationTooltip02.focus();
1010
1011							$( "#validationTooltip02" ).val('');
1012
1013						}
1014
1015						else
1016
1017						{
1018
1019							return true;
1020
1021						}
1022
1023					}
1024
1025				});
1026
1027			}
1028
1029		});
1030
1031	//Check Email End
1032
1033
1034
1035	//Login Form Start
1036
1037			
1038
1039	$('#login_but').on("click",function() 
1040
1041	{
1042
1043		event.preventDefault();
1044
1045		$("#login_form").find("#login_but").hide();
1046
1047		$("#login_but").after('<span class="loader _w m-0">&nbsp;</span>');
1048
1049		$("#login_form").find(".password").removeClass("error");
1050
1051		$("#login_form").find(".email").removeClass("error");
1052
1053		$("#login_form").find(".error_message").remove();
1054
1055		var count_bug=0;
1056
1057            //alert(count_bug)
1058
1059		//alert(document.login_form.password.value);
1060
1061		if (document.login_form.password.value=="")
1062
1063		{			
1064
1065			$("#login_form").find(".password").addClass("error");
1066
1067			$("#login_form").find(".password").after('<span class="error_message">Required</span>');	
1068
1069			document.login_form.password.focus();
1070
1071			if(eval(count_bug)==0)			
1072
1073			count_bug+=1;
1074
1075		}
1076
1077		
1078
1079		if (document.login_form.email.value=="")
1080
1081		{			
1082
1083			$("#login_form").find(".email").addClass("error");
1084
1085			$("#login_form").find(".email").after('<span class="error_message">Required</span>');
1086
1087			document.login_form.email.focus();
1088
1089			if(eval(count_bug)==0)			
1090
1091			count_bug+=1;
1092
1093		}
1094
1095		else
1096
1097		{			
1098
1099			var emailIn = $( "#email" ).val();					
1100
1101			
1102
1103			var check_email = check_email_now(emailIn);	
1104
1105			
1106
1107			if(check_email == false)
1108
1109			{				
1110
1111				$("#login_form").find(".email").addClass("error");
1112
1113				$("#login_form").find(".email").after('<span class="error_message">Invalid Email Id</span>');
1114
1115				document.login_form.email.focus();	
1116
1117				count_bug+=1;
1118
1119			}
1120
1121		}
1122
1123            //alert(count_bug)
1124
1125		
1126
1127		if(count_bug == 0)
1128
1129		{
1130
1131            //alert(count_bug)
1132
1133			email = document.login_form.email.value;
1134
1135			password = document.login_form.password.value;
1136
1137			$.post(stir_prev_slashes+"login-next.php",{email:email,password:password},function(result){
1138
1139				$("#login_form").find('.loader._w').remove();
1140
1141				//$('._w').remove();
1142
1143				$("#login_form").find(".error_message").html(result);
1144
1145				$("#login_form").find(".password").after('<span class="error_message">'+result+'</span>');
1146
1147				$("#login_form").find("#login_but").show();
1148
1149				//setTimeout(function(){ $('.error_message').fadeOut();$('.error_message').remove(); }, 3000);
1150
1151				//event.stopPropagation();
1152
1153				//event.preventDefault();
1154
1155			});
1156
1157		}			
1158
1159		else
1160
1161		{
1162
1163			$("#login_form").find('.loader._w').remove();
1164
1165			//$('._w').remove();
1166
1167			$("#login_form").find("#login_but").show();
1168
1169			event.stopPropagation();
1170
1171			event.preventDefault();
1172
1173			return false;
1174
1175		}
1176
1177			
1178
1179	});
1180
1181	
1182
1183	//Login form End
1184
1185	
1186	//Forgot Password Form Start
1187
1188			
1189
1190	$('#confirm_but').on("click",function() 
1191
1192	{
1193
1194		event.preventDefault();
1195
1196		$("#forgot_form").find("#confirm_but").hide();
1197
1198		$("#forgot_form").append('<span class="loader _w">&nbsp;</span>');
1199
1200		$("#forgot_form").find(".email").removeClass("error");
1201
1202		$("#forgot_form").find(".error_message").remove();
1203
1204		
1205
1206		var count_bug=0;
1207
1208		
1209
1210		if (document.forgot_form.email.value=="")
1211
1212		{			
1213
1214			$("#forgot_form").find(".email").addClass("error");
1215
1216			$("#forgot_form").find(".email").after('<span class="error_message">Required</span>');
1217
1218			document.forgot_form.email.focus();
1219
1220			if(eval(count_bug)==0)			
1221
1222			count_bug+=1;
1223
1224		}
1225
1226		else
1227
1228		{
1229
1230			
1231
1232			var emailIn = $( "#email_f" ).val();		
1233
1234			
1235
1236			var check_email = check_email_now(emailIn);			
1237
1238			
1239
1240			//alert(check_email);
1241
1242			if(check_email == false)
1243
1244			{				
1245
1246				$("#forgot_form").find(".email").addClass("error");
1247
1248				$("#forgot_form").find(".email").after("<span class='error_message'>Invalid Email Id</span>");
1249
1250				document.forgot_form.email.focus();	
1251
1252				count_bug+=1;
1253
1254			}
1255
1256		}
1257
1258		//alert(count_bug);
1259
1260		if(count_bug == 0)
1261
1262		{
1263
1264			email = document.forgot_form.email.value;
1265
1266			$.post(stir_prev_slashes+"forgot-next.php",{email:email},function(result){
1267
1268				$("#forgot_form").find('._w').remove();
1269
1270				//$('._w').remove();
1271
1272				//alert(result);
1273
1274				if(result == 'ok')
1275
1276				{
1277
1278					$("#forgot_form").find('.loader._w').remove();
1279
1280					$("#forgot_form").find("#confirm_but").show();
1281
1282					$("#forgot_password").hide();	
1283
1284					$('#check_inbox').attr('style','display: block');
1285
1286					$('#check_inbox').find('.pop_container').attr('style','display: block');
1287
1288					$("#check_inbox").find("#forgor_text").html("We just sent a link to reset your password via email to "+email+".");
1289
1290					
1291
1292					//$("#prefrence_popup").css("display", "block !important");	
1293
1294				}
1295
1296				else
1297
1298				{
1299
1300					$("#forgot_form").find(".email").after(result);
1301
1302					$("#forgot_form").find("#confirm_but").show();
1303
1304				}
1305
1306				//setTimeout(function(){ $('.error_message').fadeOut();$('.error_message').remove(); }, 3000);
1307
1308				//event.stopPropagation();
1309
1310				//event.preventDefault();
1311
1312			});
1313
1314		}			
1315
1316		else
1317
1318		{
1319
1320			$("#forgot_form").find('.loader._w').remove();
1321
1322			//$('._w').remove();
1323
1324			$("#forgot_form").find("#confirm_but").show();
1325
1326			event.stopPropagation();
1327
1328			event.preventDefault();
1329
1330			return false;
1331
1332		}
1333
1334			
1335
1336	});
1337
1338	
1339
1340	//Forgot Password form End
1341
1342$(document).keydown(function(e) {
1343  if (e.keyCode === 27) { // 27 is the keycode for the Escape key
1344	  $(".head_popup").fadeOut("fast"), $("#main_header a").removeClass("open"), $("body").css("overflow", "visible")
1345  }
1346});
1347
1348
1349
1350//google Login start here
1351
1352$(document).on('click','.g_signout',function()
1353
1354{
1355
1356	var auth2 = gapi.auth2.getAuthInstance();
1357
1358	auth2.signOut();  
1359
1360	jQuery.ajax({
1361
1362				url:stir_prev_slashes+'logout.php',
1363
1364				success:function(result){
1365
1366						//window.location.href="index.php";
1367
1368						//window.location.reload();
1369
1370				}
1371
1372		});
1373
1374	
1375
1376});
1377
1378
1379
1380function onLoad(){
1381
1382	   gapi.load('auth2',function (){
1383
1384			  gapi.auth2.init();
1385
1386	   }); 
1387
1388}
1389
1390/*
1391
1392function gmailLogIn(userInfo){
1393
1394		var userProfile=userInfo.getBasicProfile();
1395
1396		
1397
1398		
1399
1400		jQuery.ajax({
1401
1402				url:'glogin_check.php',
1403
1404				type:'post',
1405
1406				data:'oauth_uid='+userProfile.getId()+'&name='+userProfile.getName()+'&image='+userProfile.getImageUrl()+'&email='+userProfile.getEmail(),
1407
1408				success:function(result){
1409
1410						//window.location.href="index.php";
1411
1412						if(result == 'done')
1413
1414						{
1415
1416							window.location.reload();
1417
1418						}
1419
1420				}
1421
1422		});
1423
1424}
1425
1426*/
1427
1428function gmailLogIn(userInfo){
1429
1430		var userProfile=userInfo.getBasicProfile();
1431
1432		
1433
1434		var oauth_uid = userProfile.getId();
1435
1436		var name = userProfile.getName();
1437
1438		var image = userProfile.getImageUrl();
1439
1440		var email = userProfile.getEmail();
1441
1442    	userInfo.disconnect();
1443
1444		jQuery.ajax({
1445
1446				url:stir_prev_slashes+'glogin_check.php',
1447
1448				type:'post',
1449
1450				data:'oauth_uid='+oauth_uid+'&name='+name+'&image='+image+'&email='+email,
1451
1452				success:function(result){
1453
1454						//window.location.href="index.php";
1455
1456						if(result == 'done1')
1457
1458						{
1459
1460						    //var mobi_x_stir = $.cookie("mobi_x_stir");
1461
1462						    //alert(mobi_x_stir);
1463
1464						    /*if(mobi_x_stir == 'yes')
1465
1466						    {
1467
1468				                document.cookie = "mobi_x_stir=''; expires=Wed, 12 Jun 2024 23:00:00 UTC";
1469
1470						    }
1471
1472						    else
1473
1474						    {
1475
1476							    window.location.reload();
1477
1478						    }*/
1479
1480                            window.location='https://mubi.com/en/stir';
1481
1482						}
1483
1484						else
1485
1486						{
1487
1488							    window.location.reload();
1489
1490						}
1491
1492				}
1493
1494		});
1495
1496}
1497
1498//google Login End here

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.