PageSourceSearch

https://www.aspiresoft.com/styles/responsive/sub/common.js?rev=20231022190833

js aspiresoft.com collected 2026-10-04 13:00:29 UTC 11,382 bytes, 321 lines download raw bytes

1/* DEFAULT Start */
2document.documentElement.className+=window.location==window.parent.location?" noiframe":" iframe",document.documentElement.setAttribute("data-host",location.hostname),function(){function a(){let a=document.documentElement.classList,b=JSON.parse(sessionStorage.getItem("debugClasses")||"[]"),c=(location.href.match(/[?#!&]class=([^&]+)/)||[])[1];"-"==c?(a.remove.apply(a,b),b=[]):c&&(b=c.split(/[\s,]+/).concat(b),b=Array.from(new Set(b))),sessionStorage.setItem("debugClasses",JSON.stringify(b)),a.add.apply(a,b),console.log("Debug HTML Classes",b)}a(),window.hashbangObserve&&window.hashbangObserve("class",a)}();
3/* DEFAULT End */
4/* GLOBAL FILE ================================*/
5$(document).ready(function() {
6	$('a[rel="tooltip"]').tooltip();
7	$('a[rel="popover"]').popover();
8	
9	// ====== dynamic placeholder START ======
10	function checkVal() {
11		$('.dynamic-placeholders input, .dynamic-placeholders textarea').each(function() {
12			if ( $(this).val() == '' ) {
13				$(this).removeClass('filled');
14			}
15			else {
16				$(this).addClass('filled');
17			}
18		});		
19	}
20	checkVal();
21	$('.dynamic-placeholders input, .dynamic-placeholders textarea').on('keyup blur', function() {
22		if ( $(this).val() == '' ) {
23			$(this).removeClass('filled');
24		}
25		else {
26			$(this).addClass('filled');
27		}
28		$(this).addClass('clicked');
29	});	
30	$('button[type="reset"]').on('click', function() {
31		$(this).closest('form').get(0).reset();
32		checkVal();	
33	});
34	$('.dynamic-placeholders label span.formRequired').each(function() {
35		$(this).closest('label').prev().attr('required','required');	
36	});
37	$('.dynamic-placeholders .form-error .xFormError').each(function() {
38		$(this).closest('.form-error').nextAll('input').addClass('not-valid');	
39		$(this).closest('.form-error').nextAll('.selectWrapper').addClass('not-valid');	
40	});
41	// ====== dynamic placeholder END ======	
42	
43	// ajax-loader
44	$('form').on('submit', function() {$('#ajax-loader').addClass('loading');});
45
46    if ($.browser.msie && parseInt($.browser.version) < 10) {
47
48		$('form').filter(function() {return $(":input[required='required']", this).length;})
49        	.on('submit',  function() {
50                var ret=!$(':input[required="required"]:visible', this).is(function() {
51                    var isEmpty=($(this).val() == '' || $(this).is('.defVal'));
52                    if (isEmpty) $(this).css({'border': '1px solid #E60000'});
53                    else $(this).css({'border': ''});
54                    return isEmpty;
55                });
56
57                // placeholders need this to return the placeholder text into fields
58                if (!ret) $(this).trigger("submitCancel");
59
60                return ret;
61        });
62
63        /* replacing placeholders with value for IE9- */
64        $(':input[placeholder]:not([placeholder=""]):not(select)').each(function() {
65            var $this = $(this);
66            var formCanceled=false;
67            var defVal = $this.attr('placeholder');
68            $this.data('placeholderText', defVal);
69
70            if ($this.attr('type') == 'password') { // create fake placehloder's text input
71                var $pass=$('<input type="text"/>');
72                $this.before($pass).hide();
73                $pass
74                    .val($this.attr('placeholder'))
75                    .attr('class', $this.attr('class'))
76                    .attr('placeholder', $this.attr('placeholder'))
77                    .attr('required', $this.attr('required'))
78                    .attr('style', $this.attr('style'))
79                    .addClass('inputPass defVal')
80                    .show();
81                $pass
82                    .focus(function() {
83                        $pass.hide();
84                        $this.show().focus();
85                    });
86            }
87
88            if ($this.val() == "") {
89                $this
90                    .val(defVal)
91                    .addClass('defVal');
92            }
93
94            $this
95                .focus(function() {
96                    if($this.is('.defVal')) {
97                        $this.val("").removeClass('defVal');
98                    }
99                })
100                .blur(function() {
101                    if(!$this.is('.defVal') && $this.val() == "") {
102                        $this.val(defVal).addClass('defVal');
103                        if ($this.is('[type="password"]')) { // Replace password with text field
104                            $this.hide();
105                            $pass.show();
106                        }
107                    }
108                });
109
110            $this.closest('form')
111                .off('submit.defVal submitCancel.defVal')
112                .on('submit.defVal', function() {
113                    if (formCanceled) {
114                        formCanceled=false;
115                        return;
116                    }
117                    $('.defVal', this).val('');
118                })
119                .on('submitCancel.defVal', function() {
120                    formCanceled=true;
121                    $('.defVal:not(.inputPass)', this).each(function() {
122                        $(this).val($(this).data('placeholderText'));
123                    });
124                })
125            ;
126        });
127    }
128	
129	/* =TEMPORARY FORM */
130	$('.formRequired').closest('.control-group').find('.controls input').attr('required', 'required');
131	$('.formRequired').closest('.form-group').find('.form-control').attr('required', 'required');
132	$('.xform select').addClass('form-control');
133	$('.xform .checkbox label').removeClass("checkbox");
134	$('.xform .radio label').removeClass("radio");
135	
136	/* add class "btn" */
137	$('input[type="submit"], .readMore a, .slides a, .slides span.current, .slides span.pages').addClass('btn');
138	/* small */
139	$('.readMore a').addClass('btn-small');
140	/* primary */
141	$('.slides span.current').addClass('btn-primary');
142	/* disabled */
143	$('.slides span.current, .slides span.pages').addClass('disabled');
144	
145	/* make continue button to be primary */
146	$('.checkoutNextButton').addClass('btn-primary');
147	
148	/* adapt radio buttons for ecommerce */
149	$('.shippingOptions label, .selectorLink label, #ecsAccountMode label').addClass('radio');
150	
151	$('.shippingOptions input.methodRadioSelector, #ecsAccountMode input').each(function() {
152		var $label = $(this).next();
153		$(this).prependTo($label);
154	});	
155	
156	/* adapt error styling */
157	$('.checkoutError .error')
158		.addClass('alert alert-block alert-error fade in')
159		.prepend('<button data-dismiss="alert" class="close" type="button">×</button>');
160		
161	/* custom */
162	$('#F3.reloaded').closest('#contactPopup').modal('show');
163	$('#F4.reloaded').closest('#sendToFriendPopup').modal('show');
164	$('#F5.reloaded').closest('#newsletterPopup').modal('show');
165	
166	$('.orderList').addClass('table table-striped');
167	$('.content button').addClass('btn');
168	
169		
170	$('.navbar-collapse > ul > li ')
171		.mouseenter(function() {
172			var windowWidth = parseInt($(window).width());
173			if (windowWidth > 767)  {
174				$(this).addClass('open');
175			}      
176		}).mouseleave(function() {
177			var windowWidth = parseInt($(window).width());
178			if (windowWidth > 767)  {
179				$(this).removeClass('open');
180			} 
181		});		
182		
183		
184	// IE8 compat. mode
185	if(navigator.userAgent.indexOf("MSIE 7.0") > 0 && navigator.userAgent.indexOf("Trident/4.0") > 0) {
186		compatAlert();
187	}
188	// IE9 compat. mode
189	if(navigator.userAgent.indexOf("MSIE 7.0") > 0 && navigator.userAgent.indexOf("Trident/5.0") > 0) {
190		compatAlert();
191	}
192	// IE10 compat. mode
193	if(navigator.userAgent.indexOf("MSIE 7.0") > 0 && navigator.userAgent.indexOf("Trident/6.0") > 0) {
194		compatAlert();
195	}
196	function compatAlert() {
197		$('#top-alert').text('Please turn off compability mode.').show();
198	}	
199			
200});
201
202// cancel ajax-loader animation on ESC click
203$(document).keyup(function(e) {if (e.keyCode == 27) { $('#ajax-loader').removeClass('loading'); }});
204
205$(document).ready(function() {
206	// contact form
207	$('#F138 #xFormFieldD525, #F138 #xFormFieldD526, #F138 #xFormFieldD528').attr('required','required');
208	$('#C3 #xFormFieldD2, #C3 #xFormFieldD3, #C3 #xFormFieldD4, #C3 #xFormFieldD23').attr('required','required');
209	
210	$('.section-contact-us .fa-close').on('click', function() {
211		$('.section-contact-us').removeClass('show');
212	});
213	$('.careers-form .fa-close').on('click', function() {
214		$('.careers-form').removeClass('show');
215	});
216    $('.send-to-friend .fa-close').on('click', function() {
217		$('.send-to-friend').removeClass('show');
218	});
219	
220	$('li[data-page-id="2062"] a, .contact-trigger').on('click', function() {
221		$('#section-contact-us').addClass('show');
222	});
223	
224	if ($('div#F138, div#C2').length) {
225		$('#section-contact-us').addClass('show');	
226	}
227    if ($('div#C3, div#C3').length) {
228		$('#careers-form').addClass('show');	
229	}
230    if ($('div#C4').length) {
231		$('#send-to-friend').addClass('show');	
232	}
233	if ($('#F138 .xFormAllError, #C2 .xFormAllError').length) {
234		$('#section-contact-us').addClass('show');	
235	}
236	if ($('#C5 .xFormAllError').length) {	
237		//$.fn.iPop('#C5 .xFormAllError', 'ipop-form-error');
238		
239		$('html, body').animate({
240			scrollTop: ($('#contact-us-section').offset().top)
241		},1000);		
242	};
243	if ($('div#C5').length) {
244		// $.fn.iPop('div#C5', 'ipop-form-thank-you');
245		$('html, body').animate({
246			scrollTop: ($('#contact-us-section').offset().top)
247		},1000);		
248	}	
249    if ($('#careers-form .xFormAllError').length) {
250		$('#careers-form').addClass('show');	
251	}
252    if ($('#send-to-friend .xFormAllError').length) {
253		$('#send-to-friend').addClass('show');	
254	}
255
256	// careers
257	$('#careers-form-btn, .careers-apply-redirect').on('click', function() {
258		$('#careers-form').addClass('show');	
259	});
260    $('#careers-send-to-friend-btn, .btn-send-to-friend').on('click', function() {
261		$('#send-to-friend').addClass('show');	
262		return false;
263	});
264	
265	// scroll animation 
266	$("a.btn-scroll").click(function(event) {
267		event.preventDefault()           
268		$('html, body').animate({scrollTop: $($(this).attr("href")).offset().top}, 1000);
269	})
270	
271	
272});
273
274//paste this code under head tag or in a seperate js file.
275// Wait for window load
276/*$(window).load(function() {
277	// Animate loader off screen
278	$(".se-pre-con").fadeOut("slow");
279});*/
280
281$(document).ready(function() {
282	$(".se-pre-con").fadeOut(2000);	
283});
284
285// fade out text on scroll
286$(window).scroll(function(){
287    $(".fade-on-scroll").css("opacity", 1 - $(window).scrollTop() / 450);
288});
289
290
291$(document).on('geoReady', function(event, hidElements) { // When Geo module determines the country
292    $('form:not(.reloaded) *[datatype="systype_countries"]') // bound it to datatype rather then particular field
293        .filter(function() {return !$(this).val();}) // avoid altering existing values
294        .val($('html').attr('geo-cc')) // set the value
295        .trigger('change') // to run our custom code that may be hooked on this field
296    ;
297});	
298
299
300/* LOCAL FILE ================================ */
301$(document).ready(function() {
302	
303	if ( $(window).width() > 767) {
304		$(window).scroll(function() {
305			var x = $(this).scrollTop();
306			$('.product').css('background-position', '0% ' + ', ' + '0% ' + parseInt(-x / 3) + 'px');
307		});		
308	}	
309	
310  $('.input-file-container').popover({
311    placement: 'right',
312    trigger: 'hover'
313  })	
314	
315	$('.watch-view-left, .watch-view-right, .watch-view-fade').watchView();
316	
317	$('#pricing-more').on('click', function() {
318		$('#pricing-container').addClass('expanded');
319		$(this).fadeOut();
320	});
321});

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.