PageSourceSearch

https://www.acmefineart.com/mm5/js/custom.js

js acmefineart.com collected 2026-10-02 10:51:47 UTC 4,310 bytes, 269 lines download raw bytes

1var MivaMerchantDesign = {
2
3		init: function () {
4
5		// Don't Edit From Here ------>
6		
7		var mivaPageCode = document.body.id;
8
9		String.prototype.toCamelCase = function () {
10
11			return this.replace(/(\-[a-z])/g, function ($1) {
12
13				return $1.toUpperCase().replace('-', '');
14			});
15
16		};
17
18		mivaPageCode = mivaPageCode.toCamelCase();
19
20		if (MivaMerchantDesign[mivaPageCode]) {
21
22			$(document).ready(function () {
23
24				MivaMerchantDesign[mivaPageCode]();
25
26			}); // ---- If the function exists, run it, otherwise, don't do anything. ---- //
27
28		};
29
30		// <----- To Here
31
32		$(document).ready(function () {
33
34		// ---- Back to Top Controls ---- //
35
36			function backToTop () {
37
38				var chaser = $('.totop');
39
40				windowHeight = $(window).height();
41
42				if (chaser) {
43
44					$(window).scroll(function() {
45
46						if ($(window).scrollTop() >= windowHeight / 2) {
47
48
49							chaser.fadeIn();
50
51						}
52
53						else {
54
55
56							chaser.hide();
57
58						};
59					});
60
61					chaser.find('a').on('click', function (e) {
62
63						e.preventDefault();
64
65						$('html, body').animate({scrollTop: '0px'}, 800);
66
67					});
68
69				};
70
71			};
72
73			var backToTop = new backToTop;
74
75		});
76
77	},
78
79
80	JS_SFNT: function () {
81	
82
83	},
84
85	JS_CTGY: function () {
86
87	},
88
89
90	JS_PROD: function () {
91
92
93	},
94
95	
96
97	JS_PATR: function () {
98
99	},
100
101	
102
103	JS_BASK: function () {
104
105	
106	},
107
108	
109
110	JS_ACAD: function () {
111
112		$('#acad_form').find('select').addClass('form-control');
113
114	},
115
116	
117
118	JS_ACED: function () {
119
120		$('#aced_form').find('select').addClass('form-control');
121
122	},
123
124	
125
126	JS_AFAD: function () {
127
128		$('#afad_form').find('select').addClass('form-control');
129
130	},
131
132	
133
134	JS_AFED: function () {
135
136		$('#afed_form').find('select').addClass('form-control');
137
138	},
139
140	
141
142	JS_CTUS: function () {
143	// ---- Additional Server Security To Help Against Spambots ---- //
144		var contactForm = $('#contact-form');
145		$('#noscript-warning').remove();
146		contactForm.removeClass('hidden');
147		$.get('forms/token.php', function (tkn) {
148			contactForm.append('<input type="hidden" name="mms" value="' + tkn + '" />');
149		});
150		
151	// ---- Form Validation ---- //
152		contactForm.validate({
153			errorContainer: '#contact-form div.error-message',
154			errorLabelContainer: '#contact-form div.error-message ul',
155			errorElement: 'li',
156			rules: {
157				contactName: {required: true, minlength: 2},
158				contactEmail: {required: true, email: true},
159				contactComment: {required: true, minlength: 2}
160			},
161			messages: {
162				contactName: {required: 'Your Name Is Required', minlength: jQuery.validator.format('Your Name must be a minimum of {0} characters!')},
163				contactEmail: {required: 'Your Email Address Is Required', email: 'Your Email Address must be formatted like [email protected]'},
164				contactComment: {required: 'Comments or Questions Are Required', minlength: jQuery.validator.format('Your Message must be a minimum of {0} characters!')}
165			},
166			highlight: function (element, errorClass) {
167				$(element.form).find('label[for=' + element.id + ']').addClass(errorClass);
168			},
169			unhighlight: function (element, errorClass) {
170				$(element.form).find('label[for=' + element.id + ']').removeClass(errorClass);
171			}
172		});
173	},
174
175	
176
177	JS_AFCL: function () {
178
179	},
180
181	
182
183	JS_LOGN: function () {
184
185	},
186
187	
188
189	JS_ORDL: function () {
190
191	},
192
193	
194
195	JS_ORHL: function () {
196
197	},
198
199	
200
201	JS_OCST: function () {
202
203		$('#ocst_form').find('select').addClass('form-control');
204
205
206
207		if ($('#shipping_controls').is(':visible')) {
208
209			if ($('#shipping_to_show').is(':checked')) {
210
211				$('#shipping_fields').hide();
212
213			};
214
215			$('#shipping_to_show').on('change', function () {
216
217				$('#shipping_fields').toggle();
218
219			});
220
221		};
222
223		if ($('#billing_controls').is(':visible')) {
224
225			if ($('#billing_to_show').is(':checked')) {
226
227				$('#billing_fields').hide();
228
229			};
230
231			$('#billing_to_show').on('change', function () {
232
233				$('#billing_fields').toggle();
234
235			});
236
237		};
238
239	},
240
241	
242
243	JS_OSEL: function () {
244
245	},
246
247	
248
249	JS_OPAY: function () {
250
251		$('#opay-form').find('input[type="text"]').addClass('form-control');
252
253		$('#opay-form').find('select').addClass('form-control').wrap('<div class="col-md-6"></div>');
254
255		$('#opay-form').find('#js-cc_exp select').first().find('option:first').text('Month');
256
257		$('#opay-form').find('#js-cc_exp select').last().find('option:first').text('Year');
258
259	},
260
261	
262
263	JS_INVC: function () {
264
265	}
266
267};
268
269MivaMerchantDesign.init();

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.