1;(function($) { 2 3 'use strict' 4 5 var galleriesCube = function() { 6 if ( $().cubeportfolio ) { 7 $('.wprt-gallery-grid').each(function() { 8 var 9 $this = $(this), 10 item = $this.data("column"), 11 item2 = $this.data("column2"), 12 item3 = $this.data("column3"), 13 item4 = $this.data("column4"), 14 gapH = Number($this.data("gaph")), 15 gapV = Number($this.data("gapv")), 16 filter = $this.data("filter"); 17 18 if ( !filter ) { filter = '*'; } 19 else { filter = '.' + filter; } 20 21 $(this).find('#galleries').cubeportfolio({ 22 filters: '#gallery-filter', 23 layoutMode: 'grid', 24 defaultFilter: filter, 25 animationType: 'quicksand', 26 gapHorizontal: gapH, 27 gapVertical: gapV, 28 showNavigation: true, 29 showPagination: true, 30 gridAdjustment: 'responsive', 31 rewindNav: false, 32 auto: false, 33 mediaQueries: [{ 34 width: 1500, 35 cols: item 36 }, { 37 width: 1100, 38 cols: item 39 }, { 40 width: 800, 41 cols: item2 42 }, { 43 width: 550, 44 cols: item3 45 }, { 46 width: 320, 47 cols: item4 48 }], 49 caption: ' ', 50 displayType: 'bottomToTop', 51 displayTypeSpeed: 100 52 }); 53 }); 54 } 55 }; 56 57 var eventCube = function() { 58 if ( $().cubeportfolio ) { 59 $('.wprt-news-event').each(function() { 60 var $this = $(this); 61 62 $(this).find('#events').cubeportfolio({ 63 filters: '#food-filter', 64 layoutMode: 'grid', 65 defaultFilter: '*', 66 animationType: 'quicksand', 67 gapHorizontal: 0, 68 gapVertical: 0, 69 showNavigation: true, 70 showPagination: true, 71 gridAdjustment: 'responsive', 72 rewindNav: false, 73 auto: false, 74 mediaQueries: [{ 75 width: 1500, 76 cols: 3 77 }, { 78 width: 1100, 79 cols: 3 80 }, { 81 width: 800, 82 cols: 2 83 }, { 84 width: 550, 85 cols: 1 86 }, { 87 width: 320, 88 cols: 1 89 }], 90 caption: ' ', 91 displayType: 'bottomToTop', 92 displayTypeSpeed: 100 93 }); 94 }); 95 } 96 }; 97 98 var galleryRelatedOwl = function() { 99 if ( $().owlCarousel ) { 100 $('.gallery-related').each(function(){ 101 var 102 $this = $(this), 103 gap = Number($this.data("gap")), 104 column = $this.data("column"); 105 106 $this.find('.owl-carousel').owlCarousel({ 107 loop: false, 108 margin: gap, 109 nav: true, 110 navigation : true, 111 pagination: true, 112 autoplay: true, 113 autoplayTimeout: 5000, 114 responsive: { 115 0:{ 116 items:1 117 }, 118 600:{ 119 items:2 120 }, 121 1000:{ 122 items:column 123 } 124 } 125 }); 126 }); 127 } 128 }; 129 130 var galleriesOwl = function() { 131 if ( $().owlCarousel ) { 132 $('.wprt-gallery').each(function(){ 133 var 134 $this = $(this), 135 auto = $this.data("auto"),
136 item = $this.data("column"), 137 item2 = $this.data("column2"), 138 item3 = $this.data("column3"), 139 gap = Number($this.data("gap")); 140 141 $this.find('.owl-carousel').owlCarousel({ 142 loop: false, 143 margin: gap, 144 nav: true, 145 navigation : true, 146 pagination: true, 147 autoplay: auto, 148 autoplayTimeout: 5000, 149 responsive: { 150 0:{ 151 items:item3 152 }, 153 600:{ 154 items:item2 155 }, 156 1000:{ 157 items:item 158 } 159 } 160 }); 161 }); 162 } 163 }; 164 165 var imagesCube = function() { 166 $('.wprt-images-grid').each(function() { 167 var 168 $this = $(this), 169 layout = $this.data("layout"), 170 item = $this.data("column"), 171 item2 = $this.data("column2"), 172 item3 = $this.data("column3"), 173 item4 = $this.data("column4"), 174 layout = $this.data("layout"), 175 gapH = Number($this.data("gaph")), 176 gapV = Number($this.data("gapv")); 177 178 $(this).find('#images-wrap').cubeportfolio({ 179 layoutMode: layout, 180 defaultFilter: '*', 181 animationType: 'quicksand', 182 gapHorizontal: gapH, 183 gapVertical: gapV, 184 showNavigation: false, 185 showPagination: true, 186 gridAdjustment: 'responsive', 187 rewindNav: false, 188 auto: false, 189 mediaQueries: [{ 190 width: 1500, 191 cols: item 192 }, { 193 width: 1100, 194 cols: item 195 }, { 196 width: 800, 197 cols: item2 198 }, { 199 width: 550, 200 cols: item3 201 }, { 202 width: 320, 203 cols: item4 204 }], 205 caption: ' ', 206 displayType: 'bottomToTop', 207 displayTypeSpeed: 100 208 }); 209 }); 210 }; 211 212 var carouselBoxOwl = function() { 213 if ( $().owlCarousel ) { 214 $('.wprt-carousel-box').each(function(){ 215 var 216 $this = $(this), 217 auto = $this.data("auto"), 218 loop = $this.data("loop"), 219 item = $this.data("column"), 220 item2 = $this.data("column2"), 221 item3 = $this.data("column3"), 222 gap = Number($this.data("gap")); 223 224 $this.find('.owl-carousel').owlCarousel({ 225 loop: loop, 226 margin: gap, 227 nav: true, 228 navigation : true, 229 pagination: true, 230 autoplay: auto, 231 autoplayTimeout: 5000, 232 responsive: { 233 0:{ 234 items:item3 235 }, 236 600:{ 237 items:item2 238 }, 239 1000:{ 240 items:item 241 } 242 } 243 }); 244 }); 245 } 246 }; 247 248 var newsOwl = function() { 249 if ( $().owlCarousel ) { 250 $('.wprt-news').each(function(){ 251 var 252 $this = $(this), 253 auto = $this.data("auto"), 254 item = $this.data("column"), 255 item2 = $this.data("column2"), 256 item3 = $this.data("column3"), 257 gap = Number($this.data("gap")); 258 259 $this.find('.owl-carousel').owlCarousel({ 260 loop: false, 261 margin: gap, 262 nav: true, 263 navigation : true, 264 pagination: true, 265 autoplay: auto, 266 autoplayTimeout: 5000, 267 responsive: { 268 0:{ 269 items:item3 270 }, 271 600:{ 272 items:item2 273 }, 274 1000:{ 275 items:item 276 } 277 } 278 }); 279 }); 280 } 281 }; 282 283 var teamOwl = function() { 284 if ( $().owlCarousel ) { 285 $('.wprt-team').each(function(){ 286 var 287 $this = $(this), 288 auto = $this.data("auto"),
289 item = $this.data("column"), 290 item2 = $this.data("column2"), 291 item3 = $this.data("column3"), 292 gap = Number($this.data("gap")); 293 294 $this.find('.owl-carousel').owlCarousel({ 295 loop: false, 296 margin: gap, 297 nav: true, 298 navigation : true, 299 pagination: true, 300 autoplay: auto, 301 autoplayTimeout: 5000, 302 responsive: { 303 0:{ 304 items:item3 305 }, 306 600:{ 307 items:item2 308 }, 309 1000:{ 310 items:item 311 } 312 } 313 }); 314 }); 315 } 316 }; 317 318 var partnerOwl = function() { 319 if ( $().owlCarousel ) { 320 $('.wprt-partner').each(function(){ 321 var 322 $this = $(this), 323 auto = $this.data("auto"), 324 loop = $this.data("loop"), 325 item = $this.data("column"), 326 item2 = $this.data("column2"), 327 item3 = $this.data("column3"), 328 gap = Number($this.data("gap")); 329 330 $this.find('.owl-carousel').owlCarousel({ 331 loop: loop, 332 margin: gap, 333 nav: true, 334 navigation : true, 335 pagination: true, 336 autoplay: auto, 337 autoplayTimeout: 5000, 338 responsive: { 339 0:{ 340 items:item3 341 }, 342 600:{ 343 items:item2 344 }, 345 1000:{ 346 items:item 347 } 348 } 349 }); 350 }); 351 } 352 }; 353 354 var wooOwl = function() { 355 if ( $().owlCarousel ) { 356 $('.wprt-products').each(function(){ 357 var 358 $this = $(this), 359 auto = $this.data("auto"), 360 item = $this.data("column"), 361 item2 = $this.data("column2"), 362 item3 = $this.data("column3"), 363 gap = Number($this.data("gap")); 364 365 $this.find('.owl-carousel').owlCarousel({ 366 loop: false, 367 margin: gap, 368 nav: true, 369 navigation : true, 370 pagination: true, 371 autoplay: auto, 372 autoplayTimeout: 5000, 373 responsive: { 374 0:{ 375 items:item3 376 }, 377 600:{ 378 items:item2 379 }, 380 1000:{ 381 items:item 382 } 383 } 384 }); 385 }); 386 } 387 }; 388 389 var accordions = function() { 390 var args = {easing:'easeOutExpo', duration:300}; 391 392 $('.accordion-item.active').find('.accordion-content').show(); 393 $('.accordion-heading').on('click', function () { 394 if ( !$(this).parent().is('.active') ) { 395 $(this).parent().toggleClass('active') 396 .children('.accordion-content').slideToggle(args) 397 .parent().siblings('.active').removeClass('active') 398 .children('.accordion-content').slideToggle(args); 399 } else { 400 $(this).parent().toggleClass('active'); 401 $(this).next().slideToggle(args); 402 } 403 }); 404 }; 405 406 var popupImages = function() { 407 if ( $().magnificPopup ) { 408 $('.wprt-gallery, .gallery-related').each(function () { 409 $(this).find('.zoom-popup').magnificPopup({ 410 disableOn: 700, 411 type: 'image', 412 gallery:{ 413 enabled: true 414 }, 415 mainClass: 'mfp-fade', 416 removalDelay: 160, 417 preloader: false, 418 fixedContentPos: true 419 }); 420 }); 421 }; 422 }; 423 424 var spacer = function() { 425 $(window).on('load resize', function() { 426 var mode = 'desktop'; 427 428 if ( matchMedia( 'only screen and (max-width: 991px)' ).matches ) 429 mode = 'mobile'; 430 431 if ( matchMedia( 'only screen and (max-width: 767px)' ).matches ) 432 mode = 'smobile'; 433 434 $('.wprt-spacer').each(function(){ 435 if ( mode == 'desktop' ) {
436 $(this).attr('style', 'height:' + $(this).data('desktop') + 'px') 437 } else if ( mode == 'mobile' ) { 438 $(this).attr('style', 'height:' + $(this).data('mobi') + 'px') 439 } else { 440 $(this).attr('style', 'height:' + $(this).data('smobi') + 'px') 441 } 442 }) 443 444 }); 445 }; 446 447 var contentBox = function() { 448 $(window).on('load resize', function() { 449 var mode = 'desktop'; 450 451 if ( matchMedia( 'only screen and (max-width: 991px)' ).matches ) 452 mode = 'mobile'; 453 454 $('.wprt-content-box').each(function(){ 455 if ( mode == 'desktop' ) { 456 $(this).css({margin : $(this).data('margin')}); 457 $(this).children('.inner-wrap').css({padding : $(this).data('padding')}); 458 } else if ( mode == 'mobile' ) { 459 $(this).css({margin : $(this).data('mobimargin')}); 460 $(this).children('.inner-wrap').css({padding : $(this).data('mobipadding')}); 461 } 462 }) 463 }); 464 }; 465 466 var gridBox = function() { 467 $(".wprt-grid-box > div").wrap('<div class="grid-item">'); 468 var item = $(".wprt-grid-box > .grid-item"); 469 470 for(var i = 0; i < item.length; i+=3) { 471 item.slice(i, i+3).wrapAll("<div class='grid-row clearfix'></div>"); 472 } 473 }; 474 475 var counter = function(){ 476 function wprtInview(ele) { 477 var window_top = $(window).scrollTop(), 478 offset_top = $(ele).offset().top; 479 if ( $(ele).length > 0 ) { 480 if ( offset_top + $(ele).height() - 100 >= window_top && 481 offset_top <= ( window_top + 0.85 * $(window).height() ) ) { 482 return true; 483 } else { 484 return false; 485 } 486 } 487 } 488 489 function run_animations() { 490 var did_scroll = false; 491 $(window).on('scroll', function(){ 492 did_scroll = true; 493 }); 494 setInterval(function () { 495 if (did_scroll) { 496 did_scroll = false; 497 498 $('.wprt-counter').each(function() { 499 var $this = $(this); 500 501 if ( wprtInview($this) && !$this.data('complete') ) { 502 $this.data('complete',true); 503 var delay = parseInt($this.data('delay')); 504 setTimeout(function(){ 505 $this.find('.number').countTo(); 506 }, delay ); 507 } 508 }); 509 } 510 }, 200); 511 } 512 run_animations(); 513 }; 514 515 var progressBar = function() { 516 if ( $().appear ) { 517 var $section = $('.wprt-progress').appear(function() { 518 519 function runBars() { 520 var bar = $('.progress-animate'); 521 var bar_width = $(this); 522 $(function(){ 523 $(bar).each(function(){ 524 bar_width = $(this).attr('data-valuenow'); 525 $(this).width(bar_width + '%'); 526 527 $(this).parents('.wprt-progress').find('.perc').addClass('show').width(bar_width + '%'); 528 }); 529 }); 530 } 531 532 runBars(); 533 }); 534 } 535 }; 536 537 var animation = function() { 538 $('.wprt-animation-block').each( function() { 539 var el = $(this), 540 animate = el.data('animate'), 541 duration = el.data('duration'), 542 delay = el.data('delay'), 543 position = el.data('position'); 544 545 el.css({ 546 '-webkit-animation-delay': delay, 547 'animation-delay': delay, 548 '-webkit-animation-duration': duration, 549 'animation-duration': duration 550 }); 551 552 el.waypoint(function() { 553 el.addClass('animated').addClass(animate); 554 },{ 555 triggerOnce: true, 556 offset: position 557 }); 558 }); 559 }; 560 561 var popupVideo = function() { 562 if ( $().magnificPopup ) { 563 $('.popup-video').magnificPopup({ 564 disableOn: 700, 565 type: 'iframe', 566 mainClass: 'mfp-fade', 567 removalDelay: 160, 568 preloader: false, 569 fixedContentPos: true 570 }); 571 }; 572 }; 573 574 var elmentHover = function() { 575 $(".wprt-image-video .icon").hover(function(){ 576 $(this).css({ 577 "color": $(this).data('chover'), 578 "background-color": $(this).data('ghover'), 579 "border-color": $(this).data('bhover'), 580 "transition": "all 0.3s" 581 }); 582 },function(){ 583 $(this).css({ 584 "color": $(this).data('c'), 585 "background-color": $(this).data('g'), 586 "border-color": $(this).data('b'), 587 }); 588 }); 589 }; 590 591 var resizeHeading = function() { 592 $(window).on('load resize', function() { 593 $('.wprt-sheading, .wprt-headings').each(function() { 594 var 595 $this = $(this), 596 font = $this.data("font"), 597 fontMobi = $this.data("mfont"); 598 599 if ( fontMobi ) { 600 if ( $(window).width() < 960 ) { 601 $this.find('.heading').css('font-size', fontMobi + 'px'); 602 } else { 603 $this.find('.heading').css('font-size', font + 'px'); 604 } 605 } 606 }); 607 }); 608 }; 609 610 var inViewport = function() { 611 $('[data-inviewport="yes"]').waypoint(function() { 612 $(this).trigger('on-appear'); 613 }, { offset: '90%', triggerOnce: true });
614 615 $(window).on('load', function() { 616 setTimeout(function() { 617 $.waypoints('refresh'); 618 }, 100); 619 }); 620 }; 621 622 var hereSection = function() { 623 $(window).on('load resize', function(){ 624 var 625 adminBarHeight = 0, 626 topBarHeight = 0, 627 contentTopMargin = 0, 628 heroHeight = 0, 629 customHeight = 0, 630 adminBar = $('#wpadminbar'), 631 topBar = $('#top-bar'), 632 hero = $('.hero-section'), 633 windowHeight = $(window).height(), 634 headerHeight = $('#site-header').height(), 635 heroContent = hero.find('.hero-content'), 636 contentHeight = heroContent.height(), 637 spacing = hero.data('content'); 638 customHeight = hero.data('height'); 639 640 if (topBar.length) topBarHeight = topBar.height(); 641 if (adminBar.length) adminBarHeight = adminBar.height(); 642 643 heroHeight = windowHeight; 644 if ( customHeight ) 645 heroHeight = customHeight; 646 647 if ( $('body').hasClass('header-style-4') ) { 648 hero.css({ height: (heroHeight - adminBarHeight) + "px" }); 649 contentTopMargin = ((heroHeight - contentHeight) / 2) + topBarHeight + spacing; 650 651 heroContent.css("padding-top", (contentTopMargin) + "px"); 652 } else { 653 if ( ! customHeight ) 654 heroHeight = heroHeight - headerHeight - topBarHeight - adminBarHeight; 655 hero.css({ height: heroHeight + "px" }); 656 contentTopMargin = ((heroHeight - contentHeight) / 2) + spacing; 657 heroContent.css("padding-top", (contentTopMargin) + "px"); 658 } 659 }) 660 661 if ( $().vegas ) { 662 $(".hero-section.slideshow").each(function() { 663 var 664 $this = $(this), 665 count = $this.data('count'), 666 count = parseInt(count,10), 667 effect = $this.data('effect'), 668 images = $this.data('image'), 669 cOverlay = $this.data('overlay'), 670 pOverlay = $this.data('poverlay'), 671 i = 0, 672 slides = [], 673 imgs = images.split('|'); 674 675 while ( i < count ) { 676 slides.push( {src:imgs[i]} ); 677 i++; 678 } 679 680 $this.vegas({ 681 slides: slides, 682 overlay: true, 683 transition: effect 684 }); 685 686 var overlay = $('<div />', { 687 class: 'overlay', 688 style: 'background:' + cOverlay 689 }); 690 691 $(this).append(overlay) 692 .find('.vegas-overlay') 693 .addClass(pOverlay); 694 }); 695 } 696 697 698 $('.scroll-target').on('click',function() { 699 var anchor = $(this).attr('href').split('#')[1]; 700 701 if ( anchor ) { 702 if ( $('#'+anchor).length > 0 ) { 703 var headerHeight = 0; 704 705 if ( $('body').hasClass('header-sticky') ) 706 headerHeight = $('#site-header').height(); 707 708 var target = $('#' + anchor).offset().top - headerHeight; 709 710 $('html,body').animate({scrollTop: target}, 1000, 'easeInOutExpo'); 711 } 712 } 713 return false; 714 }) 715 716 717 if ( $('.wprt-fancy-text').is('.scroll') ) { 718 $('.wprt-fancy-text.scroll').each(function() { 719 var 720 $this = $(this), 721 current = 1, 722 height = $this.height(), 723 numberDivs = $this.children().length, 724 first = $this.children('.heading:nth-child(1)'); 725 726 setInterval(function() { 727 var number = current * -height; 728 729 first.css('margin-top', number + 'px'); 730 if ( current === numberDivs ) { 731 first.css('margin-top', '0px'); 732 current = 1; 733 } else current++; 734 }, 2500); 735 }); 736 } 737 738 if ( $('.wprt-fancy-text').is('.typed') ) { 739 if ( $().typed ) { 740 $('.wprt-fancy-text.typed').each(function() { 741 var 742 $this = $(this), 743 texts = $this.data('fancy').split(','); 744 745 $this.find('.text').typed({
746 strings: texts, 747 typeSpeed: 40, 748 loop:true, 749 backDelay: 2000 750 }); 751 }); 752 } 753 } 754 }; 755 756 var fitText = function() { 757 if ( $().fitText ) { 758 $('.wprt-fancy-text').each(function(){ 759 var min = $(this).data("min"); 760 var max = $(this).data("max"); 761 762 $(this).children('.heading').fitText(1.8, { 763 minFontSize: min, 764 maxFontSize: max 765 }); 766 }); 767 } 768 }; 769 770 var bgVideo = function() { 771 if ( $().YTPlayer ) { 772 $(".hero-section.video").each(function() { 773 var 774 $this = $(this), 775 cOverlay = $this.data('overlay'), 776 overlay = $('<div />', { 777 class: 'overlay', 778 style: 'background:' + cOverlay 779 }); 780 781 $this.YTPlayer().append(overlay); 782 }); 783 } 784 }; 785 786 var tabs = function() { 787 $('.wprt-tabs').each(function(){ 788 var 789 list ="", 790 title = $(this).find('.item-title').remove(), 791 titleWrap = $(this).children('.tab-title') ; 792 793 title.each(function() { 794 list = list + "<li class= 'item-title'>" + $(this).html() + "</li>"; 795 }); 796 797 titleWrap.append(list); 798 799 $(this).find('.tab-title li').filter(':first').addClass('active'); 800 $(this).find('.tab-content-wrap').children().hide().filter(':first').show(); 801 802 $(this).find('.tab-title li').on('click', function(e) { 803 var 804 idx = $(this).index(), 805 content = $(this).closest('.wprt-tabs').find('.tab-content-wrap').children().eq(idx); 806 807 $(this).addClass('active').siblings().removeClass('active'); 808 content.fadeIn('slow').siblings().hide(); 809 810 e.preventDefault(); 811 }); 812 }); 813 }; 814 815 var countDown = function() { 816 var style = function(data) { 817 $(this.el).html( 818 "<div class='column days'>" + 819 "<div class='numb'>" + this.leadingZeros(data.days, 2) + "</div>" + 820 "<div class='text'>Days</div>" + 821 "</div>" + 822 "<div class='column hours'>" + 823 "<div class='numb'>" + this.leadingZeros(data.hours, 2) + "</div>" + 824 "<div class='text'>Hours</div>" + 825 "</div>" + 826 "<div class='column mins'>" + 827 "<div class='numb'>" + this.leadingZeros(data.min, 2) + "</div>" + 828 "<div class='text'>Mins</div>" + 829 "</div>" + 830 "<div class='column secs'>" + 831 "<div class='numb'>" + this.leadingZeros(data.sec, 2) + "</div>" + 832 "<div class='text'>Secs</div>" + 833 "</div>"); 834 } 835 836 $('.wprt-countdown').each(function() { 837 $(this).countdown({ 838 date: $(this).attr('data-date'), 839 render: style 840 }); 841 }); 842 }; 843 844 var equalizeHeight = function() { 845 $(window).on('load resize', function () { 846 setTimeout(function () { 847 $(document).imagesLoaded(function () { 848 if ( matchMedia( 'only screen and (max-width: 767px)' ).matches ) { 849 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 850 $('.equalize.sm-equalize-auto').children().css("height", ""); 851 return false; 852 } else if ( matchMedia( 'only screen and (max-width: 991px)' ).matches ) { 853 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 854 return false; 855 } else if ( matchMedia( 'only screen and (max-width: 1199px)' ).matches ) { 856 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 857 return false; 858 } else { 859 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 860 } 861 }); 862 }, 500); 863 }); 864 }; 865 866 // Dom Ready 867 $(function() { 868 inViewport(); 869 equalizeHeight(); 870 accordions(); 871 popupImages(); 872 animation(); 873 popupVideo(); 874 elmentHover(); 875 resizeHeading(); 876 hereSection(); 877 tabs(); 878 countDown(); 879 fitText(); 880 bgVideo(); 881 progressBar(); 882 counter(); 883 spacer(); 884 contentBox(); 885 gridBox(); 886 $( window ).load(function() { 887 eventCube(); 888 galleriesCube(); 889 imagesCube(); 890 carouselBoxOwl(); 891 newsOwl(); 892 teamOwl(); 893 partnerOwl(); 894 wooOwl(); 895 galleriesOwl(); 896 galleryRelatedOwl(); 897 }); 898 });
899 900})(jQuery); 901
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.