PageSourceSearch

https://arielmedia.com/about-us/inc/scripts/script.js

js arielmedia.com collected 2026-10-07 23:39:20 UTC 29,323 bytes, 860 lines download raw bytes

1var rightheight;
2var leftheight;
3
4var top2;
5var topstart2;
6var topend2;
7
8var topfrom2;
9var topto2;
10var curr_slide = 1;
11var curr_icons = 1;
12
13var $page = "";
14
15var $sitevalid = true;
16function animateSlide(){
17	
18	if(curr_slide != $(".slide").length){
19		curr_slide++;
20	}else{
21		curr_slide = 1;
22	}
23	
24	$("#banner .slide:visible").css({"z-index":"99"});
25	$("#banner .slide:nth-child("+curr_slide+")").css({"z-index":"100"});
26	$("#banner.panning .slide:nth-child("+curr_slide+") .image").addClass('panme');
27	
28	$("#banner .slide:nth-child("+curr_slide+")").animate({"opacity":1},2000,function(){
29		$(".slide:nth-child("+curr_slide+") .caption").css({"margin-top":($("#fullwidth").height()/2) - $(".slide:nth-child("+curr_slide+") .caption").outerHeight()/2});
30		$(".slide:nth-child("+curr_slide+") .caption").animate({"opacity":1},2000);
31		$("#banner.panning .slide:visible:not(#banner .slide:nth-child("+curr_slide+")) .image").removeClass('panme');
32		
33	});
34	$("#banner .slide:visible:not(#banner .slide:nth-child("+curr_slide+"))").animate({"opacity":0},2000);
35	
36	$(".slide:visible:not(.slide:nth-child("+curr_slide+")) .caption").animate({"opacity":0},2000);
37	
38	if($("#banner-icons").length > 0){
39		if(curr_icons != $("#banner-icons .wrapper > ul > li").length){
40			curr_icons++;
41		}else{
42			curr_icons = 1;
43		}
44		$("#banner-icons .wrapper > ul > li.active").removeClass("active");
45		$("#banner-icons .wrapper > ul > li:nth-child("+curr_icons+")").addClass("active");
46	}
47	
48	setTimeout(function(){
49		animateSlide();
50	},6000);
51}
52
53function setBodyTop(){
54	/*
55	$("body:not([page=index]) #banner.hide-on-child-pages + #body").css({"padding-top":$("#header").height()});
56	$("body[page=contact-us] #body").css({"padding-top":$("#header").height()});
57	*/
58}
59$(document).ready(function() {
60	setBodyTop();
61	/*$("body").animate({"opacity":1});*/
62	var winwidth = $(window).width();	
63	
64	//$(".fullwidth:not(.section)").css({"height":($(window).width()/4.3)});
65
66	/*
67	$.each(["name", "email", "phone"], function(i,v){
68		if($("input[name='"+v+"']").length > 0){
69			$("input[name='"+v+"']").focus(function(e) {
70				$(this).css({"border":"1px solid rgba(0,0,0,0.25)"});
71				$(this).parent().find("small").remove();
72			});
73		}
74	});
75	*/
76	$("#autodealer_iframe").load(function(e) {
77		setIframeHeight("autodealer_iframe");
78	});
79	if($("#tabs").length > 0){
80		$("#tabs").tabs();
81	}
82	if($("#accordion1").length > 0){
83		$("#accordion1, .accordion").accordion({
84			heightStyle: "content"
85		});
86	}
87	$("body").prepend("<div id='clickStopper'></div>");
88	$("#clickStopper").width("100%");
89	$("#clickStopper").height("100%");
90	$("#clickStopper").css({"position":"fixed","z-index":"1000"});
91	
92	var scrollStopper = setInterval(function(){
93		if(!$sitevalid){
94			//$(window).scrollTop(0);
95		}else{
96			clearInterval(scrollStopper);
97			$("#clickStopper").remove();
98		}
99	},1);
100	
101	if($('.lightme').length > 0){
102		$('.lightme').fancybox({
103			'openSpeed': 1,
104			'closeSpeed': 1,    
105			'speedIn':1,
106			'speedOut':1,
107			'changeSpeed':1,
108			'changeFade':1,
109			helpers:{
110			title: null,
111			},
112		});
113	}
114
115	
116
117	
118
119	if(!$("#callus").css("text-shadow")){
120		$("#callus").addClass("onboard");
121	}
122	
123	$(".caption").css({"opacity":0});
124	//$("#banner > .slide").css({"opacity":0});
125	//$("#banner > .slide:nth-child(1)").css({"opacity":1});
126	$("#banner > .slide").css({"opacity":0});
127	
128	$("#banner .image, .parallax").each(function(index, element) {
129		if(!$(this).attr("default-image")){
130			
131			$default_image = $(this).css("background-image").substr(4,$(this).css("background-image").length-5);
132			$default_image = $default_image.replace(/\"/g, "");
133			$(this).attr("default-image", $default_image);
134		}		
135	});
136	
137	
138
139	
140	/******************************************************************************************************************/
141	/*** LIGHTME VIDEO ************************************************************************************************/
142	if($(".lightmevid[rel^='prettyPhoto']").length > 0){
143		if($(window).width() < 500){
144			$(".lightmevid[rel^='prettyPhoto']").prettyPhoto({
145				animation_speed:'fast',
146				slideshow:10000,
147				hideflash: true,
148				default_width: $(window).width()-35,
149				default_height: ($(window).width()-35) / 1.77,
150				deeplinking: false,
151				theme:'light_square',
152				social_tools: false,
153				allow_resize: false,
154				show_title:false,
155				modal:false,
156				horizontal_padding:0,
157				markup: '<div class="pp_pic_holder"> \
158							<div class="ppt">&nbsp;</div> \
159							<div class="pp_top" style="height:0;"> \
160								<div class="pp_left"></div> \
161								<div class="pp_middle"></div> \
162								<div class="pp_right"></div> \
163							</div> \
164							<div class="pp_content_container"> \
165								<div class="pp_left" style="padding:0;"> \
166								<div class="pp_right" style="padding:0;"> \
167									<div class="pp_content"> \
168										<div class="pp_loaderIcon"></div> \
169										<div class="pp_fade"> \
170											<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
171											<div class="pp_hoverContainer"> \
172												<a class="pp_next" href="#">next</a> \
173												<a class="pp_previous" href="#">previous</a> \
174											</div> \
175											<div id="pp_full_res"></div> \
176											<div class="pp_details"> \
177												<div class="pp_nav"> \
178													<a href="#" class="pp_arrow_previous">Previous</a> \
179													<p class="currentTextHolder">0/0</p> \
180													<a href="#" class="pp_arrow_next">Next</a> \
181												</div> \
182												<p class="pp_description"></p> \
183												{pp_social} \
184												<a class="pp_close" href="#">Close</a> \
185											</div> \
186										</div> \
187									</div> \
188								</div> \
189								</div> \
190							</div> \
191							<div class="pp_bottom" style="height:0;display:none;"> \
192								<div class="pp_left"></div> \
193								<div class="pp_middle"></div> \
194								<div class="pp_right"></div> \
195							</div> \
196						</div> \
197						<div class="pp_overlay"></div>',
198			});
199		}else{
200			$(".lightmevid[rel^='prettyPhoto']").prettyPhoto({
201				animation_speed:'fast',
202				slideshow:10000,
203				hideflash: true,
204				default_width: 800,
205				default_height: 450,
206				deeplinking: false,
207				theme:'light_square',
208				social_tools: false,
209				allow_resize: true
210			});
211		}
212	}
213	/******************************************************************************************************************/
214	/*
215	COMPRESS IMAGE ON PHONE / GOOGLE DOESN'T RECOGNIZE AS COMPRESSED
216	if($(window).width() < 800){
217		$("#banner .image, .parallax").each(function(index, element) {
218			$img = $(this).attr("default-image");
219			//080818ssh(this).css({"background-image":"url('"+$('body').attr('inc')+"/scripts/imageresize.php?image="+$img+"')"});
220		});
221	}
222	*/
223	$page = $("body").attr("page");
224	
225	if($page == "reviews"){
226		$("#testimonials > .padding > .testimonial:first").appendTo($("#testimonials .col3 li:nth-child(1) .padding"));
227		$("#testimonials > .padding > .testimonial").each(function(index, element) {
228			if(
229				$("#testimonials .col3 li:nth-child(1)").height() <= $("#testimonials .col3 li:nth-child(2)").height() &&
230				$("#testimonials .col3 li:nth-child(1)").height() <= $("#testimonials .col3 li:nth-child(3)").height()
231				){
232				$(this).appendTo($("#testimonials .col3 li:nth-child(1) .padding"));
233			}else if(
234				$("#testimonials .col3 li:nth-child(2)").height() <= $("#testimonials .col3 li:nth-child(1)").height() &&
235				$("#testimonials .col3 li:nth-child(2)").height() <= $("#testimonials .col3 li:nth-child(3)").height()
236				){
237				$(this).appendTo($("#testimonials .col3 li:nth-child(2) .padding"));
238			}else{
239				$(this).appendTo($("#testimonials .col3 li:nth-child(3) .padding"));
240			}
241		});
242		$("#testimonials").animate({"opacity":"1"});
243	}
244	
245	
246	
247	$(window).load(function(){
248		setBodyTop();
249		
250		$("a").each(function(index, element) {
251			if($("#nav.sidemenu").length > 0 && $(this).closest(".dropdown")){
252				$(this).click(function(e) {
253					if($("#nav.sidemenu").hasClass("is_open")){
254						if($(this).parent().find("ul").length > 0){
255							e.preventDefault();
256							if($(this).parent().find("ul").is(":visible")){
257								$(this).parent().find("ul").slideUp();
258								$(this).find("i.dropdown-icon").removeClass("fa-caret-up");
259								$(this).find("i.dropdown-icon").addClass("fa-caret-down");
260							}else{
261								$(this).parent().find("ul").slideDown();
262								$(this).find("i.dropdown-icon").removeClass("fa-caret-down");
263								$(this).find("i.dropdown-icon").addClass("fa-caret-up");
264							}
265						}
266						
267					}
268					//e.preventDefault();
269				});
270				if($(this).parent().hasClass("selected") && $(this).find("i.dropdown-icon").length > 0){
271					$(this).parent().find("ul").slideDown();
272					$(this).find("i.dropdown-icon").removeClass("fa-caret-down");
273					$(this).find("i.dropdown-icon").addClass("fa-caret-up");
274				}
275			}
276			
277			
278			if($(this).attr("href")){
279				if(
280					$(this).attr("href").substring(0,5) != "/dev/" &&
281					$(this).attr("href").substring(0,6) != "/dev1/" &&
282					$(this).attr("href").substring(0,6) != "/dev2/" &&
283					$(this).attr("href").substring(0,6) != "/dev3/" &&
284					$(this).attr("href").substring(0,2) != "/~" &&
285					$(this).attr("href").substring(0,1) == "/"
286					){
287					$(this).attr("href", $("body").attr("root-url").substring(0,$("body").attr("root-url").length-1)+$(this).attr("href"));
288				}
289				
290				if($(this).attr("href").substring(0,6) == "?page="){
291					$(this).attr("href", $("body").attr("root-url")+$(this).attr("href").substring(6,1000)+"/");
292				}
293				
294				if($(this).attr("href").substring(0,1) == "#" && $(this).attr("href").length > 1){
295					$hash = $(this).attr("href").substring(1,1000);
296					
297					if($("a[name='"+$hash+"2']").length>0){
298						
299						$(this).click(function(e) {
300							e.preventDefault();
301							$("html, body").animate({ scrollTop: $("a[name='"+$hash+"2']").offset().top - $("#header").height()}, 600, "easeInOutCubic");
302						});
303						
304					}
305					
306				}
307			}
308		});
309		
310		if(window.location.hash){
311			$hash = window.location.hash.substr(1,1000);
312			if($("a[name='"+$hash+"2']").length > 0){
313				$("html, body").animate({ scrollTop: $("a[name='"+$hash+"2']").offset().top - $("#header").height()}, 600, "easeInOutCubic");
314			}
315		}
316		
317		$("#banner > .slide:nth-child(1)").animate({"opacity":1},1000);
318		$("img").each(function(index, element) {
319			if($(this).parent(".round-image").length == 0 && $(this).closest(".gallery").length == 0){
320				if($(this).width() != 0){
321					$(this).css({"width":"100%","max-width":$(this).width()});
322				}
323			}
324		});
325		//$("body:not([page=index]) .fullwidth:not(.section)").css({"height":$("#header").height()+200});
326		setTimeout(function(){
327			if($(".carousel").length > 0){
328				$(".carousel").carouFredSel({
329											responsive: true,
330											/*
331											pagination: {
332												container: $(e).parent().parent().find('.pagination')
333											},
334											*/
335											items: {
336												minimum: 2,
337												width: 500
338											},
339											align: 'center',
340											/*
341											auto: {
342												play: $(e).data('auto-scroll')
343											},
344											*/
345											prev: $('#reviews-prev'),
346											next: $('#reviews-next'),
347											/*
348											scroll: {
349												items: 1,
350												duration: 1000,
351												easing: 'swing'
352											},
353											*/
354											auto:{
355												pauseOnHover: true,
356												timeoutDuration: 5000,
357												duration: 1000,
358												easing: 'quadratic'
359											},
360											mousewheel: false,
361											swipe: {
362												onMouse: true,
363												onTouch: true
364											}
365										});
366				$(".carousel").animate({"opacity":1}
366);
367				$default_height = $(".caroufredsel_wrapper").height();
368				$("body[page='index'] #testimonials").height("1000px");
369				$("body[page='index'] #testimonials .content div p").each(function(index, element) {
370					
371					//console.log($(this).height()+" === "+$("body[page='index'] #testimonials .content div:first-child").height());
372					if($(this).height() <= $("body[page='index'] #testimonials .content div:first-child").height()){
373						$(this).parent().parent().find('a').remove();
374						$(this).parent().css({"height":"auto"});
375					}else{
376						var content = $(this).find("[itemprop='reviewBody']").html();
377						if(content.length > 200) {
378							var c = content.substr(0, 200);
379							var h = content.substr(200, 100000);
380							$(this).find("[itemprop='reviewBody']").html(c+'<span class="moreellipses">...&nbsp;</span><span class="morecontent">'+h+'</span>');
381						}
382					}
383					
384				});
385				$(".morecontent").css({"display":"none"});
386				$tar = null;
387				$("body[page='index'] #testimonials .content a").click(function(e) {
388					$tar = $(this);
389					if($(this).find("i").hasClass("fa-chevron-down")){
390						$(this).parent().find(".morecontent").css({"display":"inline"});
391						$(this).parent().find(".moreellipses").css({"display":"none"});
392						
393						
394						
395						$(this).parent().find("div:first-child").animate({"height":$(this).parent().find("div p").height()});
396						$(".caroufredsel_wrapper").animate({"height":$(".caroufredsel_wrapper").height()+($(this).parent().find("div p").height()-48)});
397						$(this).find("span").html("READ LESS");
398						$(this).find("i").removeClass("fa-chevron-down");
399						$(this).find("i").addClass("fa-chevron-up");
400					}else{
401						
402						$(this).parent().find("div:first-child").animate({"height":"48px"});
403						$(".caroufredsel_wrapper").animate({"height":$(".caroufredsel_wrapper").height()-($(this).parent().find("div p").height()-48)},function(){
404							$tar.find("span").html("READ MORE");
405							$tar.find("i").removeClass("fa-chevron-up");
406							$tar.find("i").addClass("fa-chevron-down");
407							
408							//$tar.parent().find(".morecontent").css({"display":"none"});
409							//$tar.parent().find(".moreellipses").css({"display":"inline"});
410	
411						});
412						
413
414					}
415					//$("#testimonials").animate({"height":$("#testimonials").height()+($(this).parent().find("div p").height()-90)});
416					
417					//console.log($(this).parent().find("div p").height());
418				});
419				$(".reviews-nav").click(function(e) {
420					$("body[page='index'] #testimonials .content div:first-child").animate({"height":"48px"});
421					$("body[page='index'] #testimonials .content a").find("span").html("READ MORE");
422					$("body[page='index'] #testimonials .content a").find("i").removeClass("fa-chevron-up");
423					$("body[page='index'] #testimonials .content a").find("i").addClass("fa-chevron-down");
424					//$tar.parent().find(".morecontent").css({"display":"none"});
425					//$tar.parent().find(".moreellipses").css({"display":"inline"});
426					$(".caroufredsel_wrapper").animate({"height":$default_height});
427				});
428				if($(window).width() < 1000){
429					$(".testimonial > div").width("90%");
430				}else{
431					$(".testimonial > div").width("50%");
432				}
433			}		
434		},1000);
435		
436		$("#quote_form ul.list3 li").each(function(index, element) {
437			if($(this).children("label").length != 0){
438				$(this).find(".textbox1").width(($("#quote_form .butt1").width()-6)/$(this).children("label").length);	
439			}
440			if($(this).children("label").length > 1){
441				$(this).find(".textbox1").width($(this).find(".textbox1").width()-15);	
442			}
443			if($(this).children("label").length == 3){
444				$(this).find(".textbox1").width($(this).find(".textbox1").width()-3);	
445			}
446			//console.log($(this).children("label").length);
447		});
448		
449		
450		
451		
452		$("#quote-butt").click(function(e) {
453			$(this).hide();
454			$(this).parent().find("div:nth-child(2)").show();
455		});
456		
457		$(".image_upload").click(function(e) {
458			var $photonum = $(this).attr("id").substr(7,1);
459			$("input[name='image"+$photonum+"']").click();
460		});
461		$(".image_status .buttmini").click(function(e) {
462			$(this).parent().parent().find('img').attr('src', 'images/addimage.jpg');
463			$(this).parent().parent().find('img').removeClass("uploaded");
464			$(this).parent().hide();
465		});
466		
467		$("#form1,#form2").submit(function(e) {
468			e.preventDefault();
469			send_form(this);
470		});
471		
472		
473		$("input[type='file']").change(function(e) {
474			$("#formstatus").html("");
475			$("#formstatus").slideUp();
476			var $photonum = $(this).attr("name").substr(5,1);
477			//console.log($photonum);
478			
479			var file = this.files[0];
480			var imagefile = file.type;
481			var match= ["image/jpeg","image/png","image/jpg","image/gif"];
482			if(!((imagefile==match[0]) || (imagefile==match[1]) || (imagefile==match[2]) || (imagefile==match[3]))){
483				$error_text = "Please select a valid image file. Only jpeg, jpg, png, and gif images type allowed.";
484				$("#formstatus").html("<center><small style='color:red;margin-bottom:10px;'>"+$error_text+"<br /></small></center><br />");
485				$("#formstatus").slideDown();
486			}else{
487				var reader = new FileReader();
488				reader.tar = $('#preview'+$photonum);
489				reader.onload = function (e) {
490					/*
491					$("#file").css("color","green");
492					$('#image_preview').css("display", "block");
493					*/
494					
495					$(reader.tar).attr('src', e.target.result);
496					$(reader.tar).attr('width', '200px');
497					$(reader.tar).addClass("uploaded");
498					$(reader.tar).parent().find('.image_status').show();
499					//$('#preview'+$photonum).attr('height', '200px');
500					
501					
502					//console.log(e.target.result);
503				};
504				reader.readAsDataURL(this.files[0]);
505			}
506		});
507		
508		
509		$(".sub_menu li a, #mini-menu.list2 li a").each(function(v,i){
510			if(($(this).attr("href").substr(6,100)) == $("body").attr("page")){
511				$(this).parent().addClass("selected");
512				$(this).parent().parent().parent().addClass("selected");
513				//$(this).parent().parent().parent().children("a:first-child").css({"background":"#000"});
514				//$(this).parent().parent().parent().html("FSD");
515			}
516		});
517
518		/*********************************************************************************************************/
519		
520		$("#mobilemenu").click(function(e) {
521			if($("#nav.sidemenu").length > 0){
522				$("#nav").addClass("is_open");
523				$("#overlay").fadeIn();
524			}else{
525				if(!$("#nav").is(":visible")){
526					$("#nav").slideDown();
527				}else{
528					$("#nav").slideUp();
529				}
530			}
531		});
532		$("#overlay").click(function(e) {
533			$("#nav").removeClass("is_open");	
534			$("#overlay").fadeOut();
535		});
536		
537		/*********************************************************************************************************/
538		
539		//testViewPort();
540		
541		if($(window).width() < 1023){
542			if($("#footer").hasClass("reveal")){
543				$("body").css({"margin-bottom":0});	
544				$("#footer").css({"position":"relative","z-index":"0","bottom":"0"});
545			}
546		}else{
547			if($("#footer").hasClass("reveal")){
548				$("body").css({"margin-bottom":$("#footer").height()});	
549				$("#footer").css({"position":"fixed","z-index":"0","bottom":"0"});
550			}
551		}
552
553		if($(".parallax").hasClass("fullscreen")){
554			$(".parallax.fullscreen").css({"height":$(window).height()+100});
555			//$(".parallax.fullscreen h3").html($(window).outerHeight());
556			$(".parallax.fullscreen > .wrapper").css({"padding-top":($(window).height()/2)-($(".parallax.fullscreen > .wrapper").height()/2)});
557		}
558		
559		
560		if($("#banner .slide").length > 1){
561			$("#banner.panning .slide:nth-child(1) .image").addClass('panme');
562			$("#banner .slide:not(.slide:nth-child(1))").css({"opacity":0});
563			setTimeout(function(){
564				animateSlide();
565			},6000);
566		}
567		$('.contenthide').each(function(index, element) {
568			$(this).children('.buttmini').click(function(e) {
569				$(this).parent().children('div:first-child').slideToggle(500,"easeInOutCubic", function(){
570					
571					leftheight = $("#body_body > .left").height();
572					topend2 = (leftheight + $("#body_body > .left").offset().top) - rightheight;
573					topto2 = topend2-topstart2;
574					
575					
576					if(leftheight > rightheight){
577						var y = $(window).scrollTop();
578						
579						if (y>topfrom2 && y < topto2) {
580						  $('#req1').css({position: "fixed", top: topstart2+"px"});
581						}
582						
583						if(y < topfrom2){
584						  $('#req1').css({position: "absolute", top: top2+"px"});
585						}
586						if(y > topto2){
587							$('#req1').css({position: "absolute", top: topend2+"px"});
588						}
589					}
590				});
591				if($(this).html() == "READ MORE"){
592					$(this).html("READ LESS");
593				}else{
594					$(this).html("READ MORE");
595				}
596				
597				
598			});
599		});
600		
601		resizeIcons();
602		$("#banner-icons").fadeIn();
603	});
604	
605	$('.scrollup').click(function(){
606		$("html, body").animate({ scrollTop: 0 }, 600, "easeInOutCubic");
607		return false;
608	});
609	
610	
611	$(window).resize(function(e) {
612		if($(window).width() != winwidth){
613			//testViewPort();
614			//$(".caption").css({"margin-top":($("#fullwidth").height()/2) - $(".caption").outerHeight()/2});
615			
616			//$("#quote_form .textbox1").width($("#quote_form .butt1").width()-6);
617			setIframeHeight("autodealer_iframe");
618			$("#quote_form ul.list3 li").each(function(index, element) {
619				if($(this).children("label").length != 0){
620					$(this).find(".textbox1").width(($("#quote_form .butt1").width()-6)/$(this).children("label").length);	
621				}
622				if($(this).children("label").length > 1){
623					$(this).find(".textbox1").width($(this).find(".textbox1").width()-15);	
624				}
625				if($(this).children("label").length == 3){
626					$(this).find(".textbox1").width($(this).find(".textbox1").width()-3);	
627				}
628				//console.log($(this).children("label").length);
629			});
630			
631
632			
633			if($(".parallax").hasClass("fullscreen")){
634				$(".parallax.fullscreen").css({"height":$(window).height()+20});
635				$(".parallax.fullscreen > .wrapper").css({"padding-top":($(window).height()/2)-($(".parallax.fullscreen > .wrapper").height()/2)});
636			}
637			
638			if($(".carousel").length > 0){
639				if($(window).width() < 1000){
640					$(".testimonial > div").width("90%");
641				}else{
642					$(".testimonial > div").width("50%");
643				}
644			}
645			if($(window).width() < 800){
646				$("#banner .image").each(function(index, element) {
647					$img = $(this).attr("default-image");
648					//080818ssh(this).css({"background-image":"url('"+$('body').attr('inc')+"/scripts/imageresize.php?image="+$img+"')"});
649				});
650			}else{
651				$("#banner .image").each(function(index, element) {
652					$img = $(this).attr("default-image");
653					$(this).css({"background-image": "url("+$img+")"});
654				});	
655			}
656			resizeIcons();
657			winwidth = $(window).width();
658		}
659	});
660	$(window).scroll(function (event) {
661		
662		$('.modal-content').resizable({
663		  //alsoResize: ".modal-dialog",
664		  minHeight: 300,
665		  minWidth: 300
666		});
667		$('.modal-dialog').draggable();
668	
669		$('#myModal').on('show.bs.modal', function() {
670		  $(this).find('.modal-body').css({
671			'max-height': '100%'
672		  });
673		});
674		
675		var y = $(this).scrollTop();
676		
677		if(y > 50 && !$(".mobilemenubutton").is(":visible")){
678			if(!$("#nav").hasClass("sticky")){
679				$("#nav").addClass("sticky");
680				$("#nav").css({"top":"-100px"});
681				$("#nav").animate({"top":"0px"});
682				$("body").css({"padding-top":$("#nav").height()});
683			}
684		}else{
685			$("#nav").removeClass("sticky");
686			$("body").css({"padding-top":0});
687		}
688		
689		if($(".parallax:not('.parallax.fullscreen')").length > 0){
690			if($(window).width() > $(window).height()){
691				$parallax_top = $(".parallax:not('.parallax.fullscreen')").offset().top;
692				$parallax_top -= 2450;
693				$parallax_top *= -1;
694				//$parallax_top = 200;
695				if($(window).width()-$(window).height() < 100){
696					//$(".parallax").css({"background-size":"500%"});
697					$(".parallax:not('.parallax.fullscreen')").css({"background-position":"50% "+(($(window).width()/1.6)+((y-4000)/-10))+"px"});
698				}else  if($(window).width()-$(window).height() < 290){
699					$(".parallax:not('.parallax.fullscreen')").css({"background-position":"50% "+(($(window).width()/1.6)+((y-2500)/-10))+"px"});
700				}else{
701					$(".parallax:not('.parallax.fullscreen')").css({"background-position":"50% "+(($(window).width()/1.6)+((y+$parallax_top)/-2))+"px"});
702				}
703			}else{
704				//$(".parallax").css({"background-size":"cover"});
705				$(".parallax").css({"background-position":"50% 50%"});
706			}
707		}
708		//$(".parallax:not('.parallax.fullscreen') h3").html($(".parallax:not('.parallax.fullscreen')").css("background-attachment"));
709		
710		//$(".parallax").css({"background-position":"50% "+(($(window).width()/1.6)+((y-225)/-10))+"px"});
711		//$(".parallax").css({"background-position":"50% "+(($(window).width()/1.6)+((y-225)/-10))+"px"});
712		//$(".parallax").css({"background-position":"50% "+(($(window).width()/1.6)+(0)+"px"});
713		
714		//console.log(y);
715		//console.log($(".parallax").offset().top);
716		//console.log($(".parallax").height());
717		//$(".parallax").offset().top
718		
719	});
720	
721	/*****************************************************************************************************************/
722	
723	if($("#mobile-text-slider").length > 0){ 
724		
725		var speed_mobiletextslider = 5000;
726		var animating_mobiletextslider = false;
727		
728		var run_mobiletextslider = setInterval(rotate_mobiletextslider, speed_mobiletextslider);
729		var slides_mobiletextslider = $('#mobile-text-slider > div ul li');
730		var container_mobiletextslider = $('#mobile-text-slider > div ul');
731		var elm_mobiletextslider = container_mobiletextslider.find(':first-child').prop("tagName");
732		var item_width_mobiletextslider = container_mobiletextslider.width();
733		slides_mobiletextslider.width(item_width_mobiletextslider); //set the slides to the correct pixel width
734		container_mobiletextslider.parent().width(item_width_mobiletextslider);
735		container_mobiletextslider.width(slides_mobiletextslider.length * (item_width_mobiletextslider)); //set the slides container to the correct total width
736		container_mobiletextslider.find(elm_mobiletextslider + ':first').before(container_mobiletextslider.find(elm_mobiletextslider + ':last'));
737		resetSlides_mobiletextslider();
738		
739		function rotate_mobiletextslider() {
740			if (animating_mobiletextslider) {
741				return false;
742			}
743			animating_mobiletextslider = true;
744			container_mobiletextslider.animate({
745				'left': 0
746			}, 500, function () {
747				container_mobiletextslider.find(elm_mobiletextslider + ':first').before(container_mobiletextslider.find(elm_mobiletextslider + ':last'));
748				resetSlides_mobiletextslider();
749			});
750		}
751		function resetSlides_mobiletextslider() {
752			animating_mobiletextslider = false;
753			//and adjust the container so current is in the frame
754			container_mobiletextslider.css({
755				'left': -1 * item_width_mobiletextslider
756			});
757		}
758	}
759	/*****************************************************************************************************************/
760	
761	
762}); // document ready
763
764
765
766function testViewPort(){
767	
768	$vp_size = $(window).width();
769	if($(window).width() > $(window).height()){
770		$vp_size = $(window).height();
771	}
772	
773	if($vp_size < 480){
774		$(".call-to-action").css({"display":"block"});
775	}else{
776		$(".call-to-action").css({"display":"none"});
777	}
778	
779}
780function setIframeHeight(iframeId) {
781	var ifDoc, ifRef = document.getElementById( iframeId );
782	
783	//alert(ifRef);
784	
785	try {
786		ifDoc = ifRef.contentWindow.document.documentElement;
787	} catch (e) {
788			
789		try {
790			ifDoc = ifRef.contentDocument.documentElement;
791		} catch (ee) { } 
792	}
793	
794	
795	if (ifDoc) {
796		ifRef.height = 1;
797		ifRef.height = ifDoc.scrollHeight;
798	}
799	
800}
801function resizeIcons(){
802	if($(window).width() < 640){
803		$(".fullwidth:not(.section)").css({"height":($(window).width()/2)});
804		/*
805		if($("#footer").hasClass("reveal")){
806			$("body").css({"margin-bottom":0});	
807			$("#footer").css({"position":"relative","z-index":"0","bottom":"0"});
808		}
809		*/
810	}else{
811		if($("#banner").hasClass("fullheight")){
812			$(".fullwidth:not(.section)").css({"height":$(window).height()});
813		}else{
814			//console.log($(window).width()/2.4);
815			//$(".fullwidth:not(.section)").css({"height":($(window).width()/2.4)});
816		}
817		//$("body:not([page=index]) .fullwidth:not(.section)").css({"height":$("#header").height()+200});
818		/*
819		if($("#footer").hasClass("reveal")){
820			$("body").css({"margin-bottom":$("#footer").height()});	
821			$("#footer").css({"position":"fixed","z-index":"0","bottom":"0"});
822		}
823		*/
824	}
825	
826	
827	/***************************************************************************************************************/
828	
829	if($("#banner-icons").length > 0){
830		if($("#banner-icons.bottom").length == 0){
831			if($("#banner-icons .wrapper > ul > li:not(.active) ul").css("display") != "none"){
832				$("#banner-icons").css({"margin-top":($("#header").height() + (($("#banner").height()-$("#header").height()-$(".bannertext").height())/2) - ($("#banner-icons").height()/2))});
833			}else{
834				$("#banner-icons").css({"margin-top":$("#header").outerHeight()+(($("#banner").outerHeight()-$(".bannertext").height())/2) - ($("#banner-icons").outerHeight()/2)+5});
835				//console.log("fsd");
836			}
837		}else{
838			if($("#banner-icons.bottom").css("position") == "absolute"){
839				if($("#banner-icons").hasClass("fullheight")){
840					$("#banner-icons.bottom").css({"margin-top":$(window).height()-$("#banner-icons").height()-10});				
841				}else{
842					$("#banner-icons.bottom").css({"margin-top":$("#banner").height()-$("#banner-icons").height()});	
843				}
844				
845			}else{
846				$("#banner-icons.bottom").css({"margin-top":0});
847			}
848		}
849	}
850	
851	if(($("#footer").height() + 0) > $(window).height() || $("footer ").length > 0){
852		$("#footer").removeClass("reveal");
853		$("body").css({"margin-bottom":0});	
854		$("#footer").css({"position":"relative","z-index":"0","bottom":"0"});
855	}else{
856		$("#footer").addClass("reveal");
857		$("body").css({"margin-bottom":$("#footer").height()});	
858		$("#footer").css({"position":"fixed","z-index":"0","bottom":"0"});
859	}
860}

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.