1(function ($) { 2 "use strict"; 3 4 $(document).ready(function () { 5 /*dropdown menu hover*/ 6 if (document.documentElement.clientWidth > 991) { 7 // menu for dropdown 8 $(".navigation-box ul li.dropdown").hover( 9 function () { 10 $(this) 11 .children("ul.dropdown-menu") 12 .stop(true, true) 13 .delay(200) 14 .fadeIn(500); 15 $(this).addClass("open"); 16 }, 17 function () { 18 $(this) 19 .children("ul.dropdown-menu") 20 .stop(true, true) 21 .delay(200) 22 .fadeOut(500); 23 $(this).removeClass("open"); 24 }, 25 ); 26 } 27 28 // fixed video 29 var div_top = $(".video-player"); 30 if (div_top.length) { 31 div_top = div_top.offset().top; 32 } 33 34 if (document.documentElement.clientWidth > 991) { 35 $(window).scroll(function () { 36 var window_top = $(window).scrollTop() - 0; 37 if (window_top > div_top + 1000) { 38 if (!$(".video-player").is(".fixed-video")) { 39 $(".video-player").addClass("fixed-video slideInDown animated"); 40 $(".video-player").removeClass("show-hide-vid"); 41 } 42 } else { 43 $(".video-player").removeClass("fixed-video slideInDown animated"); 44 } 45 }); 46 } 47 48 // home main slider 49 if ($(".home-slider").length && typeof $.fn.owlCarousel !== "undefined") { 50 $(".home-slider").owlCarousel({ 51 items: 1, 52 loop: true, 53 autoplay: true, 54 animateOut: "fadeOut", 55 autoplayHoverPause: true, 56 singleItem: true, 57 dots: false, 58 nav: true, 59 responsiveClass: true, 60 onInitialize: function (event) { 61 if ($(".home-slider .item").length <= 1) { 62 this.settings.loop = false; 63 this.settings.nav = false; 64 this.settings.dots = false; 65 } 66 }, 67 responsive: { 68 0: { 69 items: 1, 70 nav: false, 71 dots: true, 72 loop: true, 73 }, 74 600: { 75 items: 1, 76 nav: false, 77 dots: true, 78 loop: true, 79 }, 80 1000: { 81 items: 1, 82 nav: false, 83 dots: true, 84 loop: true, 85 }, 86 }, 87 }); 88 } 89 90 // main slider 91 if ($(".main-slider").length && typeof $.fn.owlCarousel !== "undefined") { 92 $(".main-slider").owlCarousel({ 93 items: 1, 94 loop: false, 95 margin: 0, 96 autoplay: true, 97 animateOut: "fadeOut", 98 autoplayHoverPause: true, 99 singleItem: true, 100 dots: true, 101 nav: false, 102 responsiveClass: true, 103 onInitialize: function (event) { 104 if ($(".main-slider .items").length <= 1) { 105 this.settings.loop = false; 106 this.settings.nav = false; 107 this.settings.dots = false; 108 } 109 }, 110 responsive: { 111 0: { 112 items: 1, 113 nav: false, 114 dots: true, 115 margin: 0, 116 }, 117 600: { 118 items: 1, 119 nav: false, 120 dots: true, 121 }, 122 1000: { 123 items: 1, 124 nav: false, 125 dots: true, 126 }, 127 }, 128 navText: [ 129 '<i class="fal fa-chevron-left"></i>', 130 '<i class="fal fa-chevron-right"></i>', 131 ], 132 }); 133 } 134 135 // news slider 136 if ($(".news-slider").length && typeof $.fn.owlCarousel !== "undefined") { 137 $(".news-slider").owlCarousel({ 138 items: 1, 139 loop: false, 140 margin: 25, 141 autoplay: false, 142 autoplayHoverPause: true, 143 singleItem: true, 144 dots: true, 145 nav: false, 146 responsiveClass: true, 147 onInitialize: function (event) { 148 if ($(".news-slider .items").length <= 1) { 149 this.settings.loop = false; 150 this.settings.nav = false; 151 this.settings.dots = false; 152 } 153 }, 154 responsive: { 155 0: { 156 items: 1, 157 nav: false, 158 dots: true, 159 }, 160 600: { 161 items: 2, 162 nav: false, 163 dots: true, 164 }, 165 1024: { 166 items: 2, 167 nav: false, 168 dots: true, 169 }, 170 1100: { 171 items: 2, 172 nav: false, 173 dots: true, 174 }, 175 }, 176 navText: [ 177 '<i class="fal fa-chevron-left"></i>', 178 '<i class="fal fa-chevron-right"></i>', 179 ], 180 }); 181 } 182 183 // bishesh slider 184 if ( 185 $(".bishesh-slider").length && 186 typeof $.fn.owlCarousel !== "undefined" 187 ) { 188 $(".bishesh-slider").owlCarousel({ 189 items: 1, 190 loop: false, 191 margin: 25, 192 autoplay: false, 193 autoplayHoverPause: true, 194 singleItem: true, 195 dots: true, 196 nav: false, 197 responsiveClass: true, 198 onInitialize: function (event) { 199 if ($(".bishesh-slider .items").length <= 1) { 200 this.settings.loop = false;
201 this.settings.nav = false; 202 this.settings.dots = false; 203 } 204 }, 205 responsive: { 206 0: { 207 items: 1, 208 nav: false, 209 dots: true, 210 margin: 0, 211 }, 212 600: { 213 items: 2, 214 nav: false, 215 dots: true, 216 }, 217 1024: { 218 items: 3, 219 nav: false, 220 dots: true, 221 }, 222 1100: { 223 items: 3, 224 nav: true, 225 dots: false, 226 }, 227 }, 228 navText: [ 229 '<i class="fal fa-chevron-left"></i>', 230 '<i class="fal fa-chevron-right"></i>', 231 ], 232 }); 233 } 234 235 // bichar slider 236 if ($(".bichar-slider").length && typeof $.fn.owlCarousel !== "undefined") { 237 $(".bichar-slider").owlCarousel({ 238 items: 1, 239 loop: false, 240 margin: 25, 241 autoplay: false, 242 autoplayHoverPause: true, 243 singleItem: true, 244 dots: true, 245 nav: false, 246 responsiveClass: true, 247 onInitialize: function (event) { 248 if ($(".bichar-slider .items").length <= 1) { 249 this.settings.loop = false; 250 this.settings.nav = false; 251 this.settings.dots = false; 252 } 253 }, 254 responsive: { 255 0: { 256 items: 1, 257 nav: false, 258 dots: true, 259 margin: 0, 260 }, 261 600: { 262 items: 2, 263 nav: false, 264 dots: true, 265 }, 266 1024: { 267 items: 3, 268 nav: false, 269 dots: true, 270 }, 271 1100: { 272 items: 5, 273 nav: false, 274 dots: true, 275 }, 276 }, 277 navText: [ 278 '<i class="fal fa-chevron-left"></i>', 279 '<i class="fal fa-chevron-right"></i>', 280 ], 281 }); 282 } 283 284 // story slider 285 if ($(".story-slider").length && typeof $.fn.owlCarousel !== "undefined") { 286 $(".story-slider").owlCarousel({ 287 items: 1, 288 loop: false, 289 margin: 25, 290 autoplay: false, 291 autoplayHoverPause: true, 292 singleItem: true, 293 dots: true, 294 nav: false, 295 responsiveClass: true, 296 onInitialize: function (event) { 297 if ($(".story-slider .items").length <= 9) { 298 this.settings.loop = false; 299 this.settings.nav = false; 300 this.settings.dots = false; 301 } 302 }, 303 responsive: { 304 0: { 305 items: 3, 306 nav: true, 307 dots: false, 308 margin: 10, 309 }, 310 600: { 311 items: 4, 312 nav: true, 313 dots: false, 314 }, 315 1024: { 316 items: 6, 317 nav: true, 318 dots: false, 319 }, 320 1100: { 321 items: 9, 322 nav: true, 323 dots: false, 324 }, 325 }, 326 navText: [ 327 '<i class="fal fa-chevron-left"></i>', 328 '<i class="fal fa-chevron-right"></i>', 329 ], 330 }); 331 } 332 }); 333 334 /*------------------------------rel action -----------------------------*/ 335 $("a[rel*='external']").on("click", function (e) { 336 e.preventDefault(); 337 window.open(this.href); 338 return false; 339 }); 340 341 // scroll fixed overview tabs 342 $(function () { 343 $(window) 344 .on("scroll", function () { 345 var contentTop = $("#content").offset().top; 346 var hHeight = $(".header").height(); 347 348 if ($(this).scrollTop() > contentTop - hHeight) { 349 $(".sticky-bk-header").addClass("sticky-actives"); 350 } else { 351 $(".sticky-bk-header").removeClass("sticky-actives"); 352 } 353 }) 354 .scroll(); 355 }); 356 357 // search toggle 358 $(document).ready(function () { 359 if (typeof $.fn.tooltip !== "undefined") { 360 $(".action-control a").tooltip(); 361 } 362 363 $(".search-option-btn").on("click", function (event) { 364 $(".search-option-btn").toggleClass("search-close-btn"); 365 $("body").toggleClass("search-fixed-active"); 366 $(".search-area").toggleClass( 367 "search-active animate__animated animate__fadeIn", 368 ); 369 $(".search-area .container").toggleClass( 370 "animate__animated animate__fadeOut", 371 ); 372 }); 373 374 // sticky class 375 var newHeader = { 376 init() { 377 this.header = document.querySelector(".bk-header"); 378 // Measure once, not every time you scroll 379 this.headerHeight = this.header.offsetHeight; 380 this.prevScrollpos = window.pageYOffset; 381 this.ticking = false;
382 383 window.addEventListener("scroll", () => { 384 if (!this.ticking) { 385 window.requestAnimationFrame(() => { 386 this.updateHeader(); 387 this.ticking = false; 388 }); 389 this.ticking = true; 390 } 391 }); 392 }, 393 394 updateHeader() { 395 const currentScrollpos = window.pageYOffset; 396 397 if (this.prevScrollpos > currentScrollpos) { 398 // Scrolling Up 399 this.header.classList.add("header-visible"); 400 this.header.classList.remove("header-hidden"); 401 402 if (currentScrollpos <= 0) { 403 this.header.classList.remove("header-visible"); 404 } 405 } else { 406 // Scrolling Down 407 if (currentScrollpos > this.headerHeight) { 408 this.header.classList.add("header-hidden"); 409 this.header.classList.remove("header-visible"); 410 } 411 } 412 413 this.prevScrollpos = currentScrollpos; 414 }, 415 }; 416 417 $(document).ready(function () { 418 newHeader.init(); 419 }); 420 }); 421 422 $(document).ready(function () { 423 $("body").on("click", function (event) { 424 $(".shortcut-box").removeClass("active"); 425 }); 426 }); 427 428 // mobile slide menu 429 $(".menu-box .navigation_box ul li.dropdown").on("click", function () { 430 $(this).parent().children(".dropdown-menu").slideToggle(200); 431 }); 432 433 // side navigation 434 $(document).ready(function () { 435 $(".menu-toggle").on("click", function (event) { 436 event.stopPropagation(); 437 $("body").toggleClass("side-control"); 438 }); 439 440 $(".side-close, .menu-close").on("click", function (event) { 441 event.stopPropagation(); 442 $("body").removeClass("side-control"); 443 $(".side-panel").removeClass("side-panel-active"); 444 }); 445 446 $(".mask-box").on("click", function () { 447 $("body").removeClass("side-control"); 448 }); 449 450 // side data panel 451 $(".short-icon").on("click", function (event) { 452 event.stopPropagation(); 453 $("body").toggleClass("side-data-panel"); 454 }); 455 456 $(".side-close, .menu-close").on("click", function (event) { 457 event.stopPropagation(); 458 $("body").removeClass("side-data-panel"); 459 }); 460 461 $(".mask-box").on("click", function () { 462 $("body").removeClass("side-data-panel"); 463 }); 464 }); 465 466 // share toggle 467 $(".share-btn").on("click", function (event) { 468 event.stopPropagation(); 469 $(".share-big-box").addClass("active"); 470 }); 471 472 $(".share-close").on("click", function (event) { 473 event.stopPropagation(); 474 $(".share-big-box").removeClass("active"); 475 }); 476 477 $(document).on("click", function (event) { 478 $(".share-big-box").removeClass("active"); 479 }); 480 481 // top control button class 482 $(".navigation_box.tops.top-controls li a").on("click", function () { 483 $(this).addClass("active-link"); 484 $("body").addClass("drop-menu"); 485 }); 486 487 $(".boundary-box").on("click", function (event) { 488 event.stopPropagation(); 489 }); 490 491 $(document).on("click", function () { 492 $("body").removeClass("drop-menu"); 493 $(".navigation_box.tops.top-controls li a").removeClass("active-link"); 494 }); 495 496 // quantity countdown 497 $(function () { 498 (function quantityProducts() { 499 var $quantityArrowMinus = $(".quantity-arrow-minus"); 500 var $quantityArrowPlus = $(".quantity-arrow-plus"); 501 var $quantityNum = $(".quantity-num"); 502 503 $quantityArrowMinus.on("click", quantityMinus); 504 $quantityArrowPlus.on("click", quantityPlus); 505 506 function quantityMinus() { 507 if ($quantityNum.val() > 1) { 508 $quantityNum.val(+$quantityNum.val() - 1); 509 } 510 } 511 512 function quantityPlus() { 513 $quantityNum.val(+$quantityNum.val() + 1); 514 } 515 })(); 516 }); 517 518 // scroll to top 519 $(".scrollToTop").on("click", function (e) { 520 e.preventDefault(); 521 $("html, body").animate( 522 { 523 scrollTop: 0, 524 }, 525 "slow", 526 ); 527 return false; 528 }); 529 530 $(".scrollToTop").on("click", function () { 531 $("html, body").animate({ scrollTop: 0 }, "slow"); 532 }); 533 534 $(window).on("scroll", function () { 535 var scroll = $(window).scrollTop(); 536 if (scroll > 500) { 537 $(".upToScroll").addClass("buttonShow"); 538 } else { 539 $(".upToScroll").removeClass("buttonShow"); 540 } 541 }); 542 543 // table class 544 $("table") 545 .addClass("table table-striped") 546 .wrap("<div class='table-responsive' />"); 547 548 // embed iframe 549 $(".featured-video iframe").wrap( 550 "<div class='embed-responsive embed-responsive-16by9' />", 551 ); 552 $(".news-break iframe").wrap( 553 "<span class='embed-responsive embed-responsive-16by9' />", 554 ); 555 $(".tv-boxs iframe").wrap( 556 "<span class='embed-responsive embed-responsive-16by9' />", 557 ); 558 $(".video-players iframe").wrap( 559 "<span class='embed-responsive embed-responsive-16by9' />", 560 ); 561 $(".google-maps iframe, .featured-one iframe").wrap( 562 "<span class='embed-responsive embed-responsive-16by9' />", 563 ); 564 $(".tv-box iframe, .google-map-view iframe").wrap( 565 "<div class='ratio ratio-16x9' />", 566 ); 567 568 // fixed video (outside document ready) 569 var div_top = $(".video-player"); 570 if (div_top.length) { 571 div_top = div_top.offset().top; 572 } 573 574 if (document.documentElement.clientWidth > 991) { 575 $(window).on("scroll", function () { 576 var window_top = $(window).scrollTop() - 0; 577 if (window_top > div_top + 400) { 578 if (!$(".video-player").is(".fixed-video")) { 579 $(".video-player").addClass( 580 "fixed-video animate__animated animate__slideInDown", 581 ); 582 $(".video-player").removeClass("show-hide-vid"); 583 } 584 } else { 585 $(".video-player").removeClass( 586 "fixed-video animate__animated animate__slideInDown", 587 ); 588 } 589 }); 590 } 591 592 $(".close-video").on("click", function () { 593 $(".video-player").toggleClass("show-place-video"); 594 }); 595 596 // shorts slider 597 598 $(".shorts-slider").slick({ 599 infinite: false, 600 slidesToShow: 5, 601 slidesToScroll: 1, 602 autoplay: true,
603 arrows: false, 604 autoplaySpeed: 25000, 605 dots: true, 606 responsive: [ 607 { 608 breakpoint: 1024, 609 settings: { 610 slidesToShow: 4, 611 slidesToScroll: 1, 612 infinite: true, 613 }, 614 }, 615 { 616 breakpoint: 992, 617 settings: { 618 slidesToShow: 3, 619 slidesToScroll: 1, 620 }, 621 }, 622 623 { 624 breakpoint: 800, 625 settings: { 626 slidesToShow: 2, 627 slidesToScroll: 1, 628 }, 629 }, 630 631 { 632 breakpoint: 601, 633 settings: { 634 slidesToShow: 2, 635 slidesToScroll: 1, 636 }, 637 }, 638 639 { 640 breakpoint: 480, 641 settings: { 642 slidesToShow: 1, 643 slidesToScroll: 1, 644 }, 645 }, 646 ], 647 }); 648})(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.