PageSourceSearch

https://diptrace.com/js/scripts.js?v=130720261804

js diptrace.com collected 2026-10-02 04:20:18 UTC 26,471 bytes, 660 lines download raw bytes

1function getGA4ClientId() {
2	try {
3		var cookies = document.cookie.split(';');
4		for (var i = 0; i < cookies.length; i++) {
5			var c = cookies[i].trim();
6			if (c.indexOf('_ga=') === 0) {
7				var parts = c.substring(4).split('.');
8				if (parts.length >= 4) {
9					return parts[2] + '.' + parts[3];
10				}
11			}
12		}
13	} catch(e) {}
14	return '';
15}
16
17// Опции
18_INTERVAL = 100;//270; // время задержки
19_SENS = 100;//30; // чувствительность к мыши
20_TIMEOUT = 100; // задержка перед уведением мыши с пункта меню
21var ddData;
22var unitsData;
23var alignBg = function() {
24	ww = $(window).width();
25	if (ww>=985){
26		$('.container-bg img').each(function(){
27			var bg = $(this).width();	
28			if(bg <= 985){
29				$(this).css({'margin':'0 auto'});
30			} else {
31				//var delta = -1*Math.round((bg - 985)/2);
32				var delta = Math.round((ww-bg)/2); 
33				$(this).css({'left':delta});
34			}
35		
36		});
37	}
38}
39/* ---------------------------------------------------------------------- */
40/* Scroll To plugin
41/* @version 1.4.3.1
42/* ---------------------------------------------------------------------- */
43;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
44
45/*!
46 * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
47 * http://cherne.net/brian/resources/jquery.hoverIntent.html
48 *
49 * You may use hoverIntent under the terms of the MIT license.
50 * Copyright 2007, 2013 Brian Cherne
51 */
52(function(e){e.fn.hoverIntent=function(t,n,r){var i={interval:_INTERVAL,sensitivity:_SENS,timeout:_TIMEOUT};if(typeof t==="object"){i=e.extend(i,t)}else if(e.isFunction(n)){i=e.extend(i,{over:t,out:n,selector:r})}else{i=e.extend(i,{over:t,out:t,selector:n})}var s,o,u,a;var f=function(e){s=e.pageX;o=e.pageY};var l=function(t,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if(Math.abs(u-s)+Math.abs(a-o)<i.sensitivity){e(n).off("mousemove.hoverIntent",f);n.hoverIntent_s=1;return i.over.apply(n,[t])}else{u=s;a=o;n.hoverIntent_t=setTimeout(function(){l(t,n)},i.interval)}};var c=function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t);t.hoverIntent_s=0;return i.out.apply(t,[e])};var h=function(t){var n=jQuery.extend({},t);var r=this;if(r.hoverIntent_t){r.hoverIntent_t=clearTimeout(r.hoverIntent_t)}if(t.type=="mouseenter"){u=n.pageX;a=n.pageY;e(r).on("mousemove.hoverIntent",f);if(r.hoverIntent_s!=1){r.hoverIntent_t=setTimeout(function(){l(n,r)},i.interval)}}else{e(r).off("mousemove.hoverIntent",f);if(r.hoverIntent_s==1){r.hoverIntent_t=setTimeout(function(){c(n,r)},i.timeout)}}};return this.on({"mouseenter.hoverIntent":h,"mouseleave.hoverIntent":h},i.selector)}})(jQuery);
53
54/* ---------------------------------------------------------------------- */
55/* Menu Widget
56/* ---------------------------------------------------------------------- */
57;
57(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path)}},o.delay)},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li)}).blur(function(){out.call($li)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '))})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul)});return this}})})(jQuery);
58
59/**
60 * Simple image preloader
61 */
62$.fn.preload = function() {
63    this.each(function(){
64        $('<img/>')[0].src = this;
65    });
66};
67
68$(window).resize(function() {
69	alignBg();
70});
71
72
73$(document).ready(function() {
74    alignBg();
75
76  
77    
78	if($('#table1').length){
79		$.ajax({
80			url:'index.php?id=68&geoip=2&L='+$( "#table1" ).data( "languageid" ),
81			async:true,
82			cache:false,			
83			success: function(data){
84				var htmldata = data.replace(/<!--(.*?)-->/g, "");
85				//var lng = data.substring(0, data.indexOf('<'));
86				var lng = htmldata.trim();
87				//alert(lng);
88				switch (lng) {
89				   case 'Europe':
90				    // English + Euro
91					  $( "#table1" ).load( "index.php?id=70&L="+$( "#table1" ).data( "languageid" )+" .table:first" );
92					  $( "#table2" ).load( "index.php?id=70&L="+$( "#table2" ).data( "languageid" )+" .table:last" );
93					  break
94				   case 'Russian Federation':
95					// Russia + Рубли
96					  $( "#table1" ).load( "index.php?id=69&L="+$( "#table1" ).data( "languageid" )+" .table:first" );
97					  $( "#table2" ).load( "index.php?id=69&L="+$( "#table2" ).data( "languageid" )+" .table:last" );
98					  break
99				   case 'Ukraine':
100				    // Russia + Гривня
101					  $( "#table1" ).load( "index.php?id=70&L="+$( "#table1" ).data( "languageid" )+" .table:first" );
102					  $( "#table2" ).load( "index.php?id=70&L="+$( "#table2" ).data( "languageid" )+" .table:last" );
103					  break
104				   default:
105					// English + Dollar
106					  $( "#table1" ).load( "index.php?id=69&L="+$( "#table1" ).data( "languageid" )+" .table:first" );
107					  $( "#table2" ).load( "index.php?id=69&L="+$( "#table2" ).data( "languageid" )+" .table:last" );
108				}
109			},
110			error: function (xhr, ajaxOptions, thrownError) {}
111		});
112	}
113    
114  
115	if(jQuery.isFunction(jQuery.fn.placeholder)) {
116		jQuery('input[placeholder], textarea[placeholder]').placeholder();
117	}	
118    $('#lang-bar__language-switcher').polyglotLanguageSwitcher({
119		effect: 'click',
120		openMode: 'slide',
121        testMode: false
122	});
123	$('.customers:first').addClass('first');
124
125
126
127	
128	var owl = $('.owl-carousel').owlCarousel({
129		animateIn: 'fadeInUp',
130		animateOut: 'fadeOutDown',
131		autoHeight:true,
132		items:1,
133		margin:0,
134		slideBy:'page',
135		//stagePadding:30,
136		smartSpeed:450,
137		autoplay:true,
138		autoplayTimeout:5000,
139		autoplayHoverPause:true,
140		loop:true,
141		nav:false,
142		dots:true,
143		dotsContainer: '#selectors_boards'
144	});
145	
146	$('.owl-dot').click(function (event) {
147		event.stopPropagation();
148		owl.trigger('to.owl.carousel', [$(this).index()]);
149	});
150	
151	// Go to the next item
152	$('.next-container .next').click(function() {
153		owl.trigger('next.owl.carousel');
154	})
155	// Go to the previous item
156	$('.prev-container .prev').click(function() {
157		owl.trigger('prev.owl.carousel');
158	})	
159	
160	
161    $('.buylink').click(function () {
162       var platform = $(this).data('platform');
163       var product = $(this).data('product');
164       var language = $(this).data('language');
165        gtag('event', 'User_Wants_To_Buy', {
166          'event_category': 'ecommerce',
167          'event_label': language+" ("+countryName+")" + " "+ platform 
167+ " " + product,
168          'platform': platform,
169          'product': product,
170          'language': language,
171          'country': countryName
172        });
173    });
174
175    $('.buylinkpopup').click(function () {
176        if(countryCode!="UA") {
177            var platform = $(this).data('platform');
178            var product = $(this).data('product');
179            var language = $(this).data('language');
180            gtag('event', 'User_Wants_To_Buy_Popup', {
181                'event_category': 'ecommerce',
182                'event_label': language + " (" + countryName + ")" + " " + platform + " " + product,
183                'platform': platform,
184                'product': product,
185                'language': language,
186                'country': countryName
187            });
188        }
189    });
190    
191	$('.try-btn').click(function(){
192        var language = $(this).data('language');
193        gtag('event', 'downloads', {
194          'event_category': 'Trial',
195          'event_label': language+" ("+countryName+") diptrace_trial_setup.exe",
196          'language': language,
197          'country': countryName
198        });
199		var newUrl = $(this).parent().data('download');
200		setTimeout(function(){
201			window.location = newUrl;
202		}, 3000);
203	});
204	
205	$("a[href*='allsoft.ru']").live('click', function(){
206		var productCnt = $(this).parent().parent().parent().find('.order-input').val();
207		var oldHref = $(this).attr('href');
208		var newHref = oldHref + '?quantity='+productCnt;
209		$(this).attr('href',newHref);
210	});
211    $(".t-col a[href*='online-store']").live('click', function() {
212		const top_parent = $(this).parent().parent().parent().parent();
213		const productName = top_parent.find('.t-col:first').text().trim();
214		const productCnt = top_parent.find('.order-input').val();
215		const productPrice = top_parent.find('.order-price').val();
216		const sum = productCnt * productPrice;
217		const productCur = top_parent.find('.order-currency').val();
218		const oldHref = $(this).attr('href');
219	    const newHref = oldHref + '?name=' + productName + '&sum=' + sum + '&cnt=' + productCnt + '&cur=' + productCur;
220		$(this).attr('href', newHref);
221	});
222
223	$(".abutton[href*='online-store']").on('click', function() {
224		const productName = $(this).find('.product').text().trim();
225		const productCnt = $(this).find('.order-input').val();
226		const productPrice = $(this).find('.order-price').val();
227		const sum = productCnt * productPrice;
228		const productCur = $(this).find('.order-currency').val();
229		const oldHref = $(this).attr('href');
230		const newHref = oldHref + '?name=' + productName + '&sum=' + sum + '&cnt=' + productCnt + '&cur=' + productCur;
231		$(this).attr('href', newHref);
232	});
233	
234
235	/*
236	$('#submit-button').click(function(){
237		document.question.submit();
238		return false;
239	});
240    */
241	$("#btnContactUsSubmit").click(function (event) {
242	    if ($("#question").validationEngine("validate", { promptPosition: "centerLeft", scroll: false })) {
243	        $.ajax({
244	            type: "POST",
245	            url: "/ajax/contact-us.php",
246	            data: {
247	                "_name": $("#name").val(),
248	                "_email": $("#email").val(),
249	                "_phone": $("#tel").val(),
250
251					"_phoney": $("#hon").val(),
252					"_phoney2": "",
253
254	                "_subject": $("#subject").val(),
255	                "_message": $("#message").val()
256	            },
257	            success: function (data) {
258	                $(".Tx-Formhandler").html(data);
259	            },
260	            error: function (thrownError) {
261	                alert(thrownError.statusText);
262	            }
263	        });
264	    }
265	    event.preventDefault();
266	});
267
268
269	$("#btnOrderSubmit").click(function (event) {
270        if ($("#question").validationEngine("validate", { promptPosition: "centerLeft", scroll: false })) {
271            $.ajax({
272                type: "POST",
273                url: "/ajax/order-ua.php",
274                data: {
275					"_product": $("#order_name").val(),
276                    "_quantity": $("#order_quantity").val(),
277                    "_sum": $("#order_sum").val(),
278				    "_currency": $("#order_currency").val(),
279                    "_name": $("#name").val(),
280                    "_email": $("#email").val(),
281                    "_phone": $("#tel").val(),
282                    "_message": $("#message").val()
283                },
284                success: function (data) {
285                    $(".Tx-Formhandler").html(data);
286                },
287                error: function (thrownError) {
288                    alert(thrownError.statusText);
289                }
290            });
291        }
292        event.preventDefault();
293    });
294
295
296    
297	$('.pp_content_container .form-button').unbind('click').die().live('click', function (event) {
298		//alert(ddData.value);
299		//$(".pp_content_container #kpins").val('123456');
300		//alert("="+$(".pp_content_container .kpins").val()+"=");
301		var form = $(this).parent();
302		var url = '';
303		$(form).find('input').each(function(){
304			url = url + '&' + $(this).attr('name')+'='+$(this).val();
305		});
306		if($(this).find('.dd-select') && ddData !== undefined){
307		    url = url + '&routing=' + ddData.value + '&units=' + unitsData.value;
308		}
309		$.ajax({
310		                url: '/ajax/pcb_design_calculator.php?id=50' + url,
311						//&calc_type='+$(".calc_type").val()+'&kpins='+$(".pp_content_container .kpins").val()+'&bwidth='+$(".pp_content_container .bwidth").val()+'&bheight='+$(".pp_content_container .bheight").val()+'&routing='+ddData.value,
312						async:false,
313						cache:false,			
314						success: function(data){
315							//alert(data);
316							$(".calc-result").html(data);
317							
318						},
319						error: function (xhr, ajaxOptions, thrownError) {
320
321						}
322					});
323		return false;
324	});
325    
326	
327
328	showModalBox();
329	
330	if(jQuery.isFunction(jQuery.fn.prettyPhoto)) {
331		$("a[rel^='lightbox']").prettyPhoto({
332			default_width: 800,
333			default_height: 600,
334			opacity: 0.60,
335			show_title: false,
336			counter_separator_label: '/',
337			horizontal_padding: 5,
338			//theme: 'light_rounded',
339			social_tools:''
340		});
341		
342		$("a[rel^='onlineCalculator'],a[rel^='DownloadForm']").prettyPhoto({
343				default_width: 400,
344				default_height: 600,
345				opacity: 0.60,
346				show_title: false,
347				counter_separator_label: '/',
348				horizontal_padding: 5,
349				//theme: 'light_rounded',
350				social_tools:'',
351				callback: function(){$(".calc-result").text('');},
352				changepicturecallback: function(){
353                    // ssv
354                    var defw = 400;
355                    var inpw = 356;
356                    if (window.innerWidth <= 480) {
357                        defw = 280;
358                        inpw = 236;
359                    }
360                    // form to center
361                    $(".pp_pic_holder").css("left", 0.5 * (window.innerWidth - defw - 32));                    
362                    // form width
363                    $(".pp_pic_holder").css("width", defw + 32);
364                    $(".ppt").css("width", defw);
365                    $(".pp_content").css("width", defw);
366                    // input width
367                    $(".input").css("width", inpw);
368                    // end ssv
369					$('.pp_default input:first').trigger('focus');
370					$('.pp_default .routing').ddslick({
371							width: inpw,
372							selectText: "Select your preferred routing",
373							onSelected: function(data){
374								ddData = data.selectedData;
375							} 			
376					});
377					$('.pp_default .units').ddslick({
378					    width: inpw,
379					    selectText: "Select your preferred units",
380					    onSelected: function (data) {
381					        unitsData = data.selectedData;
382					    }
383					});
384				},
385				markup: '<div class="pp_pic_holder"> \
386							<div class="ppt">&nbsp;</div> \
387							<div class="pp_content_container"><a class="pp_close" href="#">Close</a> \
388								<div class="pp_left"> \
389								<div class="pp_right"> \
390									<div class="pp_content"> \
391										<div class="pp_fade"> \
392											<div id="pp_full_res"></div> \
393											<div class="pp_details"> \
394												<div class="pp_nav"> \
395													<a href="#" class="pp_arrow_previous">Previous</a> \
396													<p class="currentTextHolder">0/0</p> \
397													<a href="#" class="pp_arrow_next">Next</a> \
398												</div> \
399												<p class="pp_description"></p> \
400												{pp_social} \
401												 \
402											</div> \
403										</div> \
404									</div> \
405								</div> \
406								</div> \
407							</div> \
408						</div> \
409						<div class="pp_overlay"></div>'			
410		});
411			
412
413		
414
415
416	};
417
418
419	
420	
421	var old_id = 1;
422	
423	function slideChange(args) {
424	
425		// Change dotted selectors
426		$('.selectors .item').removeClass('selected');
427		$('.selectors .item:eq(' + (args.currentSlideNumber - 1) + ')').addClass('selected');
428
429		var id = $("#selectors_block .selected").attr("id");
430
431		$("#selectors_boards div").removeClass("active");
432		$("#s" + id).addClass("active");
433
434		$(".slide_bg").css("opacity", 0);
435		$(".slide_bg" + old_id).css("opacity", 1);
436
437		$(".slide_bg" + old_id).stop(true, true).animate({
438			opacity: 0
439		}, 450);
440
441		$(".slide_bg" + id).stop(true, true).animate({
442			opacity: 1
443		}, 450);
444
445		old_id = id;
446	}
447	
448	/* Smooth page scrolling */
449	$('.js-scroll-to').live('click', function(event) {
450/*		
451		var $target = $($(this).attr('href'));
452		$.scrollTo($target, 800);*/
453
454        // if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
455           var target = $(this.hash);
456           target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
457           if (target.length) {
458             $('html, body').animate({
459               scrollTop: target.offset().top
460             }, 800);
461             return false;
462           }
463        // }
464	
465		
466	
467		return false;
468	});
469	
470});
471
472/* ---------------------------------------------------------------------- */
473/* Install libraries
474/* ---------------------------------------------------------------------- */
475$(function () {
476	$('.install-button').click(function (e) {
477		e.preventDefault();
478
479		var $this = $(this);
480		var libIndex = $this.data('lib');
481		var $libBox = $('.lib-box[data-lib=' + libIndex + ']');
482		var $libBoxes = $('.lib-box');
483		var $lib = $libBox.find('.lib');
484		var $parent = $lib.parents('.lib-block').eq(0)
485
486		if (!$this.hasClass('active')){
487			$this.addClass('active')
488			$parent.find('.arrow_div').show();
489			$('.arrow_div_dot[data-lib=' + libIndex + ']').addClass('empty');
490			var height = $lib.height() + 
491						 parseInt($lib.css('padding-top'), 10) +
492						 40 + 
493						 'px'
494			$libBox.find('.lib-box-wrap').animate({
495				'height' : height
496			},300,function () {
497				$('.js-scroll-to[data-lib=' + libIndex + '] img').trigger('click');
498			}).addClass('overflow-visible');
499			$libBox.find('.lib-box-wrap').css({'overflow':'visible'});
500			$libBox.find('.lib-box-wrap > .lib').css({'overflow':'visible'});
501		} else {
502			$parent.find('.lib-close').trigger('click')
503		};
504
505		
506
507	});
508	$('.lib-close').click(function (e) {
509		e.preventDefault();
510
511		var $this = $(this);
512		var $libBox = $this.parents('.lib-box').eq(0);
513		var $libBlock = $this.parents('.lib-block').eq(0);
514		var index = $libBox.data('lib');
515		$('.arrow_div_dot[data-lib=' + index + ']').removeClass('empty');
516		$('.install-button[data-lib=' + index + ']').removeClass('active');
517		$libBlock.find('.arrow_div').hide()
518		$libBox.find('.lib-box-wrap').animate({
519			'height' : 0
520		}).removeClass('overflow-visible');
521		
522
523	});
524});
525
526
527
528/* ---------------------------------------------------------------------- */
529/* Drop-Down Menu
530/* ---------------------------------------------------------------------- */
531$(function() {
532	if ($().superfish) {
533			
534		// Main Navigation
535		$('.b-nav__list').superfish({ 
536			delay: 800,
537			speed: 250,
538			speedOut: 150,
539			animation: {height:'show'},
540			animationOut: {height:'hide', opacity:'hide'},
541			autoArrows: false,
542			pathLevels: 2,
543			dropShadows: false
544		});
545		
546		$('.b-nav__list > .b-nav__link').live('hover', function() {
547			if (!$(this).hasClass('sfHover')) {
548				$('.b-nav__link.sfHover').removeClass('sfHover');
549				$('.b-nav__list_sub-menu').hide();
550			}
551		});
552		
553	}
554});
555
556function decryptCharcode(n,start,end,offset) {
557	n = n + offset;
558	if (offset > 0 && n > end) {
559	n = start + (n - end - 1);
560	} else if (offset < 0 && n < start) {
561	n = end - (start - n - 1);
562	}
563	return String.fromCharCode(n);
564}
565	// decrypt string
566function decryptString(enc,offset) {
567	var dec = "";
568	var len = enc.length;
569	for(var i=0; i < len; i++) {
570	var n = enc.charCodeAt(i);
571	if (n >= 0x2B && n <= 0x3A) {
572	dec += decryptCharcode(n,0x2B,0x3A,offset);	// 0-9 . , - + / :
573	} else if (n >= 0x40 && n <= 0x5A) {
574	dec += decryptCharcode(n,0x40,0x5A,offset);	// A-Z @
575	} else if (n >= 0x61 && n <= 0x7A) {
576	dec += decryptCharcode(n,0x61,0x7A,offset);	// a-z
577	} else {
578	dec += enc.charAt(i);
579	}
580	}
581	return dec;
582}
583	// decrypt spam-protected emails
584function linkTo_UnCryptMailto(s) {
585	location.href = decryptString(s,3);
586}
587
588function showModalBox(){
589	if ($( "#dialog-modal" ).length>0){
590		if (jQuery.isFunction(jQuery.fn.dialog)) {
591			$( "#dialog-modal" ).dialog({
592			  height: 330,
593			  width: 600,
594			  title: "",
595			  position: { my: "center", at: "center", of: window },
596			  closeText: "Close",
597			  show: "slow",
598			  draggable: false,
599			  resizable: false,
600			  open: function( event, ui ) {boxToCenter();},
601			  modal: true
602			});
603		}
604	}
605}
606function boxToCenter(){
607	$(window).resize(function() {
608		var x = Math.floor(($(window).width() - $('.splash-box').width())/2);
609		var y = Math.floor(($(window).height() - $('.splash-box').height())/2);
610		$('.splash-box').css({'top': y, 'left': x+'px'});
611	});	
612}
613/*
614function closeModalBox(){
615	window.location = '/';
616}
617*/
618
619$("#btnSubmit").click(function () {
620    if ($("#support-form").validationEngine("validate", { promptPosition: "centerLeft", scroll: false })) {
621        $("#frmDiv").hide();
622        $("#frmProgress").show();
623        $.ajax({
624            url: '/ajax/request-support.php',
625            type: 'POST',
626            method: 'POST',
627            cache: false,
628            contentType: false,
629            processData: false,
630            data: function () {
631                var data = new FormData();
632
633                jQuery.each(jQuery('#file')[0].files, function (i, file) {
634                    data.append(i, file);
635                    //data.append('file-' + i, file);
636                });
637
638                data.append('_name', $('#name').val());
639                data.append('_email', $('#email').val());
640                data.append('_phone', $('#tel').val());
641
642				data.append('_phoney', $('#hon').val());
643				data.append('_phoney2', '1***q');
644
645                data.append('_subject', $('#subject').val());
646                data.append('_message', $('#message').val());
647                return data;
648            }(),
649            success: function (result) {
650                $(".Tx-Formhandler").html(result);
651            },
652            error: function (xhr, result, errorThrown) {
653                alert(errorThrown.statusText);
654            }
655        });
656    }
657    event.preventDefault();
658});
659
660setupChat();

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.