PageSourceSearch

https://www.prepaidgiftbalance.com/o/kroger-comp-responsive-theme/…&languageId=en_US&t=1789209528000

js prepaidgiftbalance.com collected 2026-10-04 02:17:59 UTC 15,890 bytes, 453 lines download raw bytes

1
2Liferay.Portlet.ready(
3
4	/*
5	This function gets loaded after each and every portlet on the page.
6
7	portletId: the current portlet's id
8	jQueryObj: the jQuery wrapped object of the current portlet
9	*/
10
11	function(portletId, jQueryObj) {
12	}
13);
14
15function initFAQ(inx,el) {
16	var faq = jQuery(el);
17	
18    faq.find('.question').click(
19    function() {
20        var question = jQuery(this);
21        if (question == null) { return false; }
22        var answer   = question.next();
23        if (answer   == null) { return false; }
24
25        faq.find('.answer:visible').slideUp('fast');
26        faq.find('.question.open').removeClass('open');
27        if (answer.is(':visible')) { return false; }
28
29        question.addClass('open');
30        answer.slideDown('normal');
31        return false;
32      });
33}
34function changeCountAmt(countValue){
35		document.getElementById("count").value = countValue;
36		document.getElementById("count-submit").click();
37}
38
39function showContent(divValue) {
40	jQuery("div." + divValue).slideToggle("slow");
41}
42function toggleContent(oLink, sContainerClass) {
43    var oContainer = jQuery(oLink).parents('DIV.' + sContainerClass);
44    if (oContainer.hasClass('open')) {
45        oContainer.removeClass('open');
46        oContainer.children('.toggleContent').slideUp('slow');
47    } else {
48        oContainer.addClass('open');
49        oContainer.children('.toggleContent').slideDown('slow');
50    }
51}
52
53function outputDebug(oObject) { alert(outputDebugNested(oObject, '')); }
54function outputDebugNested(oObject, sPrefix) {
55    if (oObject == null     ) { return 'NULL';      }
56    if (oObject == undefined) { return 'UNDEFINED'; }
57    var sDebug = '';
58    for (var sNext in oObject) {
59        sDebug += sPrefix + sNext + ': ' + oObject[sNext] + '\n';
60    }
61    if (sDebug == '') { return oObject; }
62    return sDebug;
63}
64
65/* Deprecated - innerfade will be removed in near future. Please use lazyCarousel instead. */
66(function($) {
67
68    $.fn.innerfade = function(options) {
69        return this.each(function() {   
70            $.innerfade(this, options);
71        });
72    };
73
74    $.innerfade = function(container, options) {
75        var settings = {
76        		'animationtype':    'fade',
77            'speed':            'normal',
78            'type':             'sequence',
79            'timeout':          2000,
80            'containerheight':  'auto',
81            'runningclass':     'innerfade',
82            'children':         null
83        };
84        if (options)
85            $.extend(settings, options);
86        if (settings.children === null)
87            var elements = $(container).children();
88        else
89            var elements = $(container).children(settings.children);
90        if (elements.length > 1) {
91            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
92            for (var i = 0; i < elements.length; i++) {
93                $(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();
94            };
95            if (settings.type == "sequence") {
96                setTimeout(function() {
97                    $.innerfade.next(elements, settings, 1, 0);
98                }, settings.timeout);
99                $(elements[0]).show();
100            } else if (settings.type == "random") {
101            		var last = Math.floor ( Math.random () * ( elements.length ) );
102                setTimeout(function() {
103                    do { 
104												current = Math.floor ( Math.random ( ) * ( elements.length ) );
105										} while (last == current );             
106										$.innerfade.next(elements, settings, current, last);
107                }, settings.timeout);
108                $(elements[last]).show();
109						} else if ( settings.type == 'random_start' ) {
110								settings.type = 'sequence';
111								var current = Math.floor ( Math.random () * ( elements.length ) );
112								setTimeout(function(){
113									$.innerfade.next(elements, settings, (current + 1) %  elements.length, current);
114								}, settings.timeout);
115								$(elements[current]).show();
116						}	else {
117							alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
118						}
119				}
120    };
121
122    $.innerfade.next = function(elements, settings, current, last) {
123        if (settings.animationtype == 'slide') {
124            $(elements[last]).slideUp(settings.speed);
125            $(elements[current]).slideDown(settings.speed);
126        } else if (settings.animationtype == 'fade') {
127            $(elements[last]).fadeOut(settings.speed);
128            $(elements[current]).fadeIn(settings.speed, function() {
129							removeFilter($(this)[0]);
130						});
131        } else
132            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
133        if (settings.type == "sequence") {
134            if ((current + 1) < elements.length) {
135                current = current + 1;
136                last = current - 1;
137            } else {
138                current = 0;
139                last = elements.length - 1;
140            }
141        } else if (settings.type == "random") {
142            last = current;
143            while (current == last)
144                current = Math.floor(Math.random() * elements.length);
145        } else
146            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
147        setTimeout((function() {
148            $.innerfade.next(elements, settings, current, last);
149        }), settings.timeout);
150    };
151
152})(jQuery);
153
154// **** remove Opacity-Filter in ie ****
155function removeFilter(element) {
156	if(element.style.removeAttribute){
157		element.style.removeAttribute('filter');
158	}
159}
160
161function checkAll(sFormId, bChecked) {
162    jQuery("form#" + sFormId + " INPUT[type='checkbox']").attr('checked', bChecked);
163}
164
165
166// Uses a regular expression to validate a string as a valid currency
167//     VALID:  #      #.#     #.##    ####   #,###   ##,###.##  ...
168//            $#     $#.#    $#.##   $####  $#,###  $##,###.##  ...
169function isUSCurrency (sValue) {
170    return RegExp(/^\$?([1-9][0-9]?[0-9]?(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9][0-9]*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/).
171        test(String(sValue).replace(/^\s+|\s+$/g, ''));
172}
173
174
175var oCurrencyValues = new Object();
176function validateCurrency(oInput) {
177    var sValue = oInput.value;
178    if (sValue == '') { delete oCurrencyValues[oInput.id]; return true; }
179
180    var bError = false;
181    if (!isUSCurrency(sValue)) {
182       // sValue = oCurrencyValues.hasOwnProperty(oInput.id)? oCurrencyValues[oInput.id]: '$0.00';
183	    sValue = '$0.00';
184        bError = true;
185    } else {
186        if (sValue.substr(0,1) != '$') { sValue = '$' + sValue; }
187        var decimalPosition = sValue.indexOf('.');
188             if (decimalPosition < 0                 ) { sValue += '.00'; }
189        else if (decimalPosition == sValue.length - 1) { sValue +=  '00'; }
190        else if (decimalPosition == sValue.length - 2) { sValue +=   '0'; }
191        if (sValue.indexOf('$.') > -1) { sValue = '$0' + sValue.substr(1); }
192    }
193    oCurrencyValues[oInput.id] = sValue;
194    oInput.value = sValue;
195    if (bError) { alert('This field expects a positive dollar amount to be entered. Please only type something of the form $43.21.'); }
196    oInput.focus();
197}
198
199jQuery(document).ready(
200
201	/*
202	This function gets loaded when all the HTML, not including the portlets, is
203	loaded.
204	*/
205
206	function() {
207        jQuery('INPUT.positiveCurrency')
208            .change( function () { validateCurrency(this); } )
209            .each(
210                function () {
211                    if (!isUSCurrency(this.value)) { return; }
212                    oCurrencyValues[this.id] = this.value;
213					validateCurrency(this);
214                }
215            );
216		jQuery('.faq').each(initFAQ);
217	}
218);
219
220function enableEnrollment(sBaseName) {
221    jQuery('#' + sBaseName           ).removeClass('disabled');
222    jQuery('#' + sBaseName + ' INPUT').removeAttr("disabled");
223}
224function checkEnrollment(oCheckbox) {
225    var oForm  = jQuery(oCheckbox.form);
226    var bReady = true;
227    oForm.find('INPUT[type="checkbox"]').each(function() { bReady &= this.checked; });
228    if (bReady) {
229        oForm.find('INPUT[type="submit"  ]').removeAttr("disabled").removeClass("disabled");
230    } else {
231        oForm.find('INPUT[type="submit"  ]').attr("disabled","disabled").addClass("disabled");
232    }
233}
234
235function openNewWindow (theURL, windowName, windowProperties) {
236    //theURL is the url the window will be loading
237	//windowName is the parameter for the name of the window 
238	//windowProperties is the list of properties in the window - e.g. height=200, width=400
239	window.open(theURL, windowName, windowProperties);
240}
241
242(function($) {
243	$.fn.lazyCarousel = function(list, options) {
244        return this.each(function() { 
245            $.lazyCarousel(this, list, options);
246        });
247    };
248
249    $.lazyCarousel = function(container, list, options) {
250        if(list.length == 0) {
251            console.log("entered list should be a non-empty array");
252            return;
253        }
254        
255        var settings = {duration: 2000, transition: 1000};
256        $.extend(settings, options);
257        
258        var count=-1;
259        var addImage = function() {   
260            var changeImage = function(items, cnt) {
261                items.eq(cnt==0 ? items.length-1 : cnt-1).fadeOut(settings.transition);
262                items.eq(cnt).fadeIn(settings.transition, function() {
263                    setTimeout(addImage, settings.duration);
264                });
265            };
266            var e=$(container);
267            var items = e.find(".carousel-item");
268            var len1 = items.length;
269            if(len1 < list.length) {
270                try {
271                	var str;
272                	if(list[len1].link == "") {
273                		str='<div class="carousel-item"><img src="'+list[len1].url+'" alt="'+list[len1].title+'"></div>';
274                	}
275                	else {
276                		str='<a class="carousel-item" href="'+list[len1].link+'" title="'+list[len1].title+'"';
277                		if(typeof list[len1].target != 'undefined') {
278                			str+=' target="'+list[len1].target+'"';
279                		}
280                		str+='><img src="'+list[len1].url+'" alt="'+list[len1].title+'"></a>';
281                	}
282                	e.append(str);
283                }
284                catch(e) {
285                	console.log("WARNING: exception occured while adding new image to the carousel - '"+list[len1].url+"'");
286                }
287                items = e.find(".carousel-item");
288                if(len1 == 0) {
289                    items.eq(len1).fadeIn(0, function() {
290                        setTimeout(addImage, settings.duration);
291                    });
292                }
293                else {
294                    changeImage(items, len1);
295                }
296            }
297            else if(len1 > 1) {
298                count=(count+1)%len1;
299                changeImage(items, count);
300            }
301        };
302        addImage();
303    };
304})(jQuery);
305
306function removeEmptyPortlets() {
307    var aryClassElements = getElementsByClassNameFooter( 'portlet-boundary', document.body );
308    var flag = false; 
309	for ( var i = 0; i < aryClassElements.length; i++ ) {
310		var hidePortlet = false;
311		var divObj = aryClassElements[i];
312		// find if div has hide-title class. If yes, check content of div having class  portlet-content-container.	
313		if ( divObj.className.indexOf('hide-title') !==-1 ) {
314			var aryContainerClassElements = getElementsByClassNameFooter( 'portlet-content-container', divObj );
315			for ( var j = 0; j < aryContainerClassElements.length; j++ ) {
316				var divContainerObj = aryContainerClassElements[j];
317				var stripped = divContainerObj.innerHTML.replace(/(<style([^>]+)>([^<]*)<\/style>)/ig,"").replace(/(<([^>]+)>)/ig,"").replace(/\//ig,"").replace(/\*/ig,""); 
318				if(trimLRFooter(stripped)=="") {
319					hidePortlet = true;
320				}
321			}
322		}
323		if(hidePortlet) {
324			divObj.style.paddingBottom = "0px";
325		}
326    }
327}
328
329function getElementsByClassNameFooter( strClassName, obj ) {
330    var ar = arguments[2] || new Array();
331    var re = new RegExp("\\b" + strClassName + "\\b", "g");
332
333    if ( re.test(obj.className) ) {	
334        ar.push( obj );
335    }
336    for ( var i = 0; i < obj.childNodes.length; i++ )
337        getElementsByClassNameFooter( strClassName, obj.childNodes[i], ar );
338    
339    return ar;
340}
341
342function trimLRFooter(str) {
343	return str.replace(/^\s+|\s+$/g,"");
344}
345
346jQuery(document).ready(function() {
347
348	var checkControlKeys = function(e) {
349		// Allow: backspace, delete, tab, escape, enter
350        if ($.inArray(e.keyCode, [46, 8, 9, 27, 13]) !== -1 ||
351             // Allow: Ctrl, Command
352            ( e.ctrlKey === true || e.metaKey === true ) || 
353             // Allow: home, end, left, right, down, up
354            (e.keyCode >= 35 && e.keyCode <= 40)) {
355                 // let it happen, don't do anything
356                 return true;
357        }
358		return false;
359	}
360
361	//0-9
362	$(".f-numeric").keydown(function (e) {
363		if(checkControlKeys(e)) { return; }
364		
365        if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
366            e.preventDefault();
367        }
368    });
369
370	//0-9 and .
371	$(".f-number").keydown(function (e) {
372		if(checkControlKeys(e)) { return; }
373		
374        if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105) && e.keyCode != 110 && e.keyCode != 190) {
375            e.preventDefault();
376        }
377    });
378
379	//a-zA-Z
380	$(".f-alpha").keydown(function (e) {
381		if(checkControlKeys(e)) { return; }
382		
383        if (e.keyCode < 65 || e.keyCode > 90) {
384            e.preventDefault();
385        }
386    });
387
388	//0-9a-zA-Z
389	$(".f-alpha-numeric").keydown(function (e) {
390		if(checkControlKeys(e)) { return; }
391		
392        if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 65 || e.keyCode > 90) && (e.keyCode < 96 || e.keyCode > 105)) {
393            e.preventDefault();
394        }
395    });
396
397	//0-9a-zA-Z and space
398	$(".f-alpha-numeric-space").keydown(function (e) {
399		if(checkControlKeys(e)) { return; }
400		
401        if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 65 || e.keyCode > 90) && (e.keyCode < 96 || e.keyCode > 105) && e.keyCode != 32) {
402            e.preventDefault();
403        }
404    });
405
406});
407var screenSize = $(window).height();
408var footerY = 0;
409/*function handleFirstColumn(){
410	var elementCardbalance = $('.portlet-boundary_FSVcardbalance_WAR_cardportal7_');	
411	var element = $('.portlet-column-content-first');	
412	var elementSecond = $('.portlet-column-content-last');
413	elementCardbalance.appendTo(elementSecond);	
414	if(element.parent().hasClass('col-md-4')) {		
415		height = element.height();
416		var topMargin = 20;
417		var originalY = element.offset().top;					
418		footerCssDisplay();		
419		element.css('position', 'relative');		
420		$(window).on('scroll', function(event) {
421		resetScreenSize();
422			resetScreenSize();
423			var scrollTop = $(window).scrollTop();		
424			element.stop(false, false).animate({top: scrollTop < originalY?0:(footerY<(height+topMargin+scrollTop))?(footerY - (topMargin+originalY+height)):((height<=screenSize)?(scrollTop - originalY + topMargin):((height+originalY-screenSize)<=scrollTop?(scrollTop+screenSize-height-originalY-120):0))}, 200);
425			
426		});
427	}
428}*/
429
430function resetScreenSize() {
431	screenSize = $(window).height();
432}
433
434function footerCssDisplay(){
435	var cssDisplay = $('#footer').css('display');		
436	if(cssDisplay == "none"){
437		$('#footer').css('display', 'block');	
438		footerY = $('#footer').position().top;
439		$('#footer').css('display', 'none');		 
440	}else{
441		footerY = $('#footer').position().top;
442	}	
443}
444
445function formSubmitWithAction(formname, action) {		
446	document.forms[formname].action=action;
447	document.forms[formname].submit();
448}
449function  hideCardlyticsDiv(){
450if (!($('.cardlytics_widget_horizontal').length>0)) {	 
451   $('.cl_clickout_txt').css('display', 'none');		 
452   }
453}

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.