1/** 2 Custom JS 3 4 1. OPEN AND CLOSE MENU 5 2. OPEN AND CLOSE SEARCH BAR 6 3. HEADER BACKGROUND AFTER PAGE LOAD 7 4. HEADER BACKGROUND AFTER PAGE SCROLL 8 5. HEADER FULL HEIGHT 9 6. BACKGROUND IMAGE PARALLAX EFFECT 10 7. WOW ANIMATION 11 8. TESTIMONIALS CAROUSEL 12 9. PLAYER 13 10. POPUP SLIDER 14 11. MUSIC DISCOGRAPHY BANNERS EQUAL WIDTH AND HEIGHT 15 12. BLOG MANSORY 16 13. CART NUMBER PICKER 17 14. SHOP SORTING DROPDOWN SELECT 18 15. SINGLE PRODUCT IMAGE ZOOM 19 16. PAYMENT RADIO BUTTON 20 17 .userAgent for browser 21 18. BLOG MASONRY HOVER FUNCTION 22 19 .PRE LOADER 23 24 **/ 25 26"use strict"; 27//Variable for caching 28var windowElement = jQuery(window); 29var body = jQuery("body"); 30 31//Variable for player 32var current_track = 1; 33 34//Variable for slider 35var current_slide = 0; 36var slides_length = 0; 37var prev_slide = 0; 38var slideWidth = $("#popup-container").width() * 0.8; 39var appendBody; 40var popup_images_arr = []; 41 42// Get track duration by source 43function getDuration(src) { 44 return new Promise(function(resolve) { 45 var audio = new Audio(); 46 $(audio).on("loadedmetadata", function(){ 47 resolve(audio.duration); 48 }); 49 audio.src = src; 50 }); 51} 52// Function for player 53function playerItemEnd() { 54 $('.play-mp3').show(); 55 $('.pause-mp3').hide(); 56} 57// Function For Gallery Popup Slider 58function changeSlide() { 59 60 if (current_slide == prev_slide) { 61 return false; 62 } 63 64 for (let i = 0; i<slides_length; i++) { 65 if (i === prev_slide) { 66 jQuery("a.popup-image").eq(i).css({"z-index": "1"}).stop().animate({ 67 opacity: 0 68 }, 500, function () { 69 jQuery( this ).css("visibility", "hidden"); 70 }) 71 } 72 if (i === current_slide) { 73 jQuery("a.popup-image").eq(i).css({"visibility":"visible", "z-index": "2"}).stop().animate({ 74 opacity: 1 75 }, 500) 76 } 77 } 78 79 jQuery("#popup-container li").filter(function (index) { 80 return index != current_slide 81 }).removeClass("active"); 82 83 jQuery("#popup-container li").filter(function (index) { 84 return index == current_slide 85 }).addClass("active"); 86 87} 88 89// Key Event Change Slider 90$(document).keydown(function(e) { 91 if($('#popup-container').css('display')== "block") { 92 switch (e.which) { 93 case 37: 94 $('.popup_left').trigger('click'); 95 break; 96 case 39: 97 $('.popup_right').trigger('click'); 98 break; 99 case 27: 100 $('#popup-container').trigger('click'); 101 break; 102 103 default: 104 return; // exit this handler for other keys 105 } 106 } 107 // Key Event Menu 108 else if($('div.nav-menu').hasClass('active')){ 109 switch(e.which) { 110 case 27: 111 $('.menu_icon').trigger('click'); 112 break; 113 114 default: return; // exit this handler for other keys 115 } 116 } 117 // Key Event Search 118 else if($('div.search-bar').hasClass('active')){ 119 switch(e.which) { 120 case 27: 121 $('.search_icon').trigger('click'); 122 break; 123 124 default: return; // exit this handler for other keys 125 } 126 e.preventDefault(); // prevent the default action (scroll / move caret) 127 } 128}); 129 130//Function for Music Discography banners equal width and height 131function setTeamMemberHeight() { 132 $('.music-banner').height($('.music-banner').width()); 133 $('.music-banner-image').height($('.music-banner-image').width()); 134 $('.news_bg_image').height($('.news_bg_image').width()); 135 $('.s-item-image').height($('.s-item-image').width()); 136} 137//Function for Music Discography banners equal width and height after window resize 138windowElement.resize(function () { 139 setTeamMemberHeight(); 140}); 141 142//Function for internet explorer 143function msieversion() { 144 var ua = window.navigator.userAgent; 145 var net = ua.indexOf("NET "); 146 147 if (net > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { 148 if ( ! Modernizr.objectfit ) { 149 console.log(net) 150 jQuery('.img_link').each(function () { 151 var $container = jQuery(this), 152 imgUrl = $container.find('img').prop('src'); 153 if (imgUrl) { 154 $container 155 .css('backgroundImage', 'url(' + imgUrl + ')') 156 .addClass('compat-object-fit'); 157 } 158 }); 159 } 160 } 161 return false; 162} // End 163 164 165jQuery(function ($) { 166 "use strict"; 167 /* ----------------------------------------------------------- */ 168 /* 1. OPEN AND CLOSE MENU 169 /* ----------------------------------------------------------- */ 170 $('.menu_icon').on('click', function () { 171 $(this).toggleClass('active'); 172 $('.search_icon').removeClass('active'); 173 $('#header .nav-menu').toggleClass('active'); 174 $('#header .search-bar').removeClass('active'); 175 });
176 177 178 /* ----------------------------------------------------------- */ 179 /* 2. OPEN AND CLOSE SEARCH BAR 180 /* ----------------------------------------------------------- */ 181 $('.search_icon').on('click', function () { 182 $(this).toggleClass('active'); 183 $('.menu_icon').removeClass('active'); 184 $('#header .search-bar').toggleClass('active'); 185 $('#header .nav-menu').removeClass('active'); 186 }); 187 188 189 /* ----------------------------------------------------------- */ 190 /* 3. HEADER BACKGROUND AFTER PAGE LOAD 191 /* ----------------------------------------------------------- */ 192 if ( windowElement.scrollTop() > 20) { 193 $('.header-continer').addClass('active'); 194 } else { 195 $('.header-continer').removeClass('active'); 196 } 197 198 199 /* ----------------------------------------------------------- */ 200 /* 4. HEADER BACKGROUND AFTER PAGE SCROLL 201 /* ----------------------------------------------------------- */ 202 windowElement.on('scroll', function () { 203 if ($(this).scrollTop() > 20) { 204 $('.header-continer').addClass('active'); 205 //if ($("#myHeaderContiner").hasClass("header-continer active") && $(window).width() > 1024) { 206 // $('.turkish-airlines img').addClass('customWidthLogo'); 207 //} 208 } else { 209 $('.header-continer').removeClass('active'); 210 //if ($("#myHeaderContiner").hasClass("header-continer") && $(window).width() > 1024) { 211 // $('.turkish-airlines img').removeClass('customWidthLogo'); 212 //} 213 } 214 }); 215 216 217 /* ----------------------------------------------------------- */ 218 /* 5. HEADER FULL HEIGHT 219 /* ----------------------------------------------------------- */ 220 $.fn.fullHeight = function(){ 221 var self = this; 222 var windowHeight = window.innerHeight; 223 var fullHeightFunction = function(){ 224 return self.css({ 225 'height': windowHeight 226 }); 227 } 228 windowElement.on('resize', function(){ 229 windowHeight = window.innerHeight; 230 fullHeightFunction(); 231 }); 232 fullHeightFunction(); 233 return self; 234 } 235 //$('.home #header').fullHeight(); 236 237 238 /* ----------------------------------------------------------- */ 239 /* 6. BACKGROUND IMAGE PARALLAX EFFECT 240 /* ----------------------------------------------------------- */ 241 windowElement.on('scroll', function () { 242 243 /* Header Section Background Image */ 244 var st1 = $(this).scrollTop(); 245 $("#header .bg_image").css({ 246 "background-position-y": (st1/3) 247 }); 248 249 /* Tours Section Background Image */ 250 var st2 = $(this).scrollTop(); 251 $("#on-tour .section_bg_image").css({ 252 "background-position-y": (-st2/20 + 100) 253 }); 254 255 }); 256 257 258 /* ----------------------------------------------------------- */ 259 /* 7. WOW ANIMATION 260 /* ----------------------------------------------------------- */ 261 var wow = new WOW( 262 { 263 animateClass: 'animated', 264 offset: 100 265 } 266 ); 267 wow.init(); 268 269 270 /* ----------------------------------------------------------- */ 271 /* 8. TESTIMONIALS CAROUSEL 272 /* ----------------------------------------------------------- */ 273 274 $('.cd-testimonials-wrapper').flexslider({ 275 selector: ".cd-testimonials > li", 276 animation: "slide", 277 controlNav: true, 278 animationSpeed: 400, 279 smoothHeight: true, 280 start: function() { 281 $('.cd-testimonials').children('li').css({ 282 'opacity': 1, 283 'position': 'relative' 284 }); 285 } 286 }); 287 288 /* ----------------------------------------------------------- */ 289 /* 9. PLAYER 290 /* ----------------------------------------------------------- */ 291 292 plyr.setup({ 293 controls: [ 294 'play', 295 'progress', 296 'current-time', 297 'duration', 298 'mute', 299 'volume' 300 ] 301 });
302 303 // Home New Album 304 $(body).on('click', '#album-release button[data-plyr="play"]', function () { 305 $('#album-release .plyr--playing button[data-plyr="pause"]').trigger('click'); 306 }); 307 308 $('.pause-mp3').hide(); 309 $('.play-mp3').on('click',function () { 310 $('.play-mp3').show(); 311 $('.pause-mp3').hide(); 312 $(this).closest('.play-pause').find('svg').toggle(); 313 if ($(this).closest('.music_line').index() != current_track) { 314 $("#mp3_1").html(""); 315 $("#mp3_1").html('<audio controls class="audio1" onended="playerItemEnd()"><source src="' + $(this).closest('.play-pause').data('src') + '" type="audio/mpeg"></audio>'); 316 plyr.setup({ 317 controls: [ 318 'play', 319 'progress', 320 'current-time', 321 'duration', 322 'mute', 323 'volume' 324 ] 325 }); 326 } 327 328 current_track = $(this).closest('.music_line').index(); 329 330 $("#mp3_1").find("button").eq(0).trigger("click"); 331 332 }); 333 334 $('.pause-mp3').on('click',function () { 335 $('.pause-mp3').hide(); 336 $('.play-mp3').show(); 337 $("#mp3_1").find("button").eq(1).trigger("click"); 338 }); 339 340 $("body").on("click", "#mp3_1 .plyr__controls button", function () { 341 if ($(this).data("plyr") == "play") { 342 $("#playlist").find(".music_line").eq(current_track-1).find(".play-pause .play-mp3").hide(); 343 $("#playlist").find(".music_line").eq(current_track-1).find(".play-pause .pause-mp3").show(); 344 } else if ($(this).data("plyr") == "pause"){ 345 $('.pause-mp3').hide(); 346 $('.play-mp3').show(); 347 } 348 }); 349 350 $(document).on('ready',function () { 351 var tracks_arr = []; 352 $(".play-pause").each(function () { 353 var that = $(this); 354 getDuration($(this).data("src")) 355 .then(function(length) { 356 let duration = parseInt(length); 357 let minutes = Math.floor(duration/60); 358 let seconds = duration - minutes*60; 359 if (seconds < 10) { 360 seconds = "0" + seconds; 361 } 362 that.closest(".music_line").find(".plyr__time--duration").html(minutes + ":" + seconds); 363 }); 364 }); 365 }); 366 367 368 /* ----------------------------------------------------------- */ 369 /* 10. POPUP SLIDER 370 /* ----------------------------------------------------------- */ 371 372 $(".anim_border").on("click", function (event) { 373 popup_images_arr = []; 374 slides_length = $(".img_link").length; 375 376 $("#slides-container").html(""); 377 $("#popup-container ul").html(""); 378 $.each($(".img_link"), function (index, value) { 379 popup_images_arr.push($(".img_link img")[index].src); 380 }); 381 382 appendBody = ''; 383 384 for (var i = 0; i < popup_images_arr.length; i++) { 385 if (event.currentTarget == $(".anim_border")[i]) { 386 current_slide = i; 387 appendBody += '<a href="javascript:void(0)" class="popup-image" style="position: absolute; opacity: 1; visibility: visible"><img src=' + popup_images_arr[i] + '></a>'; 388 } else { 389 appendBody += '<a href="javascript:void(0)" class="popup-image" style="position: absolute; opacity: 0; visibility: hidden"><img src=' + popup_images_arr[i] + '></a>'; 390 } 391 } 392 393 $("#slides-container").append(appendBody); 394 395 // Slider Width in Window Resize time 396 windowElement.resize(function () { 397 slideWidth = $("#popup-container").width() * 0.8; 398 if (windowElement.width() <= 767) { 399 slideWidth = $("#popup-container").width() * 0.9; 400 } 401 }); 402 403 // Slider Width during <=767 404 if (windowElement.width() <= 767) { 405 slideWidth = $("#popup-container").width() * 0.9; 406 } 407 408 409 for (var i = 0; i < popup_images_arr.length; i++) { 410 if (event.currentTarget != $(".anim_border")[i]) { 411 $("#popup-container ul").append("<li></li>"); 412 } else { 413 $("#popup-container ul").append("<li class='active'></li>"); 414 } 415 } 416 417 $("#popup-container").css("display", "block").animate({ 418 opacity: 1 419 }, 300); 420 });
421 422 body.on("click", ".popup_left", function () { 423 prev_slide = current_slide; 424 if (current_slide) { 425 current_slide--; 426 } else { 427 current_slide = slides_length - 1; 428 } 429 changeSlide(); 430 }); 431 body.on("click", ".popup_right", function () { 432 prev_slide = current_slide; 433 if (current_slide < slides_length - 1) { 434 current_slide++; 435 } else { 436 current_slide = 0; 437 } 438 changeSlide(); 439 }); 440 441 body.on("click", "#popup-container li", function () { 442 prev_slide = current_slide; 443 current_slide = $("#popup-container li").index($(this)); 444 changeSlide(); 445 }); 446 447 $("#popup-container").on("click", function (e) { 448 if ( !$(e.target).is($("#slides-container a img")) && !$(e.target).is($("#popup-container ul li")) && !$(e.target).is($("#popup_block .popup_arrow")) && !$(e.target).is($("#popup_block .popup_arrow i")) ) 449 $("#popup-container").animate({ 450 opacity: 0 451 }, 300, function () { 452 $(this).css("display", "none"); 453 }) 454 455 }); 456 457 //if($('.nav li.active').length == 0) 458 //{ 459 // $('.nav li:first-child').addClass('active'); 460 //} 461 $('.centered-bottom').attr('style', 'background-position: center bottom !important;'); 462 $('.carousel-inner .carousel-item:first-child').addClass('active'); 463 for(i=0 ; i < $('#carouselExampleIndicators .carousel-inner .carousel-item').length ; i++){ 464 let carousel_active = 'active'; 465 if(i != 0){ 466 carousel_active = '' 467 } 468 $('#carouselExampleIndicators .carousel-indicators').append('<li data-target="#carouselExampleIndicators" data-sli
468de-to="'+i+'" class="'+carousel_active+'"></li>') 469 } 470 471 /* ----------------------------------------------------------- */ 472 /* 11. MUSIC DISCOGRAPHY BANNERS EQUAL WIDTH AND HEIGHT 473 /* ----------------------------------------------------------- */ 474 setTeamMemberHeight(); 475 476 477 /* ----------------------------------------------------------- */ 478 /* 12.BLOG MANSORY 479 /* ----------------------------------------------------------- */ 480 481 window.msnry = new Masonry( '.grid', { 482 columnWidth: '.grid-sizer', 483 percentPosition: true 484 }); 485 486 487 // This for demonstration need send ajax call to get new post 488 $('.more').on("click", function(){ 489 490 var html = '<div class="grid-item grid-item--width1" >' + 491 '<a href="11-Blog-Single-Post.html ">\n' + 492 ' <div class="grid-item-img">\n' + 493 ' <img src="resources/images/stas-svechnikov-31192-unsplash.png" alt="Andre Benz"/>\n' + 494 ' </div>\n' + 495 ' <div class="grid-item-content">\n' + 496 ' <div class="g_t">\n' + 497 ' <h3>NEW DJ</h3>\n' + 498 ' <p>\n' + 499 ' Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n' + 500 ' Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,\n' + 501 ' when an unknown printer took a galley of type and scrambled it to make a type specimen\n' + 502 ' </p>\n' + 503 ' </div>\n' + 504 ' </div>\n' + 505 ' </a>' + 506 '</div>' 507 + '<div class="grid-item grid-item--width2">' + 508 '<a href="11-Blog-Single-Post.html ">\n' + 509 ' <div class="grid-item-img">\n' + 510 ' <img src="resources/images/averie-woodard-319832-unsplash-1.png" alt="Karim Boubker"/>\n' + 511 ' </div>\n' + 512 ' <div class="grid-item-content">\n' + 513 ' <div class="g_t">\n' + 514 ' <h3>OUR TOUR</h3>\n' + 515 ' <p>\n' + 516 ' Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n' + 517 ' Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,\n' + 518 ' when an unknown printer took a galley of type and scrambled it to make a type specimen\n' + 519 ' </p>\n' + 520 ' </div>\n' + 521 ' </div>\n' + 522 ' </a>' + 523 '</div>' 524 + '<div class="grid-item grid-item--width3">' + 525 '<a href="11-Blog-Single-Post.html ">\n' + 526 ' <div class="grid-item-content">\n' + 527 ' <div class="g_t">\n' + 528 ' <h3>DRUM FESTIVAL</h3>\n' + 529 ' <p>\n' + 530 ' Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n' + 531 ' Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,\n' + 532 ' when an unknown printer took a galley of type and scrambled it to make a type specimen\n' + 533 ' </p>\n' + 534 ' </div>\n' + 535 ' </div>\n' + 536 ' <div class="grid-item-img">\n' + 537 ' <img src="resources/images/ryan-moreno-99467-unsplash.png" alt="Samuel Fyfe">\n' + 538 ' </div>\n' + 539 ' </a>' + 540 '</div>' 541 +'<div class="grid-item grid-item--width4">' + 542 '<a href="11-Blog-Single-Post.html ">\n' + 543 ' <div class="grid-item-img">\n' + 544 ' <img src="resources/images/matthew-kane-365718-unsplash-2.png" alt="">\n' + 545 ' </div>\n' + 546 ' <div class="grid-item-content">\n' + 547 ' <div class="g_t">\n' + 548 ' <h3>DARK SIDE</h3>\n' + 549 ' <p>\n' + 550 ' Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n' + 551 ' Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,\n' + 552 ' when an unknown printer took a galley of type and scrambled it to make a type specimen\n' + 553 ' </p>\n' + 554 ' </div>\n' + 555 ' </div>\n' + 556 ' </a>' + 557 '</div>'; 558 $("div.grid").append(html); 559 560 window.msnry = new Masonry( '.grid', { 561 columnWidth: '.grid-sizer', 562 percentPosition: true 563 }); 564 565 });
566 567 /* ----------------------------------------------------------- */ 568 /* 13.CART NUMBER PICKER 569 /* ----------------------------------------------------------- */ 570 571 $.fn.numberPicker = function() { 572 var dis = 'disabled'; 573 return this.each(function() { 574 var picker = $(this), 575 p = picker.find('button:last-child'), 576 m = picker.find('button:first-child'), 577 input = picker.find('input'), 578 min = parseInt(input.attr('min'), 10), 579 max = parseInt(input.attr('max'), 10), 580 inputFunc = function(picker) { 581 var i = parseInt(input.val(), 10); 582 if ( (i <= min) || (!i) ) { 583 input.val(min); 584 p.prop(dis, false); 585 m.prop(dis, true); 586 } else if (i >= max) { 587 input.val(max); 588 p.prop(dis, true); 589 m.prop(dis, false); 590 } else { 591 p.prop(dis, false); 592 m.prop(dis, false); 593 } 594 }, 595 changeFunc = function(picker, qty) { 596 var q = parseInt(qty, 10), 597 i = parseInt(input.val(), 10); 598 if ((i < max && (q > 0)) || (i > min && !(q > 0))) { 599 input.val(i + q); 600 inputFunc(picker); 601 } 602 }; 603 m.on('click', function(){changeFunc(picker,-1);}); 604 p.on('click', function(){changeFunc(picker,1);}); 605 input.on('change', function(){inputFunc(picker);}); 606 inputFunc(picker); //init 607 }); 608 }; 609 $('.plusminus').numberPicker(); 610 611 /** Delete Cart **/ 612 $('.delete-product').on('click', function (e) { 613 e.preventDefault(); 614 $(this).parents('.cart-item').remove(); 615 }); 616 617 /** 404 Page fiull height **/ 618 $('.page-404 #header-404').fullHeight(); 619 620 621 /* ----------------------------------------------------------- */ 622 /* 14.SHOP SORTING DROPDOWN SELECT 623 /* ----------------------------------------------------------- */ 624 $(".dropdown-menu li a").on('click', function () { 625 var selText = $(this).text(); 626 $(this).parents('.btn-group').find('.dropdown-toggle').html(selText+' <span class="caret"></span>'); 627 }); 628 629 /* ----------------------------------------------------------- */ 630 /* 15.SINGLE PRODUCT IMAGE ZOOM 631 /* ----------------------------------------------------------- */ 632 var $zoom = $('.zoom').magnify(); 633 634 635 /* ----------------------------------------------------------- */ 636 /* 16.PAYMENT RADIO BUTTON 637 /* ----------------------------------------------------------- */ 638 639 $('.pay-text').css('display','none'); 640 if ($(".paypal input").is(':checked')) { 641 $(".paypal input").closest('.custom-control').find('.pay-text').css('display','block'); 642 $(".paypal input").closest('.custom-control').siblings().find('.pay-text').css('display','none'); 643 } else { 644 $(".ubs input").closest('.custom-control').find('.pay-text').css('display','block'); 645 $(".ubs input").closest('.custom-control').siblings().find('.pay-text').css('display','none'); 646 } 647 $(".paypal input, .ubs input").on("change", function () { 648 $(this).closest('.custom-control').find('.pay-text').css('display','block'); 649 $(this).closest('.custom-control').siblings().find('.pay-text').css('display','none'); 650 }); 651 652 // Add To Cart 653 var nav = $('.shop-view-cart'), 654 animateTime = 300, 655 navLink = $('.catd-button'); 656 nav.css({'height':'0'}); 657 navLink.on('click',function(){ 658 nav.css({overflow:'visible'}); 659 if(nav.height() === 0){ 660 autoHeightAnimate(nav, animateTime); 661 } 662 }); 663 664/* Function to animate height: auto */ 665 function autoHeightAnimate(element, time) { 666 var curHeight = element.height(), // Get Default Height 667 autoHeight = element.css('height', 'auto').height() + 30; // Get Auto Height 668 element.height(curHeight); // Reset to Default Height 669 element.stop().animate({height: autoHeight}, time); // Animate to Auto Height 670} 671 672 // Auto complete Search focus 673 body.on("click", ".chosen-single", function () { 674 $('.chosen-search input').focus(); 675 $('.chosen-search input').trigger('click'); 676 });
677 678 // for big title alignment 679 if(!$('.title-image img').length){ 680 $('.global-title').css('position','relative'); 681 } 682 683 /* ----------------------------------------------------------- */ 684 /* 17.userAgent for browser 685 /* ----------------------------------------------------------- */ 686 if (navigator.userAgent.search("MSIE") >= 0) { 687 $('body').addClass('msie'); 688 } 689 else if (navigator.userAgent.search("Chrome") >= 0) { 690 $('body').addClass('chrome'); 691 } 692 else if (navigator.userAgent.search("Firefox") >= 0) { 693 $('body').addClass('firefox'); 694 } 695 else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) { 696 $('body').addClass('safari'); 697 } 698 else if (navigator.userAgent.search("Opera") >= 0) { 699 $('body').addClass('opera'); 700 } 701 else if (navigator.userAgent.search("NET") >= 0) { 702 $('body').addClass('net'); 703 } 704 else if (navigator.userAgent.search("Edge") >= 0) { 705 $('body').addClass('edge'); 706 } 707 708 /** Function for Explorer ****/ 709 $(document).ready(msieversion); 710
711 if (navigator.userAgent.search("NET") >= 0) { 712 if ( ! Modernizr.objectfit ) { 713 $('.news_bg_image').each(function () { 714 var $container = $(this), 715 imgUrl = $container.find('img').prop('src'); 716 if (imgUrl) { 717 $container 718 .css('backgroundImage', 'url(' + imgUrl + ')') 719 .addClass('compat-object-fit'); 720 } 721 }); 722 723 $('.music-banner-image').each(function () { 724 var $container = $(this), 725 imgUrl = $container.find('img').prop('src'); 726 if (imgUrl) { 727 $container 728 .css('backgroundImage', 'url(' + imgUrl + ')') 729 .addClass('compat-object-fit'); 730 } 731 }); 732 733 $('.events-slider').each(function () { 734 var $container = $(this), 735 imgUrl = $container.find('img').prop('src'); 736 if (imgUrl) { 737 $container 738 .css('backgroundImage', 'url(' + imgUrl + ')') 739 .addClass('compat-object-fit'); 740 } 741 }); 742 743 $('.embed-responsive .youtube').each(function () { 744 var $container = $(this), 745 imgUrl = $container.find('img').prop('src'); 746 if (imgUrl) { 747 $container 748 .css('backgroundImage', 'url(' + imgUrl + ')') 749 .addClass('compat-object-fit'); 750 } 751 }); 752 753 $('.video-block .video-img-banner').each(function () { 754 var $container = $(this), 755 imgUrl = $container.find('img').prop('src'); 756 if (imgUrl) { 757 $container 758 .css('backgroundImage', 'url(' + imgUrl + ')') 759 .addClass('compat-object-fit'); 760 } 761 }); 762 763 $('.grid-item-img').each(function () { 764 var $container = $(this), 765 imgUrl = $container.find('img').prop('src'); 766 if (imgUrl) { 767 $container 768 .css('backgroundImage', 'url(' + imgUrl + ')') 769 .addClass('compat-object-fit'); 770 } 771 }); 772 773 $('.blog-grid-image').each(function () { 774 var $container = $(this), 775 imgUrl = $container.find('img').prop('src'); 776 if (imgUrl) { 777 $container 778 .css('backgroundImage', 'url(' + imgUrl + ')') 779 .addClass('compat-object-fit'); 780 } 781 }); 782 783 $('.featured-image').each(function () { 784 var $container = $(this), 785 imgUrl = $container.find('img').prop('src'); 786 if (imgUrl) { 787 $container 788 .css('backgroundImage', 'url(' + imgUrl + ')') 789 .addClass('compat-object-fit'); 790 } 791 }); 792 793 $('.t-shirt-image').each(function () { 794 var $container = $(this), 795 imgUrl = $container.find('img').prop('src'); 796 if (imgUrl) { 797 $container 798 .css('backgroundImage', 'url(' + imgUrl + ')') 799 .addClass('compat-object-fit'); 800 } 801 }); 802 } 803 } 804 805/* ----------------------------------------------------------- */ 806/* 18.BLOG MASONRY HOVER FUNCTION 807 /* ----------------------------------------------------------- */ 808 809 $("#blog-mansory-section .grid-item").mouseover(function(){ 810 $(".grid-item").addClass("active"); 811 $(this).removeClass("active"); 812 }); 813 $("#blog-mansory-section .grid-item").mouseout(function(){ 814 $(".grid-item").removeClass("active"); 815 });
816 817}); 818 819/* ----------------------------------------------------------- */ 820/* 19.PRE LOADER 821/* ----------------------------------------------------------- */ 822windowElement.on('load', function(){ 823 $('#preloader').fadeOut('slow',function(){ 824 $(this).remove(); 825 }); 826});
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.