1(function($) { 2 3 jQuery(document).ready(function(){ 4 $('.header-menu-item-lang svg:not(.header-menu-item-lang.show svg)').on('click', function () { 5 const container = $('.header-menu-list'); 6 const itemTop = $(this).position().top + 150; 7 8 container.animate({ 9 scrollTop: itemTop 10 }, 300); 11}); 12 13}) 14 15 16function autoHeightAnimate(element, time) { 17 const curHeight = element.height(); 18 const autoHeight = element.css("height", "auto").height(); 19 element.height(curHeight); 20 element.stop().animate({ height: autoHeight }, time); 21} 22 23$(".header-insiderone .header-banner-close button").click(() => { 24 $(".header-insiderone .header-banner").addClass("hide"); 25}); 26 27let langTimeout; 28 29$(".header-insiderone .header-top-action-lang").on("mouseenter", () => { 30 clearTimeout(langTimeout); 31 $(".header-insiderone .header-top-action-lang").addClass("show"); 32}); 33 34$(".header-insiderone .header-top-action-lang").on("mouseleave", () => { 35 langTimeout = setTimeout(() => { 36 $(".header-insiderone .header-top-action-lang").removeClass("show"); 37 }, 100); 38}); 39 40$(".header-insiderone .header-hamburger button").click(() => { 41 $(".header-insiderone .header-hamburger button").toggleClass("open"); 42 $(".header-insiderone .header-menu").toggleClass("show"); 43 if ($(".header-insiderone .header-menu").hasClass("show")) { 44 const height = $(window).height() - 64; 45 $(".header-insiderone .header-menu").animate({ height }, 500); 46 } else { 47 $(".header-insiderone .header-menu").animate({ height: 0 }, 500); 48 } 49}); 50 51$(".header-insiderone .header-menu-item-lang > button").click(() => { 52 $(".header-insiderone .header-menu-item-lang").toggleClass("show"); 53 if ($(".header-insiderone .header-menu-item-lang").hasClass("show")) { 54 autoHeightAnimate($(".header-insiderone .header-menu-item-lang-list"), 500); 55 } else { 56 $(".header-insiderone .header-menu-item-lang-list").animate( 57 { height: 0 }, 58 500 59 ); 60 } 61}); 62 63if ($(window).width() <= 1023) { 64 $(".header-insiderone .header-inner-menu-button button").click(() => { 65 $(".header-insiderone .header-inner-menu-button button").toggleClass( 66 "show" 67 ); 68 if ( 69 $(".header-insiderone .header-inner-menu-button button").hasClass("show") 70 ) { 71 autoHeightAnimate($(".header-insiderone .header-inner-menu-list"), 500); 72 } else { 73 $(".header-insiderone .header-inner-menu-list").animate( 74 { height: 0 }, 75 500 76 ); 77 } 78 }); 79 80 $(document).click((e) => { 81 if (!$(e.target).closest(".header-insiderone .header-inner-menu").length) { 82 $(".header-insiderone .header-inner-menu-button button").removeClass( 83 "show" 84 ); 85 $(".header-insiderone .header-inner-menu-list").animate( 86 { height: 0 }, 87 500 88 ); 89 } 90 }); 91} 92 93$(() => { 94 let hoverTimeout; 95 let itemAnimationTimeouts = []; 96 const animateTime = 300; 97 let currentDropdown = null; 98 99 function clearItemAnimations() { 100 itemAnimationTimeouts.forEach((timeout) => clearTimeout(timeout)); 101 itemAnimationTimeouts = []; 102 } 103 104 $(".header-insiderone .header-menu-item").each((index, element) => { 105 const $menuItem = $(element); 106 const $button = $menuItem.find("button"); 107 const $dropdown = $menuItem.find(".header-menu-item-dropdown"); 108 109 if ($button.length && $dropdown.length) { 110 $menuItem.on("mouseenter", () => { 111 if ($(window).width() > 1023) { 112 clearTimeout(hoverTimeout); 113 clearItemAnimations(); 114 115 $(".header-insiderone .header-menu-bg").stop(true, false); 116 117 $(".header-insiderone .header-menu-item-dropdown").removeClass( 118 "show" 119 ); 120 $(".header-insiderone .header-menu-item button").removeClass("show"); 121 122 currentDropdown = $dropdown; 123 124 $(".header-insiderone .header-menu-bg").addClass("show"); 125 126 $dropdown.addClass("show").css({ 127 visibility: "hidden", 128 display: "flex", 129 }); 130 131 const dropdownHeight = $dropdown.outerHeight(); 132 133 $dropdown.removeClass("show").css({ 134 visibility: "visible", 135 display: "", 136 }); 137 138 $(".header-insiderone .header-menu-bg").animate( 139 { height: dropdownHeight }, 140 animateTime, 141 () => { 142 if (currentDropdown && currentDropdown.is($dropdown)) { 143 $dropdown.addClass("show"); 144 $button.addClass("show"); 145 } 146 } 147 ); 148 } 149 }); 150 151 $menuItem.on("mouseleave", () => { 152 if ($(window).width() > 1023) { 153 clearItemAnimations(); 154 155 hoverTimeout = setTimeout(() => { 156 currentDropdown = null; 157 158 $(".header-insiderone .header-menu-bg").stop(true, false); 159 160 $(".header-insiderone .header-menu-item-dropdown").removeClass( 161 "show" 162 ); 163 $(".header-insiderone .header-menu-item button").removeClass( 164 "show" 165 ); 166 $(".header-insiderone .header-menu-bg").removeClass("show"); 167 $(".header-insiderone .header-menu-bg").animate( 168 { height: 0 }, 169 animateTime 170 ); 171 }, 100); 172 } 173 }); 174 175 $button.on("click", (e) => { 176 if ($(window).width() <= 1023) { 177 e.preventDefault(); 178 179 const isCurrentlyOpen = $dropdown.hasClass("show"); 180 $(".header-insiderone .header-menu-item-lang").removeClass("show"); 181 $(".header-insiderone .header-menu-item-lang-list").animate( 182 { height: 0 }, 183 animateTime 184 ); 185 $(".header-insiderone .header-menu-item-dropdown").each((i, el) => { 186 const $otherDropdown = $(el); 187 if (!$otherDropdown.is($dropdown)) { 188 $otherDropdown 189 .removeClass("show") 190 .stop() 191 .animate({ height: 0 }, animateTime); 192 } 193 }); 194 $(".header-insiderone .header-menu-item button").removeClass("show"); 195 196 if (isCurrentlyOpen) { 197 $dropdown 198 .removeClass("show") 199 .stop() 200 .animate({ height: 0 }, animateTime); 201 $button.removeClass("show"); 202 } else { 203 $dropdown.addClass("show"); 204 $button.addClass("show"); 205 autoHeightAnimate($dropdown, animateTime); 206 } 207 } 208 }); 209 } 210 }); 211 212 $(document).click((e) => { 213 if ($(window).width() <= 1023) { 214 if (!$(e.target).closest(".header-insiderone .header-menu-item").length) { 215 $(".header-insiderone .header-menu-item-dropdown") 216 .removeClass("show") 217 .stop() 218 .animate({ height: 0 }, animateTime); 219 $(".header-insiderone .header-menu-item button").removeClass("show"); 220 } 221 } 222 }); 223}); 224 225let lastScrollTop = 0; 226let scrollTimeout; 227 228$(window) 229 .on("scroll", () => { 230 // Scroll event'ini throttle et 231 if (scrollTimeout) { 232 clearTimeout(scrollTimeout); 233 } 234 235 scrollTimeout = setTimeout(() => { 236 const currentScrollTop = $(window).scrollTop(); 237 238 // Scroll pozisyonu gerçekten deÄiÅti mi kontrol et 239 if (Math.abs(currentScrollTop - lastScrollTop) < 1) { 240 return; // Ãok küçük deÄiÅiklikler için iÅlem yapma 241 } 242 243 // Scroll direction kontrolü - sadece anlamlı scroll deÄiÅikliklerinde 244 if (currentScrollTop > lastScrollTop && currentScrollTop > 30) { 245 // AÅaÄı scroll 246 if (!$(".header.header-insiderone").hasClass("scrolled")) { 247 $(".header.header-insiderone").addClass("scrolled"); 248 $(".header-banner").addClass("hide"); 249 250 setTimeout(() => { 251 $(".header-inner-menu-action").addClass("show"); 252 }, 1500); 253 } 254 } else if (currentScrollTop < lastScrollTop) { 255 // Yukarı scroll 256 if ($(".header.header-insiderone").hasClass("scrolled")) { 257 $(".header.header-insiderone").removeClass("scrolled"); 258 setTimeout(() => { 259 $(".header-inner-menu-action").removeClass("show"); 260 }, 1500); 261 } 262 } 263 264 // Light theme kontrolü 265 let isInLightTheme = false;
266 267 $(".light-theme").each(function () { 268 const sectionTop = $(this).offset().top; 269 const sectionBottom = sectionTop + $(this).outerHeight(); 270 271 if ( 272 currentScrollTop >= sectionTop && 273 currentScrollTop <= sectionBottom 274 ) { 275 isInLightTheme = true; 276 return false; 277 } 278 }); 279 280 if (isInLightTheme) { 281 $("header").addClass("header-light"); 282 } else { 283 $("header").removeClass("header-light"); 284 } 285 286 lastScrollTop = currentScrollTop; 287 }, 10); // 10ms throttle 288 }) 289 .trigger("scroll"); 290 291})(jQuery); 292function CheckObjectVisibility() { 293 $( 294 ".fadeInUp-scroll:not(.visible), .scale-scroll:not(.visible) , .opacity-scroll:not(.visible)" 295 ).each(function (i) { 296 const objectTop = $(this).offset().top; 297 const windowBottom = $(window).scrollTop() + $(window).outerHeight(); 298 const instance = $(this); 299 const delay = instance.data("delay") || 0; 300 301 if (windowBottom > objectTop - 50) { 302 window.setTimeout(function () { 303 instance.addClass("visible"); 304 }, delay); 305 } 306 }); 307} 308 309function ImageAnimation() { 310 $(".image-animation:not(.visible)").each(function (i) { 311 const objectTop = $(this).offset().top; 312 const windowBottom = $(window).scrollTop() + $(window).outerHeight(); 313 const instance = $(this); 314 const delay = instance.data("delay") || 0; 315 316 if (windowBottom > objectTop - 100) { 317 window.setTimeout(function () { 318 instance.addClass("animate"); 319 }, delay); 320 } 321 }); 322} 323function Animations() { 324 CheckObjectVisibility(); 325 ImageAnimation(); 326}
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.