PageSourceSearch

https://i.compasspub.com/eng/front/js/main.js?v=20200512

js compasspub.com collected 2026-10-02 06:37:14 UTC 3,721 bytes, 107 lines download raw bytes

1// 메인 비주얼
2function mainVisual() {
3	var $delay = 4000;
4	var $textSpeed = 600;
5	var $bgSpeed = 1200;
6	var $motion = "";
7	var $listLen = $(".visual").find("> li").length;
8	var $index = Math.floor(Math.random() * 0);
9	var $prevBtn = $(".menu li > a").eq($index).parent();
10	var $timer = setInterval(timerHandler, $delay);
11	var $focus = false;
12
13	clickHandler($prevBtn);
14	$(".mainVisual .menu li:eq(" + $index + ")").addClass("on");
15
16	$(".mainVisual .menu a, .direction .slideNext").hover(function() {
17		clearInterval($timer);
18	}, function() {
19		if (!$focus) {
20			clearInterval($timer);
21			$timer = setInterval(timerHandler, $delay);
22		}
23	});
24
25	$(".mainVisual .menu a").focusin(function() {
26		$focus = true;
27		clearInterval($timer);
28	});
29
30	$(".mainVisual .menu a").focusout(function() {
31		$focus = false;
32		$(".mainVisual .menu li").removeClass("on");
33		$(".mainVisual .menu li:eq(" + $prevBtn.index() + ")").addClass("on");
34		clearInterval($timer);
35		$timer = setInterval(timerHandler, $delay);
36	});
37
38	$(".mainVisual .menu a").on("click", function(e) {
39		e.preventDefault();
40		$(this).blur();
41		clickHandler($(this).parent());
42	});
43
44	$(".direction .slideNext").on("click", function(e) {
45		e.preventDefault();
46		if ($prevBtn.index() < $(".menu li").length - 1) {
47			clickHandler($(".menu li").eq($prevBtn.index() + 1));
48		} else {
49			clickHandler($(".menu li").eq(0));
50		}
51	});
52
53	function clickHandler(tg) {
54		$(".mainVisual .menu li").removeClass("on");
55		$(".mainVisual .menu li:eq(" + tg.index() + ")").addClass("on");
56		// mainOffBtn();
57		if ($prevBtn) {
58			//if (tg.index() ==0)
59			// booknaru 맨 뒤로 링크
60			//if (tg.index() == 3)
61			//{
62			//	document.getElementById('option_div').style.display ='block'  	
63			//}
64			//else
65			//{
66			//	document.getElementById('option_div').style.display ='none'  
67			//}
68			
69			$(".visual li").eq(tg.index()).find(".bg").css({"z-index":"999"});
70			
71			if ($prevBtn.index() < tg.index()) {
72				//$(".visual li").eq($prevBtn.index()).find(".slideTxt").css({"z-index":"3"});
73				//$(".visual li").eq($prevBtn.index()).find(".bg").stop().animate({"opacity": "0"}, $bgSpeed, $motion);
74				$(".visual li").eq($prevBtn.index()).find(".slideTxt");
75				$(".visual li").eq($prevBtn.index()).find(".bg").css({"z-index":"3"}).stop().animate({"opacity": "0"}, $bgSpeed, $motion);
76				$(".visual li").eq($prevBtn.index()).find(".slideTxt").stop().animate({"opacity": "0"}, $textSpeed, $motion);
77			} else if ($prevBtn.index() > tg.index()) {
78				//$(".visual li").eq($prevBtn.index()).find(".slideTxt").css({"z-index":"3"});
79				//$(".visual li").eq($prevBtn.index()).find(".bg").stop().animate({"opacity": "0"}, $bgSpeed, $motion);
80				$(".visual li").eq($prevBtn.index()).find(".slideTxt");
81				$(".visual li").eq($prevBtn.index()).find(".bg").css({"z-index":"3"}).stop().animate({"opacity": "0"}, $bgSpeed, $motion);
82				$(".visual li").eq($prevBtn.index()).find(".slideTxt").stop().animate({"opacity": "0"}, $textSpeed, $motion);
83			}
84		}
85		$(".visual li").eq(tg.index()).find(".slideTxt").css({"z-index":"4"});
86		$(".visual li").eq(tg.index()).find(".slideTxt").stop().animate({"opacity": "1"}, $textSpeed, $motion);
87		$(".visual li").eq(tg.index()).find(".bg").stop().animate({
88			"opacity": "1"
89		}, {
90			queue: true,
91			duration:  $bgSpeed,
92			complete: function() {
93				clearInterval($timer);
94				$timer = setInterval(timerHandler, $delay);
95			}
96		});
97		$prevBtn = tg;
98	}
99
100	function timerHandler() {
101		if ($prevBtn.index() < $(".menu li").length - 1) {
102			clickHandler($(".menu li").eq($prevBtn.index() + 1));
103		} else {
104			clickHandler($(".menu li").eq(0));
105		}
106	}
107}

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.