PageSourceSearch

https://www.portretprijs.nl/assets/js/JavaScript.js?v=1790980807

js portretprijs.nl collected 2026-10-02 22:40:25 UTC 16,529 bytes, 837 lines download raw bytes

1function fancyboxer()
2{
3	//rel == data-fancybox="images"
4	$(".Fancy")
5    .fancybox({
6
7        openEffect	: 'elastic',
8    	closeEffect	: 'elastic',
9    	loop: false,
10    });
11}
12
13
14
15var $grid = $('.grid').isotope({
16	itemSelector: '.grid-item',
17	layoutMode: 'masonry'
18});
19// layout Isotope after each image loads
20$grid.imagesLoaded().progress( function() {
21  $grid.isotope('layout');
22});
23
24var lazyLoadInstance = new LazyLoad({
25	callback_loaded: callback_loaded
26});
27
28var callback_loaded = function () {
29 $grid.isotope('layout');
30};
31
32function DoSearch()
33{
34	$.ajax(
35		{
36			url: "/zoeken/createlink",
37			dataType: 'json',
38			type: 'post',
39			data: {
40				'data' : $("#SearchInput").val()
41			},
42			success: function(data)
43			{
44				if(data!="")
45				{
46					window.location = "/zoeken/"+data;
47				}
48				else
49				{
50
51				}
52			}
53
54		});
55}
56
57function donate()
58{
59	$('#donate #step-2').hide();
60	$('#donate #step-3').hide();
61
62	$('#donate #to-1').click(function(){
63		$('#donate .steps a').removeClass('active');
64		$(this).addClass('active');
65		$('#donate #step-2').hide();
66		$('#donate #step-3').hide();
67		$('#donate #step-1').fadeIn(750);
68	});
69
70	$('#donate #to-2').click(function(){
71		$('#donate .steps a').removeClass('active');
72		$(this).addClass('active');
73		$('#donate #step-1').hide();
74		$('#donate #step-3').hide();
75		$('#donate #step-2').fadeIn(750);
76	});
77
78	$('#donate #to-3').click(function(){
79		$('#donate .steps a').removeClass('active');
80		$(this).addClass('active');
81		$('#donate #step-1').hide();
82		$('#donate #step-2').hide();
83		$('#donate #step-3').fadeIn(750);
84	});
85
86	$('#donate input').bind('change', function(){
87		var name = $(this).attr('name');
88		var value = $(this).val();
89		$('.'+name).html(value);
90	});
91
92}
93
94function getSearchResults($search)
95{
96	$("#BusySearching").show();
97		$.ajax(
98		{
99			url: "/zoeken/get_search_result/"+$search,
100		//	dataType: 'json',
101			type: 'post',
102			data: {
103
104			},
105			success: function(data)
106			{
107				$("#BusySearching").hide();
108				$("#SearchResultWrapper").html(data);
109			}
110
111		});
112}
113
114function readURL(input, vers) {
115
116	$('.messages').hide();
117
118	if (input.files && input.files[0]) {
119		const file = input.files[0];
120		const  fileType = file['type'];
121		const validImageTypes = ['image/gif', 'image/jpeg', 'image/png'];
122		if (validImageTypes.includes(fileType)) {
123			let sizeTU = 0;
124			sizeTU  += file.size;
125			sizeTU = sizeTU/1024/1024;
126			if(sizeTU>7) {
127				$('.image-file-'+vers+" .messages").html();
128			 	$('.image-file-'+vers+" .messages").html('<div class="alert alert-danger">Deze afbeelding is te groot, de afbeelding moet kleiner dan 7mb zijn.</div>');
129			 	input.value = null;
130			 	$('.image-file-'+vers+" .messages").show();
131			} else {
132			    var reader = new FileReader();
133			    reader.readAsDataURL(input.files[0]);
134			    reader.onload = function(e)
135				{
136					$('#ImagePrevPort'+vers).attr('src', e.target.result);
137					$('#ImagePrevPort'+vers).show();
138					$("#PortraitHolder"+vers).hide();
139					$("#FileTriggerrer"+vers).text("Wijzig portret");
140			    }
141
142			    reader.onerror = function (error) {
143				    console.log('Error: ', error);
144			    };
145			}
146
147
148		 } else {
149		 	$('.image-file-'+vers+" .messages").html();
150		 	$('.image-file-'+vers+" .messages").html('<div class="alert alert-danger">Geen geldige afbeelding, afbeelding moet in het formaat .jpeg, .jpg, .png of .gif zijn.</div>');
151		 	input.value = null;
152		 	$('.image-file-'+vers+" .messages").show();
153		 }
154		 
155	}
156
157}
158
159var contactWSBusy = false;
160var porttpye = "2d";
161
162function setPortType($select)
163{
164	porttpye = $($select).val();
165	console.log(porttpye);
166
167	if(porttpye=="2d")
168	{
169		$("#PaintingsFor3d").hide();
170	}
171	else
172	{
173		$("#PaintingsFor3d").show();
174	}
175}
176
177function createPortrait()
178{
179	var data = new FormData();
180	var data2 = new FormData();
181	var data3 = new FormData();
182
183	var sizeTU = 0;
184	$.each($("#ImageFilePort1")[0].files, function(i, file)
185	{
186		sizeTU  += file.size;
187		sizeTU = sizeTU/1024/1024;
188		if(sizeTU>7)
189		{
190			alert("Afbeelding is te groot, maximaal 7MB");
191		} else {
192			data.append('file-'+i, file);
193		}
194	});
195	
196
197	var sizeTU2 = 0;
198	$.each($("#ImageFilePort2")[0].files, function(i, file)
199	{
200		sizeTU2  += file.size;
201		sizeTU2 = sizeTU2/1024/1024;
202		if(sizeTU2>7)
203		{
204			alert("Tweede afbeelding te groot, maximaal 7MB");
205		}
206		else
207		{
208			data2.append('file-'+i, file);
209		}
210
211	});
212
213
214	var sizeTU3 = 0;
215	$.each($("#ImageFilePort3")[0].files, function(i, file)
216	{
217		sizeTU3  += file.size;
218		sizeTU3 = sizeTU3/1024/1024;
219		if(sizeTU3>7)
220		{
221			alert("Derde afbeelding te groot, maximaal 7MB");
222		}
223		else
224		{
225			data3.append('file-'+i, file);
226		}
227
228	});
229	//sizeTU = sizeTU/1024/1024;
230	if(sizeTU<=5&&sizeTU2<=5&&sizeTU3<=5)
231	{
232		if(!contactWSBusy)
233		{
234			$("#LoadingCreateWork").show();
235			contactWSBusy = true;
236			$("#CreatingWorkError").html("");
237			data.append('Game', $("#GamePort").val());
238			data.append('Name', $("#NamePort").val());
239			data.append('PortType', porttpye);
240			data.append('Desc', $("#DescPort").val());
241			data.append('Material', $("#MaterialPort").val());
242			data.append('Format', $("#PortFormat").val());
243			data.append('Paymethod', (typeof $("input[name=PayMethod]:checked").val()!="undefined")?$("input[name=PayMethod]:checked").val():"");
244			data.append('Terms', ($("#TermsCheckC").prop("checked"))?1:"");
245
246
247			$.ajax
248			({
249				url: "/profiel/create_work",
250				data: data,
251				cache: false,
252				contentType: false,
253				processData: false,
254				dataType: 'json',
255				type: 'POST',
256				success: function(result)
257				{
258
259					if(result.success)
260					{
261						//$("#AddWorkBtn").hide();
262
263						if(porttpye=="3d")
264						{
265							//Twee andere toevoegen
266							data2.append('Work',result.work);
267							data3.append('Work',result.work);
268							$.ajax
269							({
270								url: "/profiel/add_work_2",
271								data: data2,
272								cache: false,
273								contentType: false,
274								processData: false,
275								dataType: 'json',
276								type: 'POST',
277								success: function(result2)
278								{
279									$.ajax
280									({
281										url: "/profiel/add_work_3",
282										data: data3,
283										cache: false,
284										contentType: false,
285										processData: false,
286										dataType: 'json',
287										type: 'POST',
288										success: function(result3)
289										{
290											if(result3.success)
291											{
292												$("#LoadingCreateWork").hide();
293												$("#AddWorkBtn").hide();
294												$("#CreatingWorkError").html(result.msg);
295												contactWSBusy = false;
296												setTimeout(function()
297												{
298													window.location = result.link;
299												},1000);
300											}
301										}
302									});
303								}
304							});
305
306						}
307						else
308						{
309							$("#LoadingCreateWork").hide();
310							$("#AddWorkBtn").hide();
311							$("#CreatingWorkError").html(result.msg);
312							contactWSBusy = false;
313							setTimeout(function()
314							{
315								window.location = result.link;
316							},1000);
317						}
318						//$("#ContactError").html(data.msg);
319
320
321						//window.location = "/portret-toegevoegd-hoe-verder";
322					}
323					else
324					{
325						$("#LoadingCreateWork").hide();
326						$("#CreatingWorkError").html(result.msg);
327						contactWSBusy = false;
328						//$("#CreatingWorkError").html(result.msg);
329					}
330				}
331			});
332		}
333	}
334	else
335	{
336		if(sizeTU>5)
337		{
338			alert("Bijlage is te groot, maximaal 5MB");
339		}
340	}
341}
342
343function createSelfie()
344{
345	var data = new FormData();
346	var data2 = new FormData();
347	var data3 = new FormData();
348
349	var sizeTU = 0;
350	$.each($("#ImageFilePort1")[0].files, function(i, file)
351	{
352
353
354		sizeTU  += file.size;
355		sizeTU = sizeTU/1024/1024;
356		if(sizeTU>5)
357		{
358			alert("Afbeelding is te groot, maximaal 5MB");
359		} else {
360			data.append('file-'+i, file);
361		}
362	});
363
364
365
366	if(sizeTU<=5)
367	{
368		if(!contactWSBusy)
369		{
370			$("#LoadingCreateWork").show();
371			contactWSBusy = true;
372			$("#CreatingWorkError").html("");
373			data.append('Game', $("#GamePort").val());
374			data.append('Name', $("#NamePort").val());
375			data.append('Alias', $("#AliasPort").val());
376			data.append('Email', $("#EmailPort").val());
377			data.append('Desc', $("#DescPort").val());
378			data.append('InstaUrl', $("#InstaUrlPort").val());
379			data.append('SelfieUrl', $("#SelfieUrlPort").val());
380			data.append('Terms', ($("#TermsCheckC").prop("checked"))?1:"");
381
382
383			$.ajax
384			({
385				url: "/profiel/create_selfie",
386				data: data,
387				cache: false,
388				contentType: false,
389				processData: false,
390				dataType: 'json',
391				type: 'POST',
392				success: function(result)
393				{
394
395					if (result.success) {
396						$("#LoadingCreateWork").hide();
397						$("#AddWorkBtn").hide();
398						$("#CreatingWorkError").html(result.msg);
399						contactWSBusy = false;
400						$(".selfie-form").hide();
401						$(".selfie-image").hide();
402					} else {
403						$("#LoadingCreateWork").hide();
404						$("#CreatingWorkError").html(result.msg);
405						$(".selfie-form").show();
406						$(".selfie-image").show();
407						contactWSBusy = false;
408					}
409				}
410			});
411		}
412	}
413}
414
415function triggerFile(vers)
416{
417	$("#ImageFilePort"+vers).click();
418}
419
420var isLoggin = false;
421
422function doResetForgot($h)
423{
424	if(!isLoggin)
425	{
426		isLoggin = true;
427		$("#LoadingLogin").show();
428		$.ajax(
429		{
430			url: "/profiel/ajax_resetforgot",
431			dataType: 'json',
432			type: 'post',
433			data: {
434				'Pass1' : $("#ForgotPass1").val(),
435				'Pass2' : $("#ForgotPass2").val(),
436				'Hash' : $h
437			},
438			success: function(data)
439			{
440				isLoggin = false;
441				$("#LoadingLogin").hide();
442				$("#LoginMessages").html(data.message);
443				if(data.success)
444				{
445					$("#ForgotPass1").val("");
446					$("#ForgotPass2").val("");
447					setTimeout(function()
448					{
449						window.location = "/mijn-profiel";
450					},1000)
451				}
452				else
453				{
454
455				}
456
457			},
458			error: function()
459			{
460				isLoggin = false;
461			}
462
463		});
464	}
465}
466function doForgot()
467{
468	if(!isLoggin)
469	{
470		isLoggin = true;
471		$("#LoadingLogin").show();
472		$.ajax(
473		{
474			url: "/profiel/ajax_forgot",
475			dataType: 'json',
476			type: 'post',
477			data: {
478				'Email' : $("#ForgotEmail").val()
479			},
480			success: function(data)
481			{
482				isLoggin = false;
483				$("#LoadingLogin").hide();
484				$("#LoginMessages").html(data.message);
485				if(data.success)
486				{
487					$("#ForgotEmail").val("");
488					/*setTimeout(function()
489					{
490						window.location = "/mijn-profiel";
491					},1000)*/
492				}
493				else
494				{
495
496				}
497
498			},
499			error: function()
500			{
501				isLoggin = false;
502			}
503
504		});
505	}
506}
507
508$("#ForgotEmail").keyup(function(event) {
509    if (event.keyCode === 13) {
510        doForgot();
511    }
512});
513function doLogin()
514{
515	if(!isLoggin)
516	{
517		isLoggin = true;
518		$("#LoadingLogin").show();
519		$.ajax(
520		{
521			url: "/profiel/ajax_login",
522			dataType: 'json',
523			type: 'post',
524			data: {
525				'Email' : $("#LoginEmail").val(),
526				'Password' : $("#LoginPass").val()
527			},
528			success: function(data)
529			{
530				isLoggin = false;
531				$("#LoadingLogin").hide();
532				$("#LoginMessages").html(data.message);
533				if(data.success)
534				{
535					$("#LoginEmail").val("");
536					$("#LoginPass").val("");
537					setTimeout(function()
538					{
539						window.location = "/mijn-profiel";
540					},1000)
541				}
542				else
543				{
544					$("#LoginPass").val("");
545				}
546
547			},
548			error: function()
549			{
550				isLoggin = false;
551			}
552
553		});
554	}
555}
556
557$("#LoginEmail").keyup(function(event) {
558    if (event.keyCode === 13) {
559        doLogin();
560    }
561});
562
563$("#LoginPass").keyup(function(event) {
564    if (event.keyCode === 13) {
565        doLogin();
566    }
567});
568
569function doRegister()
570{
571	if(!isLoggin)
572	{
573		isLoggin = true;
574		$("#LoadingRegister").show();
575		$.ajax(
576		{
577			url: "/profiel/ajax_register",
578			dataType: 'json',
579			type: 'post',
580			data: {
581				'Letters' : $("#RegLetters").val(),
582				'LastName' : $("#RegLastName").val(),
583				'Email' : $("#RegEmail").val(),
584				'BirthDate' : $("#RegBirthdate").val(),
585				'Address' : $("#RegAddress").val(),
586				'Zipcode' : $("#RegZipcode").val(),
587				'City' : $("#RegCity").val(),
588				'Phone' : $("#RegPhone").val(),
589				'Password' : $("#RegPassword").val(),
590				'Terms' : ($("#TermsCheck").prop("checked"))?"1":"",
591			},
592			success: function(data)
593			{
594				isLoggin = false;
595				$("#LoadingRegister").hide();
596				$("#RegisterMessages").html(data.message);
597				if(data.success)
598				{
599					setTimeout(function()
600					{
601						window.location = "/bedankt-registreren";
602					},1000)
603				}
604
605			},
606			error: function()
607			{
608				isLoggin = false;
609			}
610
611		});
612	}
613}
614
615function signUpForNewsLetter()
616{
617	$.ajax(
618		{
619			url: "/contact/sign_for_newsletter",
620			dataType: 'json',
621			type: 'post',
622			data: {
623				'email' : $("#EmailForNewsLetter").val()
624			},
625			success: function(data)
626			{
627				if(data.success)
628				{
629					$("#NewsLetterFormFooterError").hide();
630					$("#NewsLetterForm").slideUp();
631					$("#SuccesSignFooterForm").slideDown();
632				}
633				else
634				{
635					$("#NewsLetterFormFooterError").show();
636				}
637			}
638
639		});
640}
641
642
643
644function showAddToCart()
645{
646	$('html, body').animate({
647        scrollTop: $("header").offset().top
648    }, 500, function()
649	{
650		$("#MiniCartWrapper").addClass("Active");
651		setTimeout(function(){ $("#MiniCartWrapper").removeClass("Active"); }, 3000);
652		//animate end
653		$("#AmountInCart").addClass("animated bounce");
654	});
655}
656
657function sisowRadio()
658{
659	$("#SisowPayMethods div.radio").click(function()
660	{
661			$("#SisowPayMethods div.radio").each(function()
662			{
663				$(this).removeClass("Active");
664			});
665			$(this).addClass("Active");
666	});
667}
668
669function sliders()
670{
671	if($('.horizontal-slider').length>0)
672	{
673		$('.horizontal-slider').bxSlider({
674			mode: 'horizontal',
675			captions: false,
676			pager: false,
677			speed: 500,
678			nextText: "",
679			prevText: "",
680			pause: 5000,
681			auto: true,
682			onSliderLoad: function(){
683	        $(".horizontal-slider").css("opacity", "1");
684	      }
685		});
686	}
687
688	$('.header-slider').bxSlider({
689			mode: 'horizontal',
690			captions: false,
691			pager: false,
692			speed: 500,
693			nextText: "",
694			prevText: "",
695			pause: 5000,
696			auto: true,
697			onSliderLoad: function(){
698
699	      }
700		});
701
702	$('.horizontal-multiple').bxSlider({
703		mode: 'horizontal',
704		captions: false,
705		pager: true,
706		speed: 1500,
707		minSlides:2,
708		maxSlides:2,
709		slideWidth:900,
710		slideMargin:15,
711		nextText: "",
712		prevText: "",
713		pause: 7500,
714		auto: true,
715		onSliderLoad: function(){
716        $(".horizontal-slider").css("opacity", "1");
717        $('.bx-clone a').attr('data-fancybox', 'bx-cloned');
718      }
719	});
720
721}
722
723function sectionOnScreen()
724{
725	//if(!$('section').hasClass('no-animation')) {
726		$('section').onScreen({
727		   container: window,
728		   direction: 'vertical',
729		   doIn: function() {
730		   },
731		   doOut: function() {
732		     // Do something to the matched elements as they get off scren
733		   },
734		   tolerance: 0,
735		   throttle: 50,
736		   toggleClass: 'onScreen',
737		   lazyAttr: null,
738		   lazyPlaceholder: 'someImage.jpg',
739		   debug: false
740		})
741	//}
742}
743
744function toTop()
745{
746	$(".cd-top").html('<i class="fa fa-angle-up" aria-hidden="true"></i>');
747	$(window).scroll(function() {
748	    if ($(document).scrollTop() > 850) {
749	    	$(".cd-top").fadeIn(500);
750		} else {
751			$(".cd-top").fadeOut(500);
752		}
753	});
754}
755
756function scrollDown()
757{
758	var a = $('#header-slider').height();
759	var b = $('#prof-image').height();
760
761	$('#header-slider .arrow-down').on('click', function() {
762		$('html, body').animate({ scrollTop: a }, 500);
763	});
764
765	$('#prof-image .arrow-down').on('click', function() {
766		$('html, body').animate({ scrollTop: b }, 500);
767	});
768
769}
770
771function toggleMenu()
772{
773	$('.mob-menu').click(function(){
774		$(this).toggleClass('active');
775		$('.menu').toggleClass('active');
776	})
777}
778
779/* --------- Match Height ------ */
780
781equalheight = function(container){
782
783var currentTallest = 0,
784     currentRowStart = 0,
785     rowDivs = new Array(),
786     $el,
787     topPosition = 0;
788 $(container).each(function() {
789
790   $el = $(this);
791   $($el).height('auto')
792   topPostion = $el.position().top;
793
794   if (currentRowStart != topPostion) {
795     for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
796       rowDivs[currentDiv].height(currentTallest);
797     }
798     rowDivs.length = 0; // empty the array
799     currentRowStart = topPostion;
800     currentTallest = $el.height();
801     rowDivs.push($el);
802   } else {
803     rowDivs.push($el);
804     currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
805  }
806   for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
807     rowDivs[currentDiv].height(currentTallest);
808   }
809 });
810}
811
812$(window).load(function() {
813  equalheight('.mh');
814});
815
816
817$(window).resize(function(){
818  equalheight('.mh');
819});
820
821$(document).ready(function()
822{
823	fancyboxer();
824	sliders();
825	sectionOnScreen();
826	toTop();
827	scrollDown();
828	equalheight('.mh');
829	donate();
830	toggleMenu();
831
832	if(typeof searchfor !=="undefined")
833	{
834		getSearchResults(searchfor);
835	}
836
837});

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.