PageSourceSearch

https://www.iri.com/assets/js/main.js?vdb7f66e75548e290b42347b46120bef0

js iri.com collected 2026-09-24 19:41:06 UTC 7,158 bytes, 233 lines download raw bytes

1var menu = {
2	timeout: null,
3	delay: 200,
4
5	close: function() {
6		$('.menu-banner').addClass('hidden');
7
8		$('.menu .item-active').removeClass('item-active');
9	},
10
11	clear: function() {
12		if (menu.timeout)
13			clearTimeout(menu.timeout);
14	}
15};
16
17jQuery(function() {
18	$(document).on('click', '.confirmation-link', function(e) {
19		var link = $(this);
20		var prompt = link.attr('data-prompt');
21		if (!prompt)
22			prompt = 'Are you sure you want to take this action?';
23		
24		if (confirm(prompt))
25			window.location.href = link.attr('data-href');
26		else
27			e.preventDefault();
28	});
29
30	$(document).on('click', '.move-link', function(e) {
31		e.preventDefault();
32		var link = $(this);
33		var dir = link.attr('data-dir');
34		var next = null;
35		var row = link.closest('tr');
36		if (dir == 'up') {
37			next = row.prev('tr');
38			next.before(row);
39		}
40		else if (dir == 'down') {
41			next = row.next('tr');
42			next.after(row);
43		}
44
45		var url = row.closest('table').attr('data-sort-href');
46		if (url) {
47			var ids = row.closest('table').find('tr').map(function() { return $(this).attr('data-id'); }).toArray();
48			$.post(url, { 'ids[]': ids }, function(res) {
49			});
50		}
51	});
52
53	$(document).on('click', '.move-button', function(e) {
54		e.preventDefault();
55		var link = $(this);
56		var dir = link.attr('data-dir');
57		var next = null;
58		var row = link.closest('.move-item');
59		if (dir == 'up') {
60			next = row.prev('.move-item');
61			next.before(row);
62		}
63		else if (dir == 'down') {
64			next = row.next('.move-item');
65			next.after(row);
66		}
67
68		var container = row.closest('.move-container');
69		var url = container.attr('data-sort-href');
70		if (url) {
71			var ids = container.find('.move-item').map(function() { return $(this).attr('data-id'); }).toArray();
72			$.post(url, { 'ids[]': ids }, function(res) {
73			});
74		}
75	});
76
77	$('.home-right-arrow, .home-left-arrow').click(function() {
78		var button = $(this);
79		var right = button.hasClass('home-right-arrow');
80		var cur = $('.banner-current');
81		var next = null;
82		if (right) {
83			next = cur.next('.banner-message');
84			if (!next.length)
85				next = cur.prevAll('.banner-message').last();
86		}
87		else {
88			next = cur.prev('.banner-message');
89			if (!next.length)
90				next = cur.nextAll('.banner-message').last();
91		}
92
93		cur.removeClass('banner-current').hide();
94		next.addClass('banner-current').show();
95
96		var curProduct = $('.product-active');
97		curProduct.removeClass('product-active');
98		var featureKey = next.attr('data-feature');
99		var nextProduct = $('.product[data-feature=' + featureKey + ']');
100		var pw = $('.product-container').width() / 3;
101		if (right) {
102			var ml = $('.product-slide').css('margin-left');
103			oldMargin = parseInt(ml);
104			margin = oldMargin + $('.product-container').width() / 3;
105			$('.product-slider').animate({'margin-left': (-1 * pw) + 'px'}, 'slow', function() {
106				nextProduct.addClass('product-active');
107				var prod = $('.product-slider .product:first');
108				$('.product-slider').append(prod);
109				$('.product-slider').css('margin-left', '0px');
110			});
111		}
112		else if (!right) {
113			var prod = $('.product-slider .product:last');
114			$('.product-slider').prepend(prod);
115			$('.product-slider').css('margin-left', (-1 * pw) + 'px');
116			$('.product-slider').animate({'margin-left': '0px'}, 'slow', function() {
117				nextProduct.addClass('product-active');
118			});
119		}
120	});
121
122	$('.menu .item').mouseover(function(e) {
123		var link = $(this);
124		menu.clear();
125		menu.enter_timeout = setTimeout(function() {
126			var id = link.attr('data-id');
127			menu.clear();
128			link.addClass('item-active');
129			link.siblings('.item-active').removeClass('item-active');
130			$('.menu-banner').addClass('hidden');
131			var banner = $('.menu-banner[data-parent=' + id + ']');
132			var bannerWidth = $('.banner > .inner').width();
133			banner.toggleClass('hidden');
134			banner.find('.coverup').css('left', 0).width(link.outerWidth());
135			var left = link.position().left;
136			banner.css('left', left + 'px');
137			//banner.find('.secondcol').addClass('hidden');
138			if (left + banner.outerWidth() > bannerWidth) {
139				banner.css('left', 'auto');
140				banner.css('right', 0);
141				banner.find('.coverup').css('left', 'auto').css('right', (bannerWidth - left - link.outerWidth()) + 'px');
142			}
143		}, menu.delay);
144	});
145
146	$('.menu-banner .subitem').mouseover(function(e) {
147		var link = $(this);
148		var id = link.attr('data-id');
149		link.css('opacity', 1);
150		link.siblings().removeClass('active').css('opacity', 0.4);
151		if (id) {
152			//link.closest('.firstcol').nextAll('.secondcol').removeClass('hidden');
153			link.addClass('active');
154			$('.menu-banner-sub').addClass('hidden');
155			$('.menu-banner-sub[data-parent=' + id + ']').toggleClass('hidden');
156		}
157		else {
158			//link.closest('.firstcol').nextAll('.secondcol').addClass('hidden');
159		}
160	});
161
162	$('.menu-banner a').mouseover(function() {
163		/*
164		var link = $(this);
165		var msg = link.attr('data-message');
166		var messageArea = link.closest('.menu-banner').find('.thirdcol');
167		messageArea.html('');
168		if (msg) {
169			messageArea.html('<p>' + msg + '</p>');
170		}
171		*/
172	});
173
174	$('.menu-banner').mouseenter(function(e) {
175		menu.clear();
176	});
177
178	$('.menu .item, .menu-banner').mouseleave(function(e) {
179		if (menu.enter_timeout)
180			clearTimeout(menu.enter_timeout);
181		menu.timeout = setTimeout(menu.close, menu.delay * 2);
182	});
183
184	$('.request-info-button').click(function(e) {
185		e.preventDefault();
186		var link = $(this);
187		var to = $('#reqinfo').offset().top;
188		$('html:not(:animated),body:not(:animated)').animate({ scrollTop : to + 'px' });
189	});
190
191	var maxHeight = 0;
192	$('.menu-banner, .menu-banner-sub, .firstcol, .secondcol').each(function() {
193		var height = $(this).outerHeight();
194		if (height > maxHeight)
195			maxHeight = height;
196	});
197	var newWidth = $('.product-container .product').length * $('.product-container').width() / 3;
198	$('.product-slider').width(newWidth);
199	$('.product-slider .product').width($('.product-container').width() / 3);
200
201	$('.print-button').click(function(e) {
202		e.preventDefault();
203		var link = $(this);
204		window.open(window.location.href + '?print', 'printwindow', 'status=0,scrollbars=1,toolbar=0,location=0,menubar=0,height=480,width=640');
205	});
206
207	$('.panel-heading').click(function(e) {
208		e.preventDefault();
209		var heading = $(this);
210		heading.next().toggleClass('collapse');
211	});
212
213	$('.collapsible-heading').click(function() {
214		$(this).toggleClass('collapsible-open').next().toggleClass('collapsible-open');
215	});
216
217	var closeHandler = function() {
218		return 'Are you sure you would like to navigate away from this page? Navigating may result in the loss of unsaved changed.';
219	};
220
221	$('.preview-opener').click(function(e) {
222		$.post('/admin/preview/setup', { content: CKEDITOR.instances.page_content.getData() }, function(res) {
223			var elem = $('<div class="preview-container"><div class="preview-heading"><a href="#" class="preview-closer">Close</a></div><div class="preview-body"><iframe src="/admin/preview/page"></iframe></div></div>');
224			elem.find('.preview-closer').click(function(e) {
225				e.preventDefault();
226				$(this).closest('.preview-container').remove();
227				window.onbeforeunload = null;
228			});
229			window.onbeforeunload = closeHandler;
230			$('body').append(elem);
231		});
232	});
233});

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.