1jQuery(document).ready(function ($) { 2 3 $(".scrollTo").click(function () { 4 if ($href = $(this).attr("href")) { 5 if ($($href).length) 6 $("html,body").animate({ scrollTop: $($href).offset().top - $("header").height() + 50 }, 500); 7 8 } 9 return false; 10 }); 11 if ($("body").hasClass("single-training")) { 12 if ($(".panel-learning").length) { 13 $(".panel-learning .panel-item").each(function () { 14 if ($(this).height() > 250) { 15 $(this).addClass("min-view"); 16 $(this).find(".inner").after('<div class="view-more-item"><a onclick="viewMoreItemPanel(this);return false;" href="#">' + title_view_more + ' <i class="fa fa-angle-down"></i></a></div>'); 17 $(this).find(".inner .toolbar").html('<div class="view-less-item"><a onclick="viewLessItemPanel(this);return false;" href="#">' + title_view_less + ' <i class="fa fa-angle-up"></i></a></div>'); 18 } 19 }); 20 } 21 $(".accordion").each(function () { 22 $(this).find(".accordion-item").each(function () { 23 $(this).find(".accordion-title").addClass("active"); 24 $(this).find(".accordion-inner").show(); 25 }); 26 }); 27 $(".menu-default .has-child").click(function (e) { 28 e.preventDefault(); 29 $li_parent = $(this).closest("li"); 30 if ($li_parent.hasClass("active")) 31 $li_parent.removeClass('active'); 32 else 33 $li_parent.addClass('active'); 34 }); 35 $(".menu-default a").click(function (e) { 36 37 $(".menu-default li.active").removeClass("active"); 38 $(this).closest("li").addClass("active"); 39 if ($(this).attr("href").indexOf("#") == 0) { 40 $href = $(this).attr("href"); 41 if ($href != '#' && $($href).length) { 42 history.pushState(null, null, $(this).attr('href')); 43 $("body").removeClass("active-trigger"); 44 $("html,body").animate({ scrollTop: $($href).offset().top - $("header").height() }, 500); 45 46 } 47 return false; 48 } 49 }); 50 if (hash = window.location.hash) { 51 if ($(hash).length) 52 $("html,body").animate({ scrollTop: $(hash).offset().top - $("header").height() }, 500); 53 } 54 $(".section-bg").each(function () { 55 $(this).addClass("bg-loaded"); 56 }); 57 if (window.location.hash) { 58 59 } else { 60 // Fragment doesn't exist 61 } 62 63 64
65 if ($(window).width() <= 880) { 66 $title = 'Danh mục'; 67 if ($("body").hasClass("single-training")) { 68 if ($(".training-menu-side li.active").length) { 69 $title = $(".training-menu-side li.active a").html(); 70 } 71 72 73 74 } 75 else 76 if ($(".nav-simple .active").length) { 77 $title = $(".nav-simple .active a").html(); 78 } 79 80 //$("#list-teacher").flickity({freeScroll:true}); 81 82 83 } 84 85 $(window).resize(function () { 86 scrollStickyTraining(); 87 88 }) 89 scrollStickyTraining(); 90 91 var lastScrollTop = 0; 92 93 $(window).scroll(function (event) { 94 var st = $(this).scrollTop(); 95 if (st > lastScrollTop) { 96 if (!jQuery("body").hasClass("scrolldown")) { 97 jQuery("body").addClass("scrolldown"); 98 } 99 jQuery("body").removeClass("scrollup"); 100 } else { 101 102 if (!jQuery("body").hasClass("scrollup")) { 103 jQuery("body").addClass("scrollup"); 104 } 105 jQuery("body").removeClass("scrolldown"); 106 } 107 108 }); 109 110 111 112 113 114 } 115 $(".link-career-more").click(function (e) { 116 e.preventDefault(); 117 $(this).next().fadeIn(); 118 $(this).hide() 119 }); 120 $(".link-career-less").click(function (e) { 121 e.preventDefault(); 122 $parent = $(this).closest(".career-box"); 123 $parent.find(".career-more").fadeOut(); 124 $parent.find(".link-career-more").fadeIn() 125 $("html,body").animate({ scrollTop: $(this).closest(".career").offset().top - $("header").height() + 50 }, 500); 126 }); 127 if ($(".more-panel-link").length) { 128 $(".panel-more").hide(); 129 $(".more-panel-link").each(function () { 130 131 $(this).click(function (e) { 132 133 $($(this).attr("href")).show(); 134 $($(this).attr("href")).find(".slider").flickity('resize'); 135 $(this).hide(); 136 e.preventDefault(); 137 }); 138 139 140 }); 141 } 142 143 if ($(".less-panel-link").length) { 144 145 $(".less-panel-link").each(function () { 146 147 $(this).click(function (e) { 148 149 $(this).closest(".panel-more").hide(); 150 $(this).closest(".panel-item").find(".box-link a").show(); 151 e.preventDefault(); 152 }); 153 154 155 }); 156 } 157 158 $(".showfullsearch").click(function (e) { 159 e.preventDefault(); 160 if ($("body").hasClass("show-box-search")) { 161 $("body").removeClass("show-box-search"); 162 $("body").removeClass("show-box-search-sticker"); 163 } 164 else { 165 166 $("body").addClass("show-box-search"); 167 if ($("header").find(".stuck").length) 168 $("body").addClass("show-box-search-sticker"); 169 $(".box-fullsearch").css({ top: $("header").height() }); 170 } 171 }); 172 $(".item-cat-training-video .icon-play-video,.box-play-video .icon-play-video").fancybox(); 173 $(".scrollmn").each(function () { 174 $(this).click(function () { 175 $("body,html").animate({ scrollTop: $($(this).attr("href")).offset().top - $("height").height() }, 500); 176 return false; 177 }); 178 }); 179 $("#append-dock").click(function () { 180 if ($("#dock-right").hasClass("show-dock")) 181 $("#dock-right").removeClass("show-dock"); 182 else 183 $("#dock-right").addClass("show-dock"); 184 return false; 185 }); 186 $(".search-icon-mobile").click(function () { 187 if ($("body").hasClass('search-mobile')) 188 $("body").removeClass('search-mobile'); 189 else 190 $("body").addClass("search-mobile"); 191 return false; 192 }); 193 if ($("body").hasClass("home")) { 194 $width = $(window).width(); 195 $margin = ($width - 1120); 196 197 $(".slideshow-new-style-1").each(function () { 198 199 //$(".slideshow-new-style-1 button.next").css({right:'100px'}); 200 }); 201 } 202 $("#form-register form").submit(function () { 203 204 }); 205 206 207 208 $("#mega-menu-wrap-primary .mega-menu-item").each(function (index, value) { 209 210 211 212 }); 213 214 $("#mega-menu-wrap-primary").hover(function () { 215 $("body").addClass("menu-hover"); 216 }, function () { 217 $("body").removeClass("menu-hover"); 218 }); 219 220 221 $(".mobile-menu-more a span").html($(".list-all-category .current-menu-item a").html()); 222 $(".view-more-load a").click(function () { 223 $this = $(this); 224 $form = $this.closest("form"); 225 $this.after("<i class='fa fa-spin fa-spinner'></i>"); 226 $limit_page = $form.find('input[name="limit_page"]').val(); 227 $this.hide(); 228 229 $.ajax({ 230 url: flatsomeVars.ajaxurl, 231 type: "POST", 232 data: $form.serialize() + "&page=" + $this.attr("data-pager") + "&action=" + $form.find('input[name="type"]').val(), 233 dataType: "json", 234 success: function (data) { 235 236 if (data.length) { 237 238 $("#list-teacher .item-teacher").last().after(data.html); 239 $form.find('input[name="paged"]').val(data.paged); 240 $this.attr("data-pager", data.paged); 241 242 } 243 244 $this.next().remove(); 245 246 if (data.paged <= $limit_page) { 247 $this.show(); 248 } 249 250 251 } 252 }); 253 return false;
254 }); 255 $(".layout-news .custom-nav").each(function () { 256 $(this).find("a").click(function () { 257 $owl = $(this).closest(".layout-news").find(".slider-news"); 258 if ($(this).hasClass("nav-owl-prev")) 259 $owl.trigger('prev.owl.carousel'); 260 else 261 $owl.trigger('next.owl.carousel'); 262 return false; 263 }); 264 }); 265 $(".slider-news").each(function () { 266 $(this).owlCarousel({ 267 margin: 30, 268 autoHeight: true, 269 responsiveClass: true, 270 responsive: { 271 0: { 272 items: 1, 273 }, 274 550: { 275 items: 2, 276 nav: false 277 }, 278 850: { 279 items: 3, 280 } 281 } 282 }); 283 }); 284 _initImageTrainingCat(); 285 $(window).resize(function () { 286 toggleMobile(); 287 _initImageTrainingCat(); 288 //scrollSticky(); 289 }); 290 initMobile(); 291 //scrollSticky(); 292 $(".efw-slideshow").owlCarousel({ 293 animateOut: 'fadeOut', 294 items: 1 295 296 }); 297 $(".slidermobile").owlCarousel({ 298 nav: true, 299 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 300 dots: false, 301 autoplay: true, 302 items: 1 303 304 }); 305 306 $('.layout-news.slick-3-2-1>.row').slick({ 307 infinite: true, 308 slidesToShow: 3, 309 slidesToScroll: 3, 310 dots: false, 311 prevArrow: '<i class="slick-prev-custom fa fa-angle-left"></i>', 312 nextArrow: '<i class="slick-next-custom fa fa-angle-right"></i>', 313 responsive: [ 314 { 315 breakpoint: 850, 316 settings: { 317 slidesToShow: 2, 318 slidesToScroll: 2, 319 arrows: false, 320 }, 321 }, 322 { 323 breakpoint: 550, 324 settings: { 325 slidesToShow: 1, 326 slidesToScroll: 1, 327 arrows: false, 328 }, 329 }, 330 ], 331 }); 332 333}); 334function initMobile() { 335 if (isMobile()) { 336 toggleMobile(); 337 338 searchMobile(); 339 } 340} 341function scrollSticky() { 342 if (jQuery(window).width() > 768) { 343 $sidebarMenu = jQuery(".group-grid .col-sidebar"); 344 if ($sidebarMenu.length) { 345 346 $top = ($sidebarMenu.offset().top); 347 348 $header = jQuery("header").height(); 349 $height_sidebar = $sidebarMenu.height(); 350 351 jQuery(window).scroll(function (event) { 352 $footer_position = jQuery("#footer").offset().top; 353 $scrollPosition = jQuery(window).scrollTop(); 354 $height_stick = jQuery(".list-all-category").height(); 355 $height_more = 50; 356 if ($scrollPosition > $top) { 357 $sidebarMenu.addClass('stickFixed'); 358 $top_position = ($scrollPosition - $height_stick - $height_more - ($header - 40)); 359 if (jQuery("body").hasClass("category") || jQuery("body").hasClass("single")) { 360 $top_position = Math.abs($top_position); 361 $top_position += $header + $height_stick - 40; 362 } 363 364 if ($scrollPosition < ($footer_position - ($height_stick + 200))) 365 $sidebarMenu.find(".list-all-category").css({ top: $top_position, width: $sidebarMenu.width() }); 366 } 367 else { 368 $sidebarMenu.removeClass('stickFixed'); 369 $sidebarMenu.find(".list-all-category").css({ top: '' }); 370 } 371 }); 372 } 373 return; 374 $stickerRight = jQuery(".box-col-sidebar"); 375 //if(!$stickerRight.length)return ; 376 $headerHeight = jQuery("header").height(); 377 $rSticker = { width: $stickerRight.width(), height: $stickerRight.height(), 'top': $stickerRight.offset().top }; 378 jQuery(window).scroll(function (event) { 379 $scrollPosition = jQuery(window).scrollTop(); 380 $footer_position = jQuery("#footer").offset().top; 381 382 if ($scrollPosition > $rSticker.top) { 383 384 $pstop = ($footer_position - $rSticker.height - $header); 385 386 if ($scrollPosition > $pstop) { 387 388 $positionTop = $pstop - $rSticker.height; 389 390 } 391 else { 392 $positionTop = ($scrollPosition - $rSticker.height - $headerHeight); 393 console.log($scrollPosition + "/" + $rSticker.height + "/" + $headerHeight); 394 } 395 396 $stickerRight.addClass('fixed-right').css({ width: $rSticker.width, top: $positionTop }); 397 398 } 399 else { 400 $stickerRight.removeClass('fixed-right'); 401 } 402 }); 403 404 405 } 406} 407function viewMoreItemPanel(obj) { 408 jQuery(obj).closest(".panel-item").removeClass('min-view').addClass('more-view'); 409 return false; 410} 411function viewLessItemPanel(obj) { 412 jQuery(obj).closest(".panel-item").removeClass('more-view').addClass('min-view'); 413 return false; 414} 415function scrollStickyTraining() { 416 if (jQuery(window).width() >= 1024) { 417 $sidebarMenu = jQuery(".menu-side-left"); 418 if ($sidebarMenu.length) { 419 420 $top = ($sidebarMenu.offset().top); 421 422 $header = jQuery("header").height(); 423 $header = 100; 424 $height_sidebar = jQuery(".menu-side-left").height(); 425 426 jQuery(window).scroll(function (event) { 427 $footer_position = jQuery("#footer").offset().top; 428 $scrollPosition = jQuery(window).scrollTop(); 429 //$height_stick=$sidebarMenu.height(); 430 if ($scrollPosition > $top) { 431 432 433 $top_position = $header; 434 435 $width_sidebar = 256; 436 437 if ($scrollPosition < ($footer_position - $height_sidebar - $header)) { 438 jQuery(".menu-side-left").removeClass('stickAbs'); 439 jQuery(".menu-side-left").addClass('stickFixed'); 440 jQuery(".menu-side-left").css({ top: $top_position }); 441 } 442 443 else { 444 jQuery(".menu-side-left").removeClass('stickFixed'); 445 jQuery(".menu-side-left").addClass('stickAbs'); 446 jQuery(".menu-side-left").css({ position: $top_position }); 447 } 448 } 449 else { 450 jQuery(".menu-side-left").removeClass('stickFixed'); 451 jQuery(".menu-side-left").css({ top: '' }); 452 } 453 }); 454 } 455 456 } 457 jQuery(window).on('scroll', function () { 458 var scrollDistance = jQuery(window).scrollTop(); 459 jQuery(".tabbed-content .panel").each(function (i) { 460 if (jQuery(this).position().top <= scrollDistance) { 461 jQuery('.tabbed-content .nav li.active').removeClass('active'); 462 jQuery('.tabbed-content .nav li').eq(i).addClass('active'); 463 } 464 }); 465 }) 466} 467function isMobile() { 468 if (jQuery(window).width() <= 849) return true; return false;
469} 470function searchMobile() { 471 jQuery(".search-icon-mobile").click(function () { 472 473 $ux = jQuery(this).closest("body"); 474 if ($ux.hasClass("active-search")) 475 $ux.removeClass("active-search"); 476 else 477 $ux.addClass("active-search"); 478 return false; 479 480 }); 481} 482function toggleMobile() { 483 if (jQuery(window).width() <= 849) { 484 485 jQuery(".footer-1 .is-divider").remove(); 486 jQuery(".footer-1 .widget-title").each(function () { 487 jQuery(this).on('click tap', function (e) { 488 e.preventDefault(); 489 490 $widget = jQuery(this).closest(".widget"); 491 if ($widget.hasClass("open")) 492 $widget.removeClass("open"); 493 else 494 $widget.addClass("open"); 495 /* 496 if($widget.hasClass("open")) 497 $widget.removeClass("open"); 498 else 499 { 500 jQuery(".footer-1 .open").removeClass("open"); 501 502 }*/ 503 return false; 504 }); 505 }); 506 $title = title_cat; 507 $html_nav = '<div class="mobile-menu-more"><a href="#"><span>' + $title + '</span> <i class="fa fa-angle-down"></i><i class="fa fa-angle-up"></i></a></div>'; 508 jQuery("#breadcrumbs .breadcrumbs").after($html_nav); 509 jQuery(".mobile-menu-more a").click(function () { 510 if (jQuery("body").hasClass("active-trigger")) 511 jQuery("body").removeClass("active-trigger"); 512 else 513 jQuery("body").addClass("active-trigger"); 514 if (jQuery(".container-menu").length) { 515 jQuery(".container-menu").css({ top: jQuery(".breadcrumbs").height() }); 516 } 517 if (jQuery(".group-grid .col-sidebar").length) { 518 jQuery(".group-grid .col-sidebar").css({ top: jQuery(".breadcrumbs").height() }); 519 } 520 return false; 521 }); 522 } 523} 524function fnLoadMore(obj) { 525 $this = jQuery(obj); 526 $form = $this.closest("form"); 527 $this.after("<i class='fa fa-spin fa-spinner'></i>"); 528 $limit_page = $form.find('input[name="limit_page"]').val(); 529 $this.hide(); 530 jQuery.ajax({ 531 url: flatsomeVars.ajaxurl, 532 type: "POST", 533 data: $form.serialize() + "&page=" + $this.data("pager") + "&action=" + $form.find('input[name="type"]').val(), 534 dataType: "json", 535 success: function (data) { 536 537 if (data.length) { 538 539 jQuery("#list-teacher .item-teacher").last().after(data.html); 540 $form.find('input[name="paged"]').val(data.paged); 541 542 } 543 544 $this.next().remove(); 545 if (data.paged < limit_page) { 546 $this.show(); 547 } 548 549 550 } 551 }); 552 return false; 553} 554function clickToggleMenu(obj) { 555 556} 557function showDetailInfo(obj) { 558 559 jQuery.ajax({ 560 url: flatsomeVars.ajaxurl, 561 beforeSend: function () { 562 jQuery(obj).hide().after('<i class="fa fa-spin fa-spinner"></i>'); 563 }, 564 type: "POST", 565 data: { id: jQuery(obj).data("id"), action: "showInfoTeacher" }, 566 complete: function () { 567 jQuery(obj).show().next().remove(); 568 }, 569 success: function (data) { 570 jQuery("body").after("<a id='showdetailpopup' href='#inlineteacher'/>").after('<div id="inlineteacher" style="display:none">' + data + '</div>') 571 jQuery("#showdetailpopup").fancybox({ padding: 0, margin: 0, wrapCSS: 'pop-detail' }).trigger("click"); 572 //jQuery("body").after(data); 573 574 } 575 }); 576 return false; 577} 578function _initImageTrainingCat() { 579 580 if (jQuery("body").hasClass('tax-training_cat') && jQuery(window).width() <= 640) { 581 jQuery('.tranining-cat-bn .image').height(jQuery(window).width()); 582 } 583} 584function showStudentCat(obj) { 585 586 jQuery(".cat-student").removeClass("active"); 587 jQuery(obj).addClass("active"); 588 jQuery.ajax({ 589 url: flatsomeVars.ajaxurl, 590 beforeSend: function () { 591 jQuery("#list-teacher").html('<div class="load-wait"><i class="fa fa-spin fa-spinner"></i></div>'); 592 }, 593 type: "POST", 594 data: { paged: 0, cat: jQuery(obj).data("id"), limit: jQuery(obj).data("limit"), action: "showcatstudent" }, 595 dataType: "json", 596 success: function (data) { 597 jQuery("#list-teacher").html(data.html); 598 599 jQuery(".view-more-load").html(data.pagi); 600 } 601 602 }); 603 return false; 604} 605function removePopup() { 606 jQuery.fancybox.close(); 607 return false; 608} 609function showAjaxPagi(obj) { 610 $obj = jQuery(obj); 611 $paged = parseInt($obj.data("paged")); 612 613 614 615 jQuery.ajax({ 616 url: flatsomeVars.ajaxurl, 617 type: "POST", 618 data: { action: "ajaxcat", "paged": $obj.data("paged"), "max": $obj.data("max"), "cat": $obj.data("cat") }, 619 dataType: "json", 620 cache: false, 621 beforeSend: function () { 622 jQuery(".more-pagi a").addClass("wait"); 623 }, 624 success: function (data) { 625 switch (data.type) { 626 case 'category': jQuery(".grid-news .inews").last().after(data.html); break; 627 case 'catmba': jQuery(".col-cat-mba .post-item-insight").last().after(data.html); break; 628 629 } 630 631 if (data.paged == '0') { 632 jQuery(".more-pagi").fadeOut(); 633 } 634 else { 635 jQuery(".more-pagi a").data("paged", data.paged); 636 } 637 }, 638 complete: function () { 639 jQuery(".more-pagi a").removeClass("wait"); 640 } 641 642 }); 643 return false;
644} 645 646function blog_teacher_custom(t, args) { 647 $this = jQuery(t); 648 paged = $this.attr("data-paged"); 649 total = $this.attr("data-total"); 650 var data = { 651 action: "blog_teacher_custom", 652 args: args, 653 paged: ++paged, 654 }; 655 jQuery 656 .ajax({ 657 url: flatsomeVars.ajaxurl, 658 type: "POST", 659 data: data, 660 beforeSend: function () { 661 $this.children('i').attr('class', 'fa fa-spin fa-spinner'); 662 }, 663 complete: function () { 664 $this.children('i').attr('class', 'icon-angle-down'); 665 }, 666 }) 667 .done(function (result) { 668 jQuery($this).parent().prev().append(result); 669 $this.attr("data-paged", paged); 670 if (total <= paged) jQuery($this).parent().remove(); 671 }) 672 .fail(function (result) { 673 alert("Error"); 674 }); 675} 676 677(function () { 678 679 var ISB; 680 ISB = {}; 681 682 683 /* 684 * 685 * Marquee Slideshow 686 * 687 */ 688 window.ImagerLazyLoad = function (a) { 689 if (jQuery(a).data('src')) 690 new Imager(a, { 691 availableWidths: { 692 100: "100x56", 693 377: "377x212", 694 400: "400x225", 695 500: "400x225", 696 640: "640x360", 697 750: "750x422", 698 1280: "1280x720" 699 } 700 }) 701 }
702 window.Shim16x9 = function (a) { 703 var b = "<img width='100%' src='data:image/gif;base64,R0lGODlhEAAJAPAAAAAAAAAAACH/C1hNUCBEYXRhWE1QAz94cAAh+QQFAAAAACwAAAAAEAAJAEACCoSPqcvtD6OclBUAOw==' />"; 704 return jQuery(a).prepend(b), 705 b 706 } 707 ISB.marquee = { 708 shim: function (el) { 709 var b; 710 ImagerLazyLoad(el.find(".marquee-img").first()); 711 el.find(".marquee-img").on('load', function (e) { 712 backgroundUrl = jQuery(e.target).attr('src'); 713 jQuery(e.target).parent().css("background-image", "url('" + backgroundUrl + "')"); 714 }); 715 b = el.find(".marquee-img").first().clone(); 716 b = b.removeClass("marquee-img").addClass("marquee-shim").attr("alt", "").attr("aria-hidden", "true"); 717 return el.prepend(b); 718 }, 719 slideshow: function (el) { 720 return jQuery('.marquee', el).scrollface({ 721 auto: false, 722 transition: 'fade', 723 pager: jQuery('.pager', el), 724 next: jQuery('a.next, span.next, button.next', el), 725 prev: jQuery('a.prev, span.prev, button.prev', el), 726 interval: 4000, 727 speed: 600, 728 easing: 'easeOutExpo', 729 before: function (old_slide, new_slide) { 730 window.ImagerLazyLoad(new_slide.slide.find(".marquee-img")); 731 new_slide.slide.find(".marquee-img").on('load', function (e) { 732 backgroundUrl = jQuery(e.target).attr('src'); 733 jQuery(new_slide.slide).css("background-image", "url('" + backgroundUrl + "')"); 734 }); 735 return old_slide.slide.removeClass("animate-copy"); 736 }, 737 after: function (old_slide, new_slide) { 738 return new_slide.slide.addClass('animate-copy'); 739 } 740 }); 741 }, 742 video_offset: function (el) { 743 /* 744 Since we can't set video as a background-image 745 we need to offset it's position to center it 746 within the .marquee-mask 747 */ 748 749 return $(window).on('resize load', function () { 750 var marquee_height, marquee_video, video_height, video_offset; 751 marquee_height = el.height(); 752 marquee_video = el.find('.marquee-video'); 753 video_height = marquee_video.height(); 754 video_offset = parseInt((video_height - marquee_height) / 2); 755 return marquee_video.css({ 756 top: video_offset > 0 ? -video_offset : 0 757 }); 758 }); 759 }, 760 init: function (el) { 761 // init takes the marquee-mask element. 762 // always. 763 764 this.shim(el); 765 //so it will find the first marquee-item, which should be a span containing a div that will become an image. 766 el.find('.marquee-item:first').addClass('animate-copy'); 767 // for backwards compatibility, we'll leave the with-slideshow and with-video. 768 // the real key here is that the marquee itself should be shimmed, not the item. 769 if (el.hasClass('with-slideshow')) { 770 this.slideshow(el); 771 } else if (el.hasClass('with-video')) { 772 this.video_offset(el); 773 } else { 774 // if we get here, then we're stuck figuring it out ourselves. 775 if (el.find('.marquee-img').length == 1) { 776 // find the parent element and shim it. 777 } 778 } 779 //window.ImagerLazyLoad(el.find(".marquee-img").first()); 780 781 } 782 }; 783 jQuery(document).ready(function ($) { 784 $('.marquee-item').each(function () { 785 var startTime = jQuery(this).data('time_start'); 786 var endTime = jQuery(this).data('time_end'); 787 var currentTime = new Date().getTime(); 788 789 if (!startTime && !endTime) { 790 return; 791 } 792 793 if (startTime && endTime) { 794 startTime = new Date(startTime).getTime(); 795 endTime = new Date(endTime).getTime(); 796 797 if (currentTime < startTime || currentTime > endTime) { 798 jQuery(this).remove(); 799 } 800 801 } else if (startTime) { 802 startTime = new Date(startTime).getTime(); 803 804 if (currentTime < startTime) { 805 jQuery(this).remove(); 806 } 807 } else if (endTime) { 808 endTime = new Date(endTime).getTime(); 809 810 if (currentTime > endTime) { 811 jQuery(this).remove(); 812 } 813 } 814 }); 815 $('.marquee-mask').each(function () { 816 return ISB.marquee.init($(this)); 817 }); 818 }); 819 820}).call(this); 821 822function getCurrentTimeInHoChiMinh() { 823 // Tạo Äá»i tượng Date vá»i múi giá» UTC 824 let now = new Date(); 825 // Chuyá»n Äá»i múi giá» sang TPHCM (UTC+7) 826 let hoChiMinhTime = new Date(now.toLocaleString('en-US', { timeZone: 'Asia/Ho_Chi_Minh' })); 827 return hoChiMinhTime; 828} 829
830function isDateValid(dateStr) { 831 return !isNaN(new Date(dateStr)); 832}
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.