PageSourceSearch

https://flycapeair.com/scripts/main.js?4

js flycapeair.com collected 2026-09-26 01:05:02 UTC 3,500 bytes, 121 lines download raw bytes

1$(document).ready(function(){
2
3	// Top navigation mobile/non-mobile switching
4	var sf, body;
5	var breakpoint = 480;
6	body = $('body');
7	sf = $('.top-navigation>ul');
8	if(body.width() >= breakpoint) {
9		sf.superfish({cssArrows: false});
10	}
11	$(window).resize(function() {
12		if(body.width() >= breakpoint && !sf.hasClass('sf-js-enabled')) {
13			sf.superfish('init',{cssArrows: false});
14			$("ul.sf-menu").show();
15			$("ul.sf-menu li.open").removeClass("open");
16		} else if(body.width() < breakpoint) {
17			sf.superfish('destroy');
18			$("ul.sf-menu").css("display","block").hide();
19		}
20	});
21	$('#mobnav-btn').click(function () {
22		$(this).next("ul.sf-menu").slideToggle("fast");
23		$("ul.sf-menu li.open > ul").hide();
24		$("ul.sf-menu li.open").removeClass("open");
25	});
26	$('.mobnav-subarrow').click(function () {
27		$(this).parent().find("> .sf-mega").slideToggle("fast");
28		$(this).parent().toggleClass("open");
29	});
30	$('.quick-reservation h1').click(function(e) {
31		$(this).next('form').slideToggle();
32		$(this).next('form').toggleClass('expanded');
33	});
34	$(window).resize(function() {
35		$('.quick-reservation h1').next('form').css("display","");	
36	});
37	/*
38	$('ul.tab-row li').click(function(){
39		var tab_id = $(this).attr('data-tab');
40		$('ul.tab-row li').removeClass('current');
41		$('.tab-content').removeClass('current');
42		$(this).addClass('current');
43		$("#"+tab_id).addClass('current');
44	})
45	*/
46	function secondarynav() {
47		var tabWidth = $(".secondary-navigation nav>a span").width(); 
48		var navWidth = $(".secondary-navigation nav>ul").width();
49		var navClosedPosition = navWidth-tabWidth
50		$(".secondary-navigation").css("left",-navClosedPosition);
51		
52		$(".secondary-navigation nav>a span").click(function(e) {
53			$(this).parents(".secondary-navigation").toggleClass("open");
54			e.preventDefault();
55		});
56		
57		// hide menu on smaller screens where it would cover other content
58		//console.log(body.width());
59	    if(body.width() < 1200) {
60            setTimeout(function() {
61                $(".secondary-navigation").removeClass("open");
62            }, 200);
63		}
64		
65	}
66	secondarynav()
67	
68	$('.travel-destinations ul>li>ul').each(function(index, element) {
69		var container=$(this).parents(".travel-destinations");
70		var parent=$(this).parent("li");
71		var parentOffset=parent.position();
72		var parenttop = parentOffset.top;
73		var parentleft = parentOffset.left;
74		var parentbottom = parenttop + parent.outerHeight();
75		var parentright = parentleft + parent.outerWidth();		// var position = this.position();
76		var width = container.outerWidth();
77		
78		$(this).css({
79			left:0, 
80			top:parentbottom-2,
81			width:width
82		})
83	});
84	
85	$('.travel-destinations ul>li').click(function(e) {
86		if ($(this).hasClass('active')) {
87			$(this).toggleClass('active');	
88		}
89		else {
90		$('.travel-destinations ul>li').removeClass('active')
91			$(this).addClass('active')
92		}
93	});
94	
95	
96	
97	
98	$("nav.footer-navigation>ul").tinyNav({
99	  header: 'Navigation',
100	  indent: '- '
101	});
102	
103	// Basic PDF Event tracking for GA
104	$("a[href$='pdf']").each(function(index) {
105		pdfLabel = $(this).attr('href');
106		pdfOnClick = "_gaq.push(['_trackEvent', 'PDF', 'Download', '" + pdfLabel + "']);";
107		$(this).attr("onClick", pdfOnClick);
108    });
109});
110
111function customAlert(message) {
112	//alert(message); return;
113	$.magnificPopup.open({
114		items: {
115			src: '<div class="white-popup"><div>' + message + '</div><div class="white-popup-buttons"><button onclick="$.magnificPopup.close();">Close</button></div></div>',
116			type: 'inline'
117		}
118	});
119}
120
121

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.