PageSourceSearch

https://visualizingnyc.org/broadway-and-ann/wp-content/themes/broadway-and-ann2/js/project.js?ver=7.1.2

js visualizingnyc.org collected 2026-09-24 23:34:22 UTC 8,390 bytes, 206 lines download raw bytes

1(function ($) {
2	$(document).ready(function(){
3		window.addEventListener('load', function() {
4		    FastClick.attach(document.body);
5		}, false);
6		$("header .menu-toggle").on("click",function(){
7			$("body").toggleClass("showMenu");
8		});
9		$(".colorbox").colorbox({ opacity:0.9, maxWidth:"95%", maxHeight:"95%", });
10		
11		$(".overlayLink").hover(function(){
12			$(this).parent().addClass("hovered");
13		},function(){
14			$(this).parent().removeClass("hovered");
15		});
16		$("header .menu-toggle").on("click",function(){
17			$("body").removeClass("showSearchForm");
18			if(!($("body").hasClass("showMenu"))){
19				$("body").removeClass("showMenu");
20			} else {
21				$("body").addClass("showMenu");
22			}
23		});
24
25		$("header .search-toggle").on("click",function(){
26			$("body").removeClass("showMenu");
27			if($("body").hasClass("showSearchForm")){
28				$("body").removeClass("showSearchForm");
29			} else {
30				$("body").addClass("showSearchForm");
31			}
32		});
33		$("#overlay-plus").hover(function(){
34			$(this).parent().parent().addClass("hovered");
35		},function(){
36			$(this).parent().parent().removeClass("hovered");
37		});
38		$(".image-has-enlargement").hover(function(){
39			if ($(this).hasClass("left")) {
40				$(".caption-wrap.left .colorbox").addClass("hover");
41			} else if($(this).hasClass("right")) {
42				$(".caption-wrap.right .colorbox").addClass("hover");
43			} else {
44				$("#overlay-plus").addClass("hover");
45			}
46		},function(){
47			if ($(this).hasClass("left")) {
48				$(".caption-wrap.left .colorbox").removeClass("hover");
49			} else if($(this).hasClass("right")) {
50				$(".caption-wrap.right .colorbox").removeClass("hover");
51			} else {
52				$("#overlay-plus").removeClass("hover");
53			}
54		});
55		$(".image-has-enlargement").click(function(e) {
56			if ($(this).hasClass("left")) {
57				$(".caption-wrap.left .colorbox").trigger("click");
58			} else if($(this).hasClass("right")) {
59				$(".caption-wrap.right .colorbox").trigger("click");
60			} else {
61				$("#overlay-plus").trigger("click");
62			}
63			
64		})
65		$("#cboxLoadedContent").on("click", function(e) {
66			console.log('')
67			$("#cboxClose").trigger("click");
68		})
69		if($("body").hasClass("page-template-page-over-time-years-php") || $("body").hasClass("page-template-page-landmark-images-php")){
70			var numChildren = $(".image-nav .sub-menu .sub-menu .current-menu-item").parent().find("li").size();
71			var current = ($(".image-nav .sub-menu .sub-menu .current-menu-item").index() + 1);
72			var arrayPages = $(".image-nav .sub-menu .sub-menu .current-menu-item").parent().find("li");
73			var markerX = $("#map-marker").data("xcoord")+"%";
74			var markerY = $("#map-marker").data("ycoord")+"%";
75			var markerRotation = "rotate("+$("#map-marker").data("rotation")+"deg)";
76			console.log(markerRotation);
77			$("#map-marker").css("top", markerY).css("left", markerX).css("transform", markerRotation).css("-webkit-transform", markerRotation).css("-ms-transform", markerRotation).css("-moz-transform", markerRotation);
78			arrayPages.each(function(index){
79				var $currentPage = arrayPages[index];
80				console.log($currentPage);
81				 // console.log($currentPage.classList.contains("current-menu-item"));
82				if (hasTheClass($currentPage, "current-menu-item")) {
83					var $nextPage = $currentPage.nextSibling.nextSibling;
84					var $previousPage = $currentPage.previousSibling.previousSibling;
85					var $nextSection = $currentPage.parentNode.parentNode.nextSibling.nextSibling;
86					var $previousSection = $currentPage.parentNode.parentNode.previousSibling.previousSibling;
87					if ($("body").hasClass("page-template-page-landmark-images-php")) {
88						$previousSection= $currentPage.parentNode.parentNode;
89					}
90					if ($nextPage === null) {
91						if ($nextSection === null) {
92							$(".next").removeClass("show");
93							$(".next").css("display", "none");
94							$(".previous").addClass("show");
95							$(".previous").css("right", 3);
96							$(".previous").attr("href", $previousPage.childNodes[0].href);
97						} else {
98							$(".next").addClass("show");
99							$(".previous").addClass("show");
100							$(".text.right").text($nextSection.childNodes[0].text);
101							$(".next div").css("display", "inline-block").text($nextSection.childNodes[0].text);
102							$(".next").attr("href", $nextSection.childNodes[0].href);
103							$(".previous").attr("href", $previousPage.childNodes[0].href);
104						}
105					} else if ($previousPage === null) {
106						if ($previousSection === null) {
107							$(".previous").removeClass("show");
108							$(".next").addClass("show");
109							$(".next").attr("href", $nextPage.childNodes[0].href);
110						} else {
111							$(".next").addClass("show");
112							$(".previous").addClass("show");
113							$(".text.left").text($previousSection.childNodes[0].text);
114							// $(".previous div").css("display", "inline-block").text($previousSection.childNodes[0].text);
115							$(".previous").attr("href", $previousSection.childNodes[0].href);
116							$(".next").attr("href", $nextPage.childNodes[0].href);
117						}
118					} else {
119						$(".next").addClass("show");
120						$(".previous").addClass("show");
121						$(".next").attr("href", $nextPage.childNodes[0].href);
122						$(".previous").attr("href", $previousPage.childNodes[0].href);
123					}
124				}
125			})
126			$(".pagination").append(current + " of " + numChildren);
127		} else if ($("body").hasClass("page-template-page-landmark-intro-php")) {
128			var $previousSection = $(".current-menu-item").get(0).previousSibling.previousSibling;
129			var $firstImage = $(".current-menu-item .sub-menu").find("li")[0].firstChild;
130			console.log($previousSection);
131			$(".next").addClass("show");
132			$(".next").attr("href", $firstImage.href);
133			if ($previousSection) {
134				$(".previous").addClass("show");
135				$(".previous").attr("href", $previousSection.firstChild.href);
136			}
137
138		}
139		
140
141
142		if ($("body").hasClass("page-template-page-landmark-images-php")) {
143			$(".zoom-box").each(function() {
144				$(this).css("top", $(this).data("ycoord") + "%").css("left", $(this).data("xcoord") + "%");
145			}).each(function(){
146				$(this).on("click", function(e) {
147					$(".main-image, .zoom-box, .main-caption").css("opacity", "0");
148					$(".zoom-overlay[data-box="+$(this).data("box")+"]").css("opacity", "1").css("z-index", "1");
149					if (!($("body").hasClass("kiosk"))) {
150						$(".image-info").animate({
151                        scrollTop: $("#desc-" + $(this).data("desc")).position().top - $(".image-info").position().top
152                    }, 400);
153					}
154					
155                    $(".desc").css("opacity", "0.5");
156                     $(".desc-num").removeClass("underline");
157                    $("#desc-" + $(this).data("desc")).css("opacity", "1");
158                    console.log("#desc-" + $(this).data("desc") + " desc-num");
159                    $("#desc-" + $(this).data("desc") + " .desc-num").addClass("underline");
160				})
161			});
162			$(".overlay-minus, .overlay-img").on("click", function(e) {
163				$(".main-image, .zoom-box, .main-caption").css("opacity", "1");
164				$(".zoom-overlay").css("opacity", "0").css("z-index", "-3");
165				$(".desc").css("opacity", "1");
166			});
167			$(".desc").each(function() {
168				$(this).on("click", function(e) {
169					$(".overlay-minus").trigger("click");
170					$num = $(this).data("desc");
171					console.log($num);
172					$(".zoom-box[data-desc='"+$num+"']").trigger("click");
173				})
174			});
175		}
176
177
178		if($("body").hasClass("kiosk")){
179			$("body").append("<div class=\"attract-overlay\"><div class=\"vidLoad\"></div><div class=\"closeOverlay\"></div></div>");
180			var kioskTimer = null;
181			if($("body").hasClass("home")){
182				kioskTimer = setTimeout(showAttract,90000);
183			} else {
184				kioskTimer = setTimeout(function(){
185					window.location="/broadway-and-ann/";
186				},90000);
187			}
188
189			$(".closeOverlay").on("click",function(){
190				$("body").removeClass("attract");
191				setTimeout(function(){
192					$(".vidLoad").html("");
193				},1000);
194				kioskTimer = setTimeout(showAttract,90000);
195			});
196		}
197	});
198
199	function showAttract(){
200		$(".vidLoad").html("<video id=\"singleVid\" class=\"video-js standard-inline-video vjs-default-skin chips-vi
200d-skin-controls\" width=\"640\" height=\"360\"\ webkit-playsinline autoload=false autoplay loop preload=none><source src=\"/AttractScreens-Broadway-and-Ann.mp4\" type='video/mp4' /></video>");
201		$("body").addClass("attract");
202	}
203	function hasTheClass(element, cls) {
204	    return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
205	}
206})(jQuery);

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.