1/** 2Core script to handle the entire theme and core functions 3**/ 4var EduZone = function(){ 5 /* Search Bar ============ */ 6 siteUrl = ''; 7 8 var screenWidth = $( window ).width(); 9 10 var homeSearch = function() { 11 'use strict'; 12 /* top search in header on click function */ 13 var quikSearch = jQuery("#quik-search-btn"); 14 var quikSearchRemove = jQuery("#quik-search-remove"); 15 16 quikSearch.on('click',function() { 17 18 jQuery('.dlab-quik-search').fadeIn(500); 19 jQuery('.dlab-quik-search').addClass('On'); 20 21 22 }); 23 24 quikSearchRemove.on('click',function() { 25 jQuery('.dlab-quik-search').fadeOut(500); 26 jQuery('.dlab-quik-search').removeClass('On'); 27 28 29 }); 30 /* top search in header on click function End*/ 31 } 32 33 var cartButton = function(){ 34 $(".item-close").on('click',function(){ 35 $(this).closest(".cart-item").hide('500'); 36 }); 37 $('.cart-btn').unbind().on('click',function(){ 38 $(".cart-list").slideToggle('slow'); 39 }) 40 41 } 42 43 44 /* One Page Layout ============ */ 45 var onePageLayout = function() { 46 'use strict'; 47 var headerHeight = parseInt($('.onepage').css('height'), 10); 48 49 $(".scroll").unbind().on('click',function(event) 50 { 51 event.preventDefault(); 52 53 if (this.hash !== "") { 54 var hash = this.hash; 55 var seactionPosition = $(hash).offset().top; 56 var headerHeight = parseInt($('.onepage').css('height'), 10); 57 58 59 $('body').scrollspy({target: ".navbar", offset: headerHeight+2}); 60 61 var scrollTopPosition = seactionPosition - (headerHeight); 62 63 $('html, body').animate({ 64 scrollTop: scrollTopPosition 65 }, 800, function(){ 66 67 }); 68 } 69 }); 70 $('body').scrollspy({target: ".navbar", offset: headerHeight + 2}); 71 } 72 73 /* Header Height ============ */ 74 var handleResizeElement = function(){ 75 $('.header').css('height',''); 76 var HeaderHeight = $('.header').height(); 77 $('.header').css('height', HeaderHeight); 78 if(screenWidth > 991 ){ 79 $('.homedemo').find('.mega-menu').css('max-height','calc(100vh - '+HeaderHeight+'px)'); 80 } 81 } 82 83 /* Load File ============ */ 84 var dzTheme = function(){ 85 'use strict'; 86 var loadingImage = '<img src="images/loading.gif">'; 87 jQuery('.dzload').each(function(){ 88 var dzsrc = siteUrl + $(this).attr('dzsrc'); 89 //jQuery(this).html(loadingImage); 90 jQuery(this).hide(function(){ 91 jQuery(this).load(dzsrc, function(){ 92 jQuery(this).fadeIn('slow'); 93 }); 94 }) 95 96 }); 97 98 99 if(screenWidth <= 991 ){ 100 jQuery('.navbar-nav > li > a, .sub-menu > li > a').unbind().on('click', function(e){ 101 if(jQuery(this).parent().hasClass('open')) 102 { 103 jQuery(this).parent().removeClass('open'); 104 } 105 else{ 106 jQuery(this).parent().parent().find('li').removeClass('open'); 107 jQuery(this).parent().addClass('open'); 108 } 109 }); 110 } 111 } 112 113 /* Magnific Popup ============ */ 114 var MagnificPopup = function(){ 115 'use strict'; 116 /* magnificPopup function */ 117 jQuery('.mfp-gallery').magnificPopup({ 118 delegate: '.mfp-link', 119 type: 'image', 120 tLoading: 'Loading image #%curr%...', 121 mainClass: 'mfp-img-mobile', 122 gallery: { 123 enabled: true, 124 navigateByImgClick: true, 125 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 126 }, 127 image: { 128 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 129 titleSrc: function(item) { 130 return item.el.attr('title') + '<small></small>'; 131 } 132 } 133 }); 134 /* magnificPopup function end */ 135 136 /* magnificPopup for paly video function */ 137 jQuery('.video').magnificPopup({ 138 type: 'iframe', 139 iframe: { 140 markup: '<div class="mfp-iframe-scaler">'+ 141 '<div class="mfp-close"></div>'+ 142 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 143 '<div class="mfp-title">Some caption</div>'+ 144 '</div>' 145 }, 146 callbacks: { 147 markupParse: function(template, values, item) { 148 values.title = item.el.attr('title'); 149 } 150 } 151 }); 152 /* magnificPopup for paly video function end*/ 153 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 154 disableOn: 700, 155 type: 'iframe', 156 mainClass: 'mfp-fade', 157 removalDelay: 160, 158 preloader: false, 159
160 fixedContentPos: false 161 }); 162 } 163 164 165 /* Scroll To Top ============ */ 166 var scrollTop = function (){ 167 'use strict'; 168 var scrollTop = jQuery("button.scroltop"); 169 /* page scroll top on click function */ 170 scrollTop.on('click',function() { 171 jQuery("html, body").animate({ 172 scrollTop: 0 173 }, 1000); 174 return false; 175 }) 176 177 jQuery(window).bind("scroll", function() { 178 var scroll = jQuery(window).scrollTop(); 179 if (scroll > 900) { 180 jQuery("button.scroltop").fadeIn(1000); 181 } else { 182 jQuery("button.scroltop").fadeOut(1000); 183 } 184 }); 185 /* page scroll top on click function end*/ 186 } 187 188 /* handle Accordian ============ */ 189 var handleAccordian = function(){ 190 /* accodin open close icon change */ 191 jQuery('#accordion').on('hidden.bs.collapse', function(e){ 192 jQuery(e.target) 193 .prev('.panel-heading') 194 .find("i.indicator") 195 .toggleClass('glyphicon-minus glyphicon-plus'); 196 }); 197 jQuery('#accordion').on('shown.bs.collapse', function(e){ 198 jQuery(e.target) 199 .prev('.panel-heading') 200 .find("i.indicator") 201 .toggleClass('glyphicon-minus glyphicon-plus'); 202 }); 203 /* accodin open close icon change end */ 204 } 205 206 /* handle Placeholder ============ */ 207 var handlePlaceholder = function(){ 208 /* input placeholder for ie9 & ie8 & ie7 */ 209 jQuery.support.placeholder = ('placeholder' in document.createElement('input')); 210 /* input placeholder for ie9 & ie8 & ie7 end*/ 211 212 /*fix for IE7 and IE8 */ 213 if (!jQuery.support.placeholder) { 214 jQuery("[placeholder]").focus(function () { 215 if (jQuery(this).val() == jQuery(this).attr("placeholder")) jQuery(this).val(""); 216 }).blur(function () { 217 if (jQuery(this).val() == "") jQuery(this).val(jQuery(this).attr("placeholder")); 218 }).blur(); 219 220 jQuery("[placeholder]").parents("form").submit(function () { 221 jQuery(this).find('[placeholder]').each(function() { 222 if (jQuery(this).val() == jQuery(this).attr("placeholder")) { 223 jQuery(this).val(""); 224 } 225 }); 226 }); 227 } 228 /*fix for IE7 and IE8 end */ 229 } 230 231 /* Equal Height ============ */ 232 var equalHeight = function(container) { 233 234 if(jQuery(container).length == 0) 235 { 236 return false 237 } 238 239 var currentTallest = 0, 240 currentRowStart = 0, 241 rowDivs = new Array(), 242 $el, topPosition = 0; 243 244 $(container).each(function() { 245 $el = $(this); 246 $($el).height('auto') 247 topPostion = $el.position().top; 248 249 if (currentRowStart != topPostion) { 250 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 251 rowDivs[currentDiv].height(currentTallest); 252 } 253 rowDivs.length = 0; // empty the array 254 currentRowStart = topPostion; 255 currentTallest = $el.height(); 256 rowDivs.push($el); 257 } else { 258 rowDivs.push($el); 259 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); 260 } 261 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 262 rowDivs[currentDiv].height(currentTallest); 263 } 264 }); 265 266 } 267 268 /* Footer Align ============ */ 269 var footerAlign = function() { 270 'use strict'; 271 jQuery('.site-footer').css('display', 'block'); 272 jQuery('.site-footer').css('height', 'auto'); 273 var footerHeight = jQuery('.site-footer').outerHeight(); 274 jQuery('.footer-fixed > .page-wraper').css('padding-bottom', footerHeight); 275 jQuery('.site-footer').css('height', footerHeight); 276 } 277 278 /* File Input ============ */ 279 var fileInput = function(){ 280 'use strict'; 281 /* Input type file jQuery */ 282 jQuery(document).on('change', '.btn-file :file', function() { 283 var input = jQuery(this); 284 var numFiles = input.get(0).files ? input.get(0).files.length : 1; 285 var label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); 286 input.trigger('fileselect', [numFiles, label]); 287 }); 288 289 jQuery('.btn-file :file').on('fileselect', function(event, numFiles, label) { 290 input = jQuery(this).parents('.input-group').find(':text'); 291 var log = numFiles > 10 ? numFiles + ' files selected' : label; 292 293 if (input.length) { 294 input.val(log); 295 } else { 296 if (log) alert(log); 297 } 298 }); 299 /* Input type file jQuery end*/ 300 } 301 302 /* Header Fixed ============ */ 303 var headerFix = function(){ 304 'use strict'; 305 /* Main navigation fixed on top when scroll down function custom */ 306 jQuery(window).bind('scroll', function () { 307 if(jQuery('.sticky-header').length) 308 { 309 var menu = jQuery('.sticky-header'); 310 if ($(window).scrollTop() > menu.offset().top) { 311 menu.addClass('is-fixed'); 312 } else { 313 menu.removeClass('is-fixed'); 314 } 315 } 316 }); 317 /* Main navigation fixed on top when scroll down function custom end*/ 318 } 319 320 /* Masonry Box ============ */ 321 var masonryBox = function(){ 322 'use strict'; 323 /* masonry by = bootstrap-select.min.js */ 324 if(jQuery('#masonry, .masonry').length) 325 { 326 var self = $("#masonry, .masonry"); 327 if(jQuery('.card-container').length) 328 { 329 self.imagesLoaded(function () { 330 self.masonry({ 331 gutterWidth: 15, 332 isAnimated: true, 333 itemSelector: ".card-container" 334 }); 335 }); 336 } 337 } 338 if(jQuery('.filters').length) 339 { 340 jQuery(".filters").on('click','li',function(e) { 341 e.preventDefault(); 342 var filter = $(this).attr("data-filter"); 343 self.masonryFilter({ 344 filter: function () { 345 if (!filter) return true; 346 //return $(this).attr("data-filter") == filter; 347 return $(this).hasClass(filter); 348 } 349 }); 350 }); 351 } 352 /* masonry by = bootstrap-select.min.js end */ 353 } 354 355 /* Use on Shortcode Filter Page ============ */ 356 var handleMasonryFilter = function(){ 357 'use strict'; 358 359 if(jQuery('#masonry1').length) 360 { 361 var masonry1 = $("#masonry1"); 362 363 masonry1.imagesLoaded(function () { 364 masonry1.masonry({ 365 gutterWidth: 15, 366 isAnimated: true, 367 itemSelector: ".card-container" 368 }); 369 }); 370 371 372 373 jQuery(".filters1").on('click','li',function(e) { 374 e.preventDefault(); 375 var filter = $(this).attr("data-filter"); 376 masonry1.masonryFilter({ 377 filter: function () { 378 if (!filter) return true; 379 return $(this).hasClass(filter); 380 } 381 }); 382 }); 383 384 } 385 386 if(jQuery('#masonry2').length) 387 { 388 var masonry2 = $("#masonry2"); 389 390 masonry2.imagesLoaded(function () { 391 masonry2.masonry({ 392 gutterWidth: 15, 393 isAnimated: true, 394 itemSelector: ".card-container" 395 }); 396 }); 397 398 399 400 jQuery(".filters2").on('click','li',function(e) { 401 e.preventDefault(); 402 var filter = $(this).attr("data-filter"); 403 masonry2.masonryFilter({ 404 filter: function () { 405 if (!filter) return true; 406 return $(this).hasClass(filter); 407 } 408 }); 409 }); 410 411 } 412 413 if(jQuery('#masonry3').length) 414 { 415 var masonry3 = $("#masonry3"); 416 417 masonry3.imagesLoaded(function () { 418 masonry3.masonry({ 419 gutterWidth: 15, 420 isAnimated: true, 421 itemSelector: ".card-container" 422 }); 423 }); 424 425 426 427 jQuery(".filters3").on('click','li',function(e) { 428 e.preventDefault(); 429 var filter = $(this).attr("data-filter"); 430 masonry3.masonryFilter({ 431 filter: function () { 432 if (!filter) return true; 433 return $(this).hasClass(filter); 434 } 435 }); 436 }); 437 438 } 439 440 if(jQuery('#masonry4').length) 441 { 442 var masonry4 = $("#masonry4"); 443 444 masonry4.imagesLoaded(function () { 445 masonry4.masonry({ 446 gutterWidth: 15, 447 isAnimated: true, 448 itemSelector: ".card-container" 449 }); 450 }); 451 452 453 454 jQuery(".filters4").on('click','li',function(e) { 455 e.preventDefault(); 456 var filter = $(this).attr("data-filter"); 457 masonry4.masonryFilter({ 458 filter: function () { 459 if (!filter) return true; 460 return $(this).hasClass(filter); 461 } 462 }); 463 }); 464 465 } 466 467 468 if(jQuery('#masonry5').length) 469 { 470 var masonry5 = $("#masonry5"); 471 472 masonry5.imagesLoaded(function () { 473 masonry5.masonry({ 474 gutterWidth: 15, 475 isAnimated: true, 476 itemSelector: ".card-container" 477 }); 478 }); 479 480 481 482 jQuery(".filters5").on('click','li',function(e) { 483 e.preventDefault(); 484 var filter = $(this).attr("data-filter"); 485 masonry5.masonryFilter({ 486 filter: function () { 487 if (!filter) return true; 488 return $(this).hasClass(filter); 489 } 490 }); 491 }); 492 493 } 494 495 496 if(jQuery('#masonry6').length) 497 { 498 var masonry6 = $("#masonry6"); 499 500 masonry6.imagesLoaded(function () { 501 masonry6.masonry({ 502 gutterWidth: 15, 503 isAnimated: true, 504 itemSelector: ".card-container" 505 }); 506 }); 507 508 509 510 jQuery(".filters6").on('click','li',function(e) { 511 e.preventDefault(); 512 var filter = $(this).attr("data-filter"); 513 masonry6.masonryFilter({ 514 filter: function () { 515 if (!filter) return true; 516 return $(this).hasClass(filter); 517 } 518 }); 519 }); 520 521 } 522 523 524 if(jQuery('#masonry7').length) 525 { 526 var masonry7 = $("#masonry7"); 527 528 masonry7.imagesLoaded(function () { 529 masonry7.masonry({ 530 gutterWidth: 15, 531 isAnimated: true, 532 itemSelector: ".card-container" 533 }); 534 }); 535 536 537 538 jQuery(".filters7").on('click','li',function(e) { 539 e.preventDefault(); 540 var filter = $(this).attr("data-filter"); 541 masonry7.masonryFilter({ 542 filter: function () { 543 if (!filter) return true; 544 return $(this).hasClass(filter); 545 } 546 }); 547 }); 548 549 } 550 551 552 if(jQuery('#masonry8').length) 553 { 554 var masonry8 = $("#masonry8"); 555 556 masonry8.imagesLoaded(function () { 557 masonry8.masonry({ 558 gutterWidth: 15, 559 isAnimated: true, 560 itemSelector: ".card-container" 561 }); 562 }); 563 564 565 566 jQuery(".filters8").on('click','li',function(e) { 567 e.preventDefault(); 568 var filter = $(this).attr("data-filter"); 569 masonry8.masonryFilter({ 570 filter: function () { 571 if (!filter) return true; 572 return $(this).hasClass(filter); 573 } 574 }); 575 }); 576 577 } 578 579 580 if(jQuery('#masonry9').length) 581 { 582 var masonry9 = $("#masonry9"); 583 584 masonry9.imagesLoaded(function () { 585 masonry9.masonry({ 586 gutterWidth: 15, 587 isAnimated: true, 588 itemSelector: ".card-container" 589 }); 590 }); 591 592 593 594 jQuery(".filters9").on('click','li',function(e) { 595 e.preventDefault(); 596 var filter = $(this).attr("data-filter"); 597 masonry9.masonryFilter({ 598 filter: function () { 599 if (!filter) return true; 600 return $(this).hasClass(filter); 601 } 602 }); 603 }); 604 605 } 606 607 608 if(jQuery('#masonry10').length) 609 { 610 var masonry10 = $("#masonry10"); 611 612 masonry10.imagesLoaded(function () { 613 masonry10.masonry({ 614 gutterWidth: 15, 615 isAnimated: true, 616 itemSelector: ".card-container" 617 }); 618 }); 619 620 621 622 jQuery(".filters10").on('click','li',function(e) { 623 e.preventDefault(); 624 var filter = $(this).attr("data-filter"); 625 masonry10.masonryFilter({ 626 filter: function () { 627 if (!filter) return true; 628 return $(this).hasClass(filter); 629 } 630 }); 631 }); 632 633 } 634 635 636 if(jQuery('#masonry11').length) 637 { 638 var masonry11 = $("#masonry11"); 639 640 masonry11.imagesLoaded(function () { 641 masonry11.masonry({ 642 gutterWidth: 15, 643 isAnimated: true, 644 itemSelector: ".card-container" 645 }); 646 }); 647 648 649 650 jQuery(".filters11").on('click','li',function(e) { 651 e.preventDefault(); 652 var filter = $(this).attr("data-filter"); 653 masonry11.masonryFilter({ 654 filter: function () { 655 if (!filter) return true; 656 return $(this).hasClass(filter); 657 } 658 }); 659 }); 660 661 } 662 663 664 if(jQuery('#masonry12').length) 665 { 666 var masonry12 = $("#masonry12"); 667 668 masonry12.imagesLoaded(function () { 669 masonry12.masonry({ 670 gutterWidth: 15, 671 isAnimated: true, 672 itemSelector: ".card-container" 673 }); 674 }); 675 676 677 678 jQuery(".filters12").on('click','li',function(e) { 679 e.preventDefault(); 680 var filter = $(this).attr("data-filter"); 681 masonry12.masonryFilter({ 682 filter: function () { 683 if (!filter) return true; 684 return $(this).hasClass(filter); 685 } 686 }); 687 }); 688 689 } 690 691 692 if(jQuery('#masonry13').length) 693 { 694 var masonry13 = $("#masonry13"); 695 696 masonry13.imagesLoaded(function () { 697 masonry13.masonry({ 698 gutterWidth: 15, 699 isAnimated: true, 700 itemSelector: ".card-container" 701 }); 702 }); 703 704 705 706 jQuery(".filters13").on('click','li',function(e) { 707 e.preventDefault(); 708 var filter = $(this).attr("data-filter"); 709 masonry13.masonryFilter({ 710 filter: function () { 711 if (!filter) return true; 712 return $(this).hasClass(filter); 713 } 714 }); 715 }); 716 717 } 718 719 720 if(jQuery('#masonry14').length) 721 { 722 var masonry14 = $("#masonry14"); 723 724 masonry14.imagesLoaded(function () { 725 masonry14.masonry({ 726 gutterWidth: 15, 727 isAnimated: true, 728 itemSelector: ".card-container" 729 }); 730 }); 731 732 733 734 jQuery(".filters14").on('click','li',function(e) { 735 e.preventDefault(); 736 var filter = $(this).attr("data-filter"); 737 masonry14.masonryFilter({ 738 filter: function () { 739 if (!filter) return true; 740 return $(this).hasClass(filter); 741 } 742 }); 743 }); 744 745 } 746 747 748 if(jQuery('#masonry15').length) 749 { 750 var masonry15 = $("#masonry15"); 751 752 masonry15.imagesLoaded(function () { 753 masonry15.masonry({ 754 gutterWidth: 15, 755 isAnimated: true, 756 itemSelector: ".card-container" 757 }); 758 }); 759 760 761 762 jQuery(".filters15").on('click','li',function(e) { 763 e.preventDefault(); 764 var filter = $(this).attr("data-filter"); 765 masonry15.masonryFilter({ 766 filter: function () { 767 if (!filter) return true; 768 return $(this).hasClass(filter); 769 } 770 }); 771 }); 772 773 } 774 775 776 if(jQuery('#masonry16').length) 777 { 778 var masonry16 = $("#masonry16"); 779 780 masonry16.imagesLoaded(function () { 781 masonry16.masonry({ 782 gutterWidth: 15, 783 isAnimated: true, 784 itemSelector: ".card-container" 785 }); 786 }); 787 788 789 790 jQuery(".filters16").on('click','li',function(e) { 791 e.preventDefault(); 792 var filter = $(this).attr("data-filter"); 793 masonry16.masonryFilter({ 794 filter: function () { 795 if (!filter) return true; 796 return $(this).hasClass(filter); 797 } 798 }); 799 }); 800 801 } 802 803 804 if(jQuery('#masonry17').length) 805 { 806 var masonry17 = $("#masonry17"); 807 808 masonry17.imagesLoaded(function () { 809 masonry17.masonry({ 810 gutterWidth: 15, 811 isAnimated: true, 812 itemSelector: ".card-container" 813 }); 814 }); 815 816 817 818 jQuery(".filters17").on('click','li',function(e) { 819 e.preventDefault(); 820 var filter = $(this).attr("data-filter"); 821 masonry17.masonryFilter({ 822 filter: function () { 823 if (!filter) return true; 824 return $(this).hasClass(filter); 825 } 826 }); 827 }); 828 829 } 830 831 832 if(jQuery('#masonry18').length) 833 { 834 var masonry18 = $("#masonry18"); 835 836 masonry18.imagesLoaded(function () { 837 masonry18.masonry({ 838 gutterWidth: 15, 839 isAnimated: true, 840 itemSelector: ".card-container" 841 }); 842 }); 843 844 845 846 jQuery(".filters18").on('click','li',function(e) { 847 e.preventDefault(); 848 var filter = $(this).attr("data-filter"); 849 masonry18.masonryFilter({ 850 filter: function () { 851 if (!filter) return true; 852 return $(this).hasClass(filter); 853 } 854 }); 855 }); 856 857 } 858 if(jQuery('#masonry19').length) 859 { 860 var masonry19 = $("#masonry19"); 861 862 masonry19.imagesLoaded(function () { 863 masonry19.masonry({ 864 gutterWidth: 15, 865 isAnimated: true, 866 itemSelector: ".card-container" 867 }); 868 }); 869 870 871 872 jQuery(".filters19").on('click','li',function(e) { 873 e.preventDefault(); 874 var filter = $(this).attr("data-filter"); 875 masonry19.masonryFilter({ 876 filter: function () { 877 if (!filter) return true; 878 return $(this).hasClass(filter); 879 } 880 }); 881 }); 882 883 } 884 if(jQuery('#masonry20').length) 885 { 886 var masonry20 = $("#masonry20"); 887 888 masonry20.imagesLoaded(function () { 889 masonry20.masonry({ 890 gutterWidth: 15, 891 isAnimated: true, 892 itemSelector: ".card-container" 893 }); 894 }); 895 896 897 898 jQuery(".filters20").on('click','li',function(e) { 899 e.preventDefault(); 900 var filter = $(this).attr("data-filter"); 901 masonry20.masonryFilter({ 902 filter: function () { 903 if (!filter) return true; 904 return $(this).hasClass(filter); 905 } 906 }); 907 }); 908 909 } 910 if(jQuery('#masonry21').length) 911 { 912
912 var masonry21 = $("#masonry21"); 913 914 masonry21.imagesLoaded(function () { 915 masonry21.masonry({ 916 gutterWidth: 15, 917 isAnimated: true, 918 itemSelector: ".card-container" 919 }); 920 }); 921 922 923 924 jQuery(".filters21").on('click','li',function(e) { 925 e.preventDefault(); 926 var filter = $(this).attr("data-filter"); 927 masonry21.masonryFilter({ 928 filter: function () { 929 if (!filter) return true; 930 return $(this).hasClass(filter); 931 } 932 }); 933 }); 934 935 } 936 937 if(jQuery('#masonry22').length) 938 { 939 var masonry22 = $("#masonry22"); 940 941 masonry22.imagesLoaded(function () { 942 masonry22.masonry({ 943 gutterWidth: 15, 944 isAnimated: true, 945 itemSelector: ".card-container" 946 }); 947 }); 948 949 950 951 jQuery(".filters22").on('click','li',function(e) { 952 e.preventDefault(); 953 var filter = $(this).attr("data-filter"); 954 masonry22.masonryFilter({ 955 filter: function () { 956 if (!filter) return true; 957 return $(this).hasClass(filter); 958 } 959 }); 960 }); 961 962 } 963 964 } 965 966 967 /* Set Div Height ============ */ 968 var setDivHeight = function(){ 969 'use strict'; 970 var allHeights = []; 971 jQuery('.dzseth > div, .dzseth .img-cover, .dzseth .seth').each(function(e){ 972 allHeights.push(jQuery(this).height()); 973 }) 974 975 jQuery('.dzseth > div, .dzseth .img-cover, .dzseth .seth').each(function(e){ 976 var maxHeight = Math.max.apply(Math,allHeights); 977 jQuery(this).css('height',maxHeight); 978 }) 979 980 allHeights = []; 981 /* Removice */ 982 //var screenWidth = $( window ).width(); 983 if(screenWidth < 991) 984 { 985 jQuery('.dzseth > div, .dzseth .img-cover, .dzseth .seth').each(function(e){ 986 jQuery(this).css('height',''); 987 }) 988 } 989 } 990 991 /* Counter Number ============ */ 992 var counter = function(){ 993 if(jQuery('.counter').length) 994 { 995 jQuery('.counter').counterUp({ 996 delay: 10, 997 time: 3000 998 }); 999 } 1000 } 1001 1002 /* Video Popup ============ */ 1003 var handleVideo = function(){ 1004 /* Video responsive function */ 1005 jQuery('iframe[src*="youtube.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>'); 1006 jQuery('iframe[src*="vimeo.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>'); 1007 /* Video responsive function end */ 1008 } 1009 1010 /* Gallery Filter ============ */ 1011 var handleFilterMasonary = function(){ 1012 /* gallery filter activation = jquery.mixitup.min.js */ 1013 if (jQuery('#image-gallery-mix').length) { 1014 jQuery('.gallery-filter').find('li').each(function () { 1015 $(this).addClass('filter'); 1016 }); 1017 jQuery('#image-gallery-mix').mixItUp(); 1018 }; 1019 if(jQuery('.gallery-filter.masonary').length){ 1020 jQuery('.gallery-filter.masonary').on('click','span', function(){ 1021 var selector = $(this).parent().attr('data-filter'); 1022 jQuery('.gallery-filter.masonary span').parent().removeClass('active'); 1023 jQuery(this).parent().addClass('active'); 1024 jQuery('#image-gallery-isotope').isotope({ filter: selector }); 1025 return false; 1026 }); 1027 } 1028 /* gallery filter activation = jquery.mixitup.min.js */ 1029 } 1030 1031 /* handle Bootstrap Select ============ */ 1032 var handleBootstrapSelect = function(){ 1033 /* Bootstrap Select box function by = bootstrap-select.min.js */ 1034 /* skip editor-internal selects: Quill builds its toolbar pickers from 1035 hidden <select> elements, and wrapping them breaks the toolbar. */ 1036 var $selects = jQuery('select').not('.ql-toolbar select').not('.quill-wrap select').not('[data-no-selectpicker]'); 1037 if ($selects.length) { 1038 $selects.selectpicker(); 1039 } 1040 /* Bootstrap Select box function by = bootstrap-select.min.js end*/ 1041 } 1042 1043 /* handle Bootstrap Touch Spin ============ */ 1044 var handleBootstrapTouchSpin = function(){ 1045 jQuery("input[name='demo_vertical2']").TouchSpin({ 1046 verticalbuttons: true, 1047 verticalupclass: 'ti-plus', 1048 verticaldownclass: 'ti-minus' 1049 }); 1050 1051 } 1052 /* Resizebanner ============ */ 1053 var handleBannerResize = function(){ 1054 $(".full-height").css("height", $(window).height()); 1055 } 1056 1057 /* Countdown ============ */ 1058 var handleCountDown = function(WebsiteLaunchDate){ 1059 /* Time Countr Down Js */ 1060 if($(".countdown").length) 1061 { 1062 $('.countdown').countdown({date: WebsiteLaunchDate+' 23:5'}, function() { 1063 $('.countdown').text('we are live'); 1064 }); 1065 } 1066 /* Time Countr Down Js End */ 1067 } 1068 1069 /* Content Scroll ============ */ 1070 var handleCustomScroll = function(){ 1071 /* all available option parameters with their default values */ 1072 if($(".content-scroll").length) 1073 { 1074 $(".content-scroll").mCustomScrollbar({ 1075 setWidth:false, 1076 setHeight:false, 1077 axis:"y" 1078 }); 1079 } 1080 } 1081 1082 /* WOW ANIMATION ============ */ 1083 var wow_animation = function(){ 1084 if($('.wow').length > 0) 1085 { 1086 var wow = new WOW( 1087 { 1088 boxClass: 'wow', // animated element css class (default is wow) 1089 animateClass: 'animated', // animation css class (default is animated) 1090 offset: 50, // distance to the element when triggering the animation (default is 0) 1091 mobile: false // trigger animations on mobile devices (true is default) 1092 }); 1093 wow.init(); 1094 } 1095 } 1096 1097 /* Left Menu ============ */ 1098 var handleSideBarMenu = function(){ 1099 $('.openbtn').on('click',function(e){ 1100 e.preventDefault(); 1101 if($('#mySidenav').length > 0) 1102 { 1103 document.getElementById("mySidenav").style.left = "0"; 1104 } 1105 1106 if($('#mySidenav1').length > 0) 1107 { 1108 document.getElementById("mySidenav1").style.right = "0"; 1109 } 1110 1111 }) 1112 1113 $('.closebtn').on('click',function(e){ 1114 e.preventDefault(); 1115 if($('#mySidenav').length > 0) 1116 { 1117 document.getElementById("mySidenav").style.left = "-300px"; 1118 } 1119 1120 if($('#mySidenav1').length > 0) 1121 { 1122 document.getElementById("mySidenav1").style.right = "-820px"; 1123 } 1124 }) 1125 } 1126 1127 /* Range ============ */ 1128 var priceslider = function(){ 1129 1130 if($(".price-slide, .price-slide-2").length > 0 ) { 1131 $("#slider-range,#slider-range-2").slider({ 1132 range: true, 1133 min: 300, 1134 max: 4000, 1135 values: [0, 5000], 1136 slide: function(event, ui) { 1137 var min = ui.values[0], 1138 max = ui.values[1]; 1139 $('#' + this.id).prev().val("$" + min + " - $" + max); 1140 } 1141 }); 1142 } 1143 } 1144 1145 /* BGEFFECT ============ */ 1146 1147 var boxHover = function(){ 1148 1149 jQuery('.box-hover').on('mouseenter',function(){ 1150 jQuery('.box-hover').removeClass('active'); 1151 jQuery(this).addClass('active'); 1152 1153 }) 1154 } 1155 1156 var reposition = function (){ 1157 'use strict'; 1158 var modal = jQuery(this),
1159 dialog = modal.find('.modal-dialog'); 1160 modal.css('display', 'block'); 1161 1162 /* Dividing by two centers the modal exactly, but dividing by three 1163 or four works better for larger screens. */ 1164 dialog.css("margin-top", Math.max(0, (jQuery(window).height() - dialog.height()) / 2)); 1165 } 1166 1167 var handelResize = function (){ 1168 1169 /* Reposition when the window is resized */ 1170 jQuery(window).on('resize', function() { 1171 jQuery('.modal:visible').each(reposition); 1172 1173 equalHeight('.equal-wraper .equal-col'); 1174 footerAlign(); 1175 }); 1176 } 1177 1178 /* Website Launch Date */ 1179 var WebsiteLaunchDate = new Date(); 1180 monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; 1181 WebsiteLaunchDate.setMonth(WebsiteLaunchDate.getMonth() + 1); 1182 WebsiteLaunchDate = WebsiteLaunchDate.getDate() + " " + monthNames[WebsiteLaunchDate.getMonth()] + " " + WebsiteLaunchDate.getFullYear(); 1183 /* Website Launch Date END */ 1184 1185 /* Header Height ============ */ 1186 var setResizeMargin = function(){ 1187 if(($('.setResizeMargin').length > 0) && screenWidth >= 1280){ 1188 var containerSize = $('.container').width(); 1189 var getMargin = (screenWidth - containerSize)/2; 1190 $('.setResizeMargin').css('margin-left',getMargin); 1191 } 1192 } 1193 1194 var handlePlaceholderAnimation = function() 1195 { 1196 if(jQuery('.dezPlaceAni').length) 1197 { 1198 1199 $('.dezPlaceAni input, .dezPlaceAni textarea').on('focus',function(){ 1200 $(this).parents('.form-group, .news-box').addClass('focused'); 1201 }); 1202 1203 $('.dezPlaceAni input, .dezPlaceAni textarea').on('blur',function(){ 1204 var inputValue = $(this).val(); 1205 if ( inputValue == "" ) { 1206 $(this).removeClass('filled'); 1207 $(this).parents('.form-group, .news-box').removeClass('focused'); 1208 } else { 1209 $(this).addClass('filled'); 1210 } 1211 }) 1212 } 1213 } 1214 1215 /* Light Gallery ============ */ 1216 var lightGallery = function (){ 1217 if(($('#lightgallery, .lightgallery').length > 0)){ 1218 $('#lightgallery, .lightgallery').lightGallery({ 1219 selector : '.check-km', 1220 loop:true, 1221 thumbnail:true, 1222 exThumbImage: 'data-exthumbimage' 1223 }); 1224 } 1225 } 1226 1227 /* Load File ============ */ 1228 var dzTheme = function(){ 1229 'use strict'; 1230 1231 1232 if(screenWidth <= 991 ){ 1233 jQuery('.navbar-nav > li > a, .sub-menu > li > a').unbind().on('click', function(e){ 1234 //e.preventDefault(); 1235 if(jQuery(this).parent().hasClass('open')) 1236 { 1237 jQuery(this).parent().removeClass('open'); 1238 } 1239 else{ 1240 jQuery(this).parent().parent().find('li').removeClass('open'); 1241 jQuery(this).parent().addClass('open'); 1242 } 1243 }); 1244 } 1245 1246 jQuery('.full-sidenav .navbar-nav > li > a').next('.sub-menu').slideUp(); 1247 jQuery('.full-sidenav .sub-menu > li > a').next('.sub-menu').slideUp(); 1248 1249 jQuery('.full-sidenav .navbar-nav > li > a, .full-sidenav .sub-menu > li > a').unbind().on('click', function(e){ 1250 jQuery('.full-sidenav .navbar-nav > li > a').not(this).next('.sub-menu').slideUp(); 1251 jQuery(this).next('.sub-menu').toggle(500); 1252 }); 1253 1254 jQuery('.menu-icon').on('click',function(){ 1255 jQuery('.menu-close,.full-sidenav').addClass('active'); 1256 onePageLayout(); 1257 }); 1258 jQuery('.menu-close').on('click',function(){ 1259 jQuery('.menu-close,.full-sidenav').removeClass('active'); 1260 }); 1261 } 1262 1263 /* Function ============ */ 1264 return { 1265 init:function(){ 1266 boxHover(); 1267 wow_animation(); 1268 priceslider(); 1269 onePageLayout(); 1270 dzTheme(); 1271 handleResizeElement(); 1272 homeSearch(); 1273 MagnificPopup(); 1274 handleAccordian(); 1275 scrollTop(); 1276 handlePlaceholder(); 1277 handlePlaceholderAnimation(); 1278 footerAlign(); 1279 fileInput(); 1280 headerFix(); 1281 setDivHeight(); 1282 handleVideo(); 1283 handleFilterMasonary(); 1284 handleCountDown(WebsiteLaunchDate); 1285 handleCustomScroll(); 1286 handleSideBarMenu(); 1287 cartButton(); 1288 handleBannerResize(); 1289 setResizeMargin(); 1290 handelResize(); 1291 lightGallery(); 1292 jQuery('.modal').on('show.bs.modal', reposition); 1293 }, 1294 1295 handleMasonryFilter:function(){ 1296 handleMasonryFilter(); 1297 }, 1298 1299 load:function(){ 1300 handleBootstrapSelect(); 1301 handleBootstrapTouchSpin(); 1302 equalHeight('.equal-wraper .equal-col'); 1303 counter(); 1304 masonryBox(); 1305 }, 1306 1307 resize:function(){ 1308 screenWidth = $(window).width(); 1309 dzTheme(); 1310 setTimeout(function(){ 1311 handleResizeElement(); 1312 }, 500); 1313 1314 } 1315 } 1316 1317}(); 1318 1319/* Document.ready Start */ 1320jQuery(document).ready(function() { 1321 'use strict'; 1322 EduZone.init(); 1323 1324 $('a[data-toggle="tab"]').click(function(){ 1325 // todo remove snippet on bootstrap v4 1326 $('a[data-toggle="tab"]').click(function() { 1327 $($(this).attr('href')).show().addClass('show active').siblings().hide(); 1328 }) 1329 }); 1330 1331 jQuery('.navicon').on('click',function(){ 1332 $(this).toggleClass('open'); 1333 }); 1334 1335}); 1336/* Document.ready END */ 1337 1338/* Window Load START */ 1339jQuery(window).on('load',function () { 1340 'use strict'; 1341 EduZone.load(); 1342 setTimeout(function(){ 1343 jQuery('#loading-area').remove(); 1344 }, 0); 1345}); 1346/* Window Load END */ 1347/* Window Resize START */ 1348jQuery(window).on('resize',function () { 1349 'use strict'; 1350 EduZone.resize(); 1351}); 1352/* Window Resize END */
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.