1(function($){ "use strict"; 2 3 var v_count = '0'; 4 5 /* Page scroll to id */ 6 if ($('body').hasClass("de-navbar-left")) { 7 $(".mainmenu li a, a.scroll-to").mPageScroll2id({ 8 highlightSelector: ".mainmenu li a", 9 offset: 0, 10 scrollSpeed:750, 11 scrollEasing: "easeInOutCubic" 12 }); 13 } else { 14 $("#mainmenu li a, a.scroll-to").mPageScroll2id({ 15 highlightSelector: "#mainmenu li a", 16 offset: 70, 17 scrollSpeed:750, 18 scrollEasing: "easeInOutCubic" 19 }); 20 } 21 22 /* ========================================== 23 Header Mobile 24 ========================================== */ 25 $( "#menu-btn" ).on('click', function() { 26 $(this).toggleClass( "active" ); 27 if ($(this).hasClass( "active" )) { 28 $('#mainmenu, .mainmenu').stop(true, true).slideDown(); 29 }else{ 30 $('#mainmenu, .mainmenu').stop(true, true).slideUp(); 31 } 32 }); 33 34 /*mobile_mainmenu create span*/ 35 $('#mainmenu li:has(ul)').prepend('<span class="arrow"></span>'); 36 $("#mainmenu > li span.arrow").click(function() { 37 $(this).parent().find("> ul").stop(true, true).slideToggle(); 38 $(this).toggleClass( "active" ); 39 }); 40 41 42 /* -------------------------------------------------- 43 * function 44 * --------------------------------------------------*/ 45 function video_autosize(){ 46 $('.de-video-container').each(function() { 47 var height_1 = $(this).css("height"); 48 var height_2 = $(this).find(".de-video-content").css("height"); 49 var newheight = (height_1.substring(0, height_1.length - 2)-height_2.substring(0, height_2.length - 2))/2; 50 $(this).find('.de-video-overlay').css("height", height_1); 51 $(this).find(".de-video-content").animate({'margin-top': newheight},'fast'); 52 }); 53 } 54 55 function init() { 56 var sh = $('#de-sidebar').css("height"); 57 var dh = $(window).innerHeight(); 58 var h = parseInt(sh) - parseInt(dh); 59 var header_height = parseInt($('.site-header').height(), 10); 60 var screen_height = parseInt($(window).height(), 10); 61 var header_mt = screen_height - header_height; 62 var mq = window.matchMedia("(min-width: 993px)"); 63 var ms = window.matchMedia("(min-width: 768px)"); 64 65 window.addEventListener('scroll', function (e) { 66 67 /* header shrink class */ 68 if (mq.matches) { 69 var distanceY = window.pageYOffset || document.documentElement.scrollTop, 70 shrinkOn = 100, 71 header = document.querySelector(".site-header"); 72 73 if (distanceY > shrinkOn) { 74 $(".site-header").addClass("smaller", 1000, "easeOutBounce"); 75 } else { 76 if ( $(".site-header").hasClass("smaller") ) { 77 $(".site-header").removeClass("smaller"); 78 } 79 } 80 } 81 82 if (mq.matches) { 83 /* header autoshow on scroll begin */ 84 var scrollTop = $(window).scrollTop(); 85 var vscroll = 0; 86 87 if (scrollTop >= 50 && vscroll == 0) { 88 $("header.autoshow").removeClass("scrollOff"); 89 $("header.autoshow").addClass("scrollOn"); 90 vscroll = 1; 91 } else { 92 $("header.autoshow").removeClass("scrollOn"); 93 $("header.autoshow").addClass("scrollOff"); 94 vscroll = 0; 95 } 96 /* header autoshow on scroll close */ 97 98 /* header bottom on scroll begin */ 99 var header_height = parseInt($('.site-header').height(), 10); 100 var screen_height = parseInt($(window).height(), 10); 101 var header_mt = screen_height - header_height; 102 103 if (scrollTop >= header_mt) { 104 $('.header-bottom').css("position", "fixed"); 105 $('.header-bottom').css("top", "0"); 106 } else if (scrollTop <= header_mt) { 107 $('.header-bottom').css("position", "absolute"); 108 $('.header-bottom').css("top", header_mt); 109 } 110 /* header bottom on scroll close */ 111 112 /*side header on scroll begin*/ 113 if ($("header").hasClass("side-header")) { 114 if ($(window).scrollTop() >= h) { 115 $('#de-sidebar').css("position", "fixed"); 116 if (parseInt(sh) > parseInt(dh)) { 117 $('#de-sidebar').css("top", -h); 118 } 119 } else { 120 $('#de-sidebar').css("position", "absolute"); 121 if (parseInt(sh) > parseInt(dh)) { 122 $('#de-sidebar').css("top", 0); 123 } 124 } 125 } 126 /*side header on scroll close*/ 127 } 128 }); 129 130 if (mq.matches) { 131 $('.header-bottom').css('position', 'absolute'); 132 $('.header-bottom').css('top', header_mt); 133 } 134
135 /* Paralax Background */ 136 var $window = $(window); 137 $('section[data-type="background"]').each(function () { 138 var $bgobj = $(this); 139 $(window).scroll(function () { 140 var mq = window.matchMedia("screen and (min-width: 993px)"); 141 if ( mq.matches ) { 142 var yPos = -($window.scrollTop() / $bgobj.data('speed')); 143 var coords = '50% ' + yPos + 'px'; 144 $bgobj.css({ backgroundPosition: coords }); 145 } 146 }); 147 document.createElement("article"); 148 document.createElement("section"); 149 }); 150 151 } 152 window.onload = init(); 153 154 $(window).on('resize', function() { 155 video_autosize(); 156 init(); 157 158 $( ".site-header" ).removeClass( "smaller" ); 159 160 /*header bottom setting begin*/ 161 var mq = window.matchMedia("(max-width: 993px)"); 162 if (mq.matches) { 163 $('.header-bottom').css("display", "block"); 164 $('.header-bottom').css("top", "0"); 165 } 166 /*header bottom setting close*/ 167 168 /* -------------------------------------------------- 169 * custom page with background on side 170 * --------------------------------------------------*/ 171 $('.side-bg').each(function(){ 172 $(this).find(".image-container").css("height",$(this).find(".image-container").parent().css("height")); 173 }); 174 }); 175 176 $(window).on('load', function() { 177 video_autosize(); 178 /* -------------------------------------------------- 179 * custom page with background on side 180 * --------------------------------------------------*/ 181 $('.side-bg').each(function(){ 182 $(this).find(".image-container").css("height",$(this).find(".image-container").parent().css("height")); 183 }); 184 185 /* -------------------------------------------------- 186 * tabs 187 * --------------------------------------------------*/ 188 $('.de_tab').not('.de_tab_links').find('.de_tab_content div.de_tab_content_inner').hide(); 189 $('.de_tab').not('.de_tab_links').find('.de_tab_content div.de_tab_content_inner:first').show(); 190 $('li').find('.v-border').fadeTo(150,0); 191 $('li.active').find('.v-border').fadeTo(150,1); 192 $('.de_nav li').not('.de_nav_links li').click(function() { 193 $(this).parent().find('li').removeClass("active"); 194 $(this).addClass("active"); 195 $(this).parent().parent().find('.v-border').fadeTo(150,0); 196 $(this).parent().parent().find('.de_tab_content div.de_tab_content_inner').hide(); 197 198 var indexer = $(this).index(); 199 $(this).parent().parent().find('.de_tab_content div.de_tab_content_inner:eq(' + indexer + ')').fadeIn(); 200 $(this).find('.v-border').fadeTo(150,1); 201 }); 202 203 /* Scroll Percent Opacity */ 204 var target = $('.center-y, .vertical-align'); 205 var targetHeight = target.outerHeight(); 206 $(document).scroll(function(e){ 207 var scrollPercent = ( targetHeight - window.scrollY ) / targetHeight; 208 if( scrollPercent >= 0 ){ 209 target.css('opacity', scrollPercent); 210 } 211 }); 212 213 /* btn arrow up */ 214 $(".arrow-up").on("click", function() { 215 $(".coming-soon .coming-soon-content").fadeOut("medium",function(){ 216 $("#hide-content").fadeIn(600,function(){ 217 $('.arrow-up').animate({'bottom': '-40px' },"slow"); 218 $('.arrow-down').animate({'top': '0' },"slow"); 219 }); 220 }); 221 }); 222 223 /* btn arrow down */ 224 $(".arrow-down").on("click", function() { 225 $("#hide-content").fadeOut("slow",function(){ 226 $(".coming-soon .coming-soon-content").fadeIn(800,function(){ 227 $('.arrow-up').animate({'bottom': '0px' },"slow"); 228 $('.arrow-down').animate({'top': '-40' },"slow"); 229 }); 230 }); 231 }); 232 }); 233 234 $(window).on('scroll', function() { 235 236 /* counter */ 237 $('.timer').each(function(){ 238 var imagePos = $(this).offset().top; 239 var topOfWindow = $(window).scrollTop(); 240 if (imagePos < topOfWindow+500 && v_count=='0') { 241 $(function ($) { 242 /*start all the timers*/ 243 $('.timer').each(count); 244 function count(options) { 245 v_count = '1'; 246 var $this = $(this); 247 options = $.extend({}, options || {}, $this.data('countToOptions') || {}); 248 $this.countTo(options); 249 } 250 }); 251 } 252 }); 253 254 /* progress bar */ 255 $('.de-progress').each(function() { 256 var pos_y = $(this).offset().top; 257 var value = $(this).find(".progress-bar").attr('data-value'); 258 var topOfWindow = $(window).scrollTop(); 259 if (pos_y < topOfWindow+500) { 260 $(this).find(".progress-bar").animate({'width': value },"slow"); 261 } 262 }); 263 }); 264 265 /* -------------------------------------------------- 266 * custom positiion 267 * --------------------------------------------------*/ 268 var $doc_height = $(window).innerHeight(); 269 270 /* Custom .center-y */ 271 var picheight = $('.center-y').css("height"); 272 picheight = parseInt(picheight, 10); 273 $('.center-y').css('margin-top', ( ( $doc_height - picheight ) / 2 ) - 90 ); 274 275 /* Custom .vertical-align */ 276 var vertical_height = $('.vertical-align').css("height"); 277 vertical_height = parseInt(vertical_height, 10); 278 var bannerlogo_height = $('.banner-logo').css("height"); 279 bannerlogo_height = parseInt(bannerlogo_height, 10); 280 $('.vertical-align').css('margin-top', (($doc_height - vertical_height)/2) - (70 + (bannerlogo_height/2))); 281 282 $('#home-sec').css("height",$doc_height); 283 $('.full-height').css("height", $doc_height); 284 $('.full-height .de-video-container').css("height",$doc_height); 285 $(window).on('resize', function(){ 286 $('#home-sec').css("height",$doc_height); 287 $('.full-height').css("height", $doc_height); 288 $('.full-height .de-video-container').css("height",$doc_height); 289 }); 290 291 /* Filter Sub Categories */ 292 $('ul.listed_taxonomy_filters > li > a').on('click', function(e){ 293 $('ul.listed_taxonomy_filters > li > a').parent().removeClass("showchild"); 294 $(this).parent().addClass("showchild"); 295 }); 296 297 /* new added */ 298 $('.expand').each(function () { 299 $(this).find('h4').on("click", function () {
300 var iteration=$(this).data('iteration')||1 301 switch ( iteration) { 302 case 1: 303 $(this).next('.hidden-content').slideDown(300); 304 $(this).addClass('active'); 305 break; 306 307 case 2: 308 $(this).next('.hidden-content').slideUp(300); 309 $(this).removeClass('active'); 310 break; 311 } 312 iteration++; 313 if (iteration>2) iteration=1 314 $(this).data('iteration',iteration); 315 }); 316 }); 317 318 $("section,div").css('background-color', function () { 319 return $(this).data('bgcolor'); 320 }); 321 322 $("div").css('background-image', function () { 323 return $(this).data('bgimage'); 324 }); 325 326 /* stellar */ 327 $(window).stellar({ 328 horizontalScrolling: false, 329 verticalOffset: 0, 330 }); 331 332 /* Typing Text */ 333 $('.typing-wrap').each( function(){ 334 var $selector = $(this), 335 $id = $selector.data('id'), 336 $cursor = $selector.data('cursorchar'), 337 $speed = $selector.data('speed'), 338 $delay = $selector.data('delay'); 339 340 $('.typed-'+$id).typed({ 341 stringsElement: $('.typed-strings'), 342 typeSpeed: $speed, 343 backDelay: $delay, 344 loop: true, 345 cursorChar: $cursor, 346 contentType: 'html', 347 loopCount: false, 348 callback: function () { null; }, 349 resetCallback: function () { newTyped(); } 350 }); 351 }); 352 353 /* Let It Snow */ 354 $('.let-it-snow').each( function() { 355 $(this).letItSnow({ 356 stickyFlakes: 'lis-flake--js', 357 makeFlakes: true, 358 sticky: true 359 }); 360 }); 361 362 /* Home YouTube Video */ 363 $(".player").YTPlayer(); 364 365 /* FitVids */ 366 $(".container").fitVids(); 367 368 $(window).load(function() { 369 /* -------------------------------------------------- 370 * Image Before After 371 * --------------------------------------------------*/ 372 $('.twentytwenty-container').each( function(){ 373 var $selector = $(this), 374 before = $selector.data('before'), 375 after = $selector.data('after'), 376 before_size = $selector.data('bsize'); 377 $selector.twentytwenty({ 378 default_offset_pct: before_size, 379 orientation: 'horizontal', 380 before_label: before, 381 after_label: after, 382 no_overlay: false, 383 move_slider_on_hover: false, 384 move_with_handle_only: true, 385 click_to_move: false, 386 }); 387 }); 388 }); 389 390 /*Moving Background Image*/ 391 $('.moving-home').each( function() { 392 var selector = $(this), 393 time = selector.data('time'), 394 x = 0; 395 setInterval( function() { 396 x -= 1; 397 selector.css('background-position', x + 'px 0'); 398 }, time); 399 }); 400 401 /* -------------------------------------------------- 402 * magnificPopup 403 * --------------------------------------------------*/ 404 /* OT Image Gallery 1, OT Image Gallery 2 */ 405 $('.archi-image-gallery').each( function(){ 406 var $selector = $(this); 407 $selector.magnificPopup({ 408 delegate: '.image-popup', 409 type: 'image', 410 closeOnContentClick: true, 411 closeBtnInside: false, 412 fixedContentPos: true, 413 mainClass: 'mfp-no-margins mfp-with-zoom mfp-img-mobile', 414 image: { 415 verticalFit: true, 416 titleSrc: function(item) { 417 return item.el.attr('title'); 418 } 419 }, 420 gallery: { 421 enabled: true 422 } 423 }); 424 }); 425 426 /* OT Portfolio Gallery, OT Portfolio Gallery 2 */ 427 $('.gallery-popup-link').magnificPopup({ 428 delegate: 'a', 429 type: 'image', 430 closeOnContentClick: true, 431 closeBtnInside: false, 432 fixedContentPos: true, 433 mainClass: 'mfp-no-margins mfp-with-zoom mfp-img-mobile', 434 image: { 435 verticalFit: true, 436 titleSrc: function(item) { 437 return item.el.attr('title'); 438 } 439 }, 440 gallery: { 441 enabled: true 442 } 443 }); 444 445 /* OT Masonry Image Gallery */ 446 $('.masonry-gallery-images-popup').each( function(){ 447 var $selector = $(this); 448 $selector.magnificPopup({ 449 delegate: '.masonry-image-popup', 450 type: 'image', 451 closeOnContentClick: true, 452 closeBtnInside: false, 453 fixedContentPos: true, 454 mainClass: 'mfp-no-margins mfp-with-zoom mfp-img-mobile', 455 image: { 456 verticalFit: true, 457 titleSrc: function(item) { 458 return item.el.attr('title'); 459 } 460 }, 461 gallery: { 462 enabled: true 463 } 464 }); 465 }); 466 467 /* OT Album Gallery 1, OT Album Gallery 2 */ 468 $('.album-gallery-popup').each( function(){ 469 var $selector = $(this); 470 $selector.magnificPopup({ 471 delegate: '.item-popup', 472 type: 'image', 473 closeOnContentClick: true, 474 closeBtnInside: false, 475 fixedContentPos: true, 476 mainClass: 'mfp-no-margins mfp-with-zoom mfp-img-mobile', 477 image: { 478 verticalFit: true, 479 titleSrc: function(item) { 480 return item.el.attr('title'); 481 } 482 }, 483 gallery: { 484 enabled: true 485 } 486 }); 487 }); 488 489 /* Project popup content with next/previous button */ 490 $('.projects-load-ajax').each( function(){ 491 var $selector = $(this); 492 $selector.magnificPopup({ 493 delegate: '.simple-ajax-popup-align-top', 494 type: 'ajax', 495 alignTop: true, 496 overflowY: 'scroll', 497 fixedContentPos: true, 498 callbacks: { 499 beforeOpen: function() { $('html').addClass('mfp-helper'); }, 500 close: function() { $('html').removeClass('mfp-helper'); }, 501 /* added 23/7/2021 */ 502 ajaxContentAdded: function() { 503 /* Project Image Carousel */
504 $('.image__carousel').each( function(index) { 505 var selector = $(this); 506 selector.owlCarousel({ 507 singleItem: true, 508 navigation : true, 509 pagination : true, 510 autoHeight : false, 511 slideSpeed: 300, 512 paginationSpeed: 400, 513 autoPlay : selector.data('autoplay'), 514 transitionStyle : 'fade', 515 navigationText : ['', ''], 516 afterInit: makePages, 517 afterUpdate: makePages 518 }); 519 function makePages() { 520 $.each(this.owl.userItems, function(i) { 521 $('.owl-controls .owl-page').eq(i) 522 .css({ 523 'background': 'url(' + $(this).find('img').attr('src') + ')', 524 'background-size': 'cover' 525 }) 526 }); 527 } 528 }); 529 } 530 }, 531 gallery: { 532 enabled: true 533 }, 534 }); 535 }); 536 537 /* Project popup content without next/previous button */ 538 $('.single-ajax-popup').magnificPopup({ 539 type: 'ajax', 540 alignTop: true, 541 overflowY: 'scroll', 542 fixedContentPos: true, 543 callbacks: { 544 beforeOpen: function() { $('html').addClass('mfp-helper'); }, 545 close: function() { $('html').removeClass('mfp-helper'); }, 546 /* added 23/7/2021 */ 547 ajaxContentAdded: function() { 548 /* Project Image Carousel */ 549 $('.image__carousel').each( function(index) { 550 var selector = $(this); 551 selector.owlCarousel({ 552 singleItem: true, 553 navigation : true, 554 pagination : true, 555 autoHeight : false, 556 slideSpeed: 300, 557 paginationSpeed: 400, 558 autoPlay : selector.data('autoplay'), 559 transitionStyle : 'fade', 560 navigationText : ['', ''], 561 afterInit: makePages, 562 afterUpdate: makePages 563 }); 564 function makePages() { 565 $.each(this.owl.userItems, function(i) { 566 $('.owl-controls .owl-page').eq(i) 567 .css({ 568 'background': 'url(' + $(this).find('img').attr('src') + ')', 569 'background-size': 'cover' 570 }) 571 }); 572 } 573 }); 574 } 575 }, 576 }); 577 578 /* popup youtube, video, gmaps -> use in OT Video Tour */ 579 $('.popup-youtube').magnificPopup({ 580 disableOn: 700, 581 type: 'iframe', 582 mainClass: 'mfp-fade', 583 removalDelay: 160, 584 preloader: false, 585 fixedContentPos: false, 586 }); 587 588 /* -------------------------------------------------- 589 * owlCarousel 590 * --------------------------------------------------*/ 591 /*Gallery Post*/ 592 $('.slider-post').each( function() { 593 var selector = $(this); 594 selector.owlCarousel({ 595 items : 1, 596 autoplay: selector.data('autoplay'), 597 slideSpeed : selector.data('speed'), 598 paginationSpeed : selector.data('navspeed'), 599 rewindSpeed : selector.data('rewinspeed'), 600 singleItem:true, 601 transitionStyle : selector.data('transition'), 602 }); 603 }); 604 605 /* Client Logo */ 606 $('.client__slides').each( function() { 607 var selector = $(this); 608 selector.owlCarousel({ 609 items : selector.data('visible'), 610 itemsDesktop : [1199, 4], 611 itemsDesktopSmall : [979, 3], 612 itemsTablet : [768, 3], 613 itemsTabletSmall : [767, 2], 614 itemsMobile : [479, 1], 615 navigation : false, 616 pagination : false, 617 autoPlay : true 618 }); 619 }); 620 621 /* Portfolio Carousel Style */ 622 $('.portfolio__carousel').each( function() { 623 var selector = $(this); 624 selector.owlCarousel({ 625 items : selector.data('visible'), 626 itemsDesktop : [1199,3], 627 itemsDesktopSmall : [979,2], 628 itemsTablet : [768, 2], 629 itemsTabletSmall : false, 630 itemsMobile : [479, 1], 631 navigation: true, 632 pagination: false, 633 autoPlay : selector.data('autoplay'), 634 navigationText : ['', ''], 635 }); 636 }); 637 638 /* Testimonials Carousel */ 639 $('.testimonial__carousel').each( function() { 640 var selector = $(this); 641 selector.owlCarousel({ 642 items : selector.data('visible'), 643 itemsDesktop : [1199,2], 644 itemsDesktopSmall : [980,2],
645 itemsTablet: [768,1], 646 itemsTabletSmall: false, 647 itemsMobile : [479,1], 648 navigation : false, 649 autoHeight : selector.data('autoheight'), 650 autoPlay : selector.data('autoplay'), 651 slideSpeed : selector.data('speed'), 652 paginationSpeed : selector.data('navspeed'), 653 rewindSpeed : selector.data('rewinspeed'), 654 navigationText : ['', ''], 655 }); 656 }); 657 658 /* Testimonials Carousel Group */ 659 $('.testimonial__carousel_group').each( function() { 660 var selector = $(this); 661 selector.owlCarousel({ 662 items : 1, 663 singleItem:true, 664 navigation : false, 665 autoHeight : selector.data('autoheight'), 666 autoPlay : selector.data('autoplay'), 667 slideSpeed : selector.data('speed'), 668 paginationSpeed : selector.data('navspeed'), 669 rewindSpeed : selector.data('rewinspeed'), 670 navigationText : ['', ''], 671 }); 672 }); 673 674 /* Project Image Carousel */ 675 $('.image__carousel').each( function() { 676 var selector = $(this); 677 selector.owlCarousel({ 678 singleItem: true, 679 navigation : true, 680 pagination : true, 681 autoHeight : false, 682 slideSpeed: 300, 683 paginationSpeed: 400, 684 autoPlay : selector.data('autoplay'), 685 transitionStyle : 'fade', 686 navigationText : ['', ''], 687 afterInit: makePages, 688 afterUpdate: makePages 689 }); 690 function makePages() { 691 $.each(this.owl.userItems, function(i) { 692 $('.owl-controls .owl-page').eq(i) 693 .css({ 694 'background': 'url(' + $(this).find('img').attr('src') + ')', 695 'background-size': 'cover' 696 }) 697 }); 698 } 699 }); 700 701 /* Blog Carousel */ 702 $('.blog-carousel').each( function() { 703 var selector = $(this); 704 selector.owlCarousel({ 705 items : selector.data('visible'), 706 itemsDesktop : [1199, 3], 707 itemsDesktopSmall : [979, 2], 708 itemsTablet : [768, 2], 709 itemsTabletSmall : [767, 2], 710 itemsMobile : [479, 1], 711 navigation : false, 712 pagination : true, 713 autoPlay : selector.data('autoplay'), 714 slideSpeed : selector.data('speed'), 715 paginationSpeed : selector.data('navspeed'), 716 rewindSpeed : selector.data('rewinspeed'), 717 }); 718 }); 719 720 $('.text-slider').each( function() { 721 var selector = $(this); 722 selector.owlCarousel({ 723 items : 1, 724 singleItem:true, 725 navigation: false, 726 pagination: false, 727 mouseDrag: false, 728 touchDrag: false, 729 autoPlay: 4000, 730 transitionStyle: "fade" 731 }); 732 }); 733 734 /* Simple Slider */ 735 $('.simple__slider').each( function() { 736 var selector = $(this); 737 selector.owlCarousel({ 738 items: 1, 739 singleItem: true, 740 navigation: false, 741 pagination: false, 742 mouseDrag: false, 743 touchDrag: false, 744 autoPlay: 4000, 745 transitionStyle: "fade" 746 }); 747 }); 748 749 $('.carousel-single-navi').each( function () { 750 var $next = $(this).data('next'); 751 var $prev = $(this).data('prev'); 752 $(this).owlCarousel({ 753 items: 1, 754 singleItem: true, 755 navigation: true, 756 navigationText : [$prev, $next], 757 pagination: false, 758 mouseDrag: false, 759 touchDrag: false, 760 transitionStyle: "fade" 761 }); 762 }); 763 764 /* logo carousel hover */ 765 $(".client__slides img").on("mouseenter", function () { 766 $(this).fadeTo(150,.5); 767 }).on("mouseleave", function () { 768 $(this).fadeTo(150,1); 769 }); 770 771 $('.process-carousel-wrap').each( function() { 772 var selector = $(this), 773 sync1 = $(".process-sync1"), 774 sync2 = $(".process-sync2"), 775 visible = selector.data('visible'); 776 777 sync1.owlCarousel({ 778 singleItem : true, 779 transitionStyle : "fade", 780 autoHeight : true, 781 slideSpeed : 1500, 782 navigation: false, 783 pagination:false, 784 afterAction : syncPosition, 785 responsiveRefreshRate : 200 786 }); 787 788 sync2.owlCarousel({ 789 items : visible, 790 itemsDesktop : [1199,3], 791 itemsDesktopSmall : [979,3], 792 itemsTablet : [768,2],
793 itemsMobile : [479,2], 794 pagination:false, 795 responsiveRefreshRate : 100, 796 afterInit : function(el){ 797 el.find(".owl-item").eq(0).addClass("synced"); 798 } 799 }); 800 801 function syncPosition(el){ 802 var current = this.currentItem; 803 sync2.find(".owl-item").removeClass("synced").eq(current).addClass("synced") 804 if( sync2.data("owlCarousel") !== undefined ){ 805 center(current) 806 } 807 } 808 809 sync2.on("click", ".owl-item", function(e){ 810 e.preventDefault(); 811 var number = jQuery(this).data("owlItem"); 812 sync1.trigger("owl.goTo",number); 813 }); 814 815 function center(number){ 816 var sync2visible = sync2.data("owlCarousel").owl.visibleItems; 817 var num = number; 818 var found = false; 819 for(var i in sync2visible){ 820 if(num === sync2visible[i]){ 821 var found = true; 822 } 823 } 824 825 if(found===false){ 826 if(num>sync2visible[sync2visible.length-1]){ 827 sync2.trigger("owl.goTo", num - sync2visible.length+2) 828 }else{ 829 if(num - 1 === -1){ 830 num = 0; 831 } 832 sync2.trigger("owl.goTo", num); 833 } 834 } else if(num === sync2visible[sync2visible.length-1]){ 835 sync2.trigger("owl.goTo", sync2visible[1]) 836 } else if(num === sync2visible[0]){ 837 sync2.trigger("owl.goTo", num-1) 838 } 839 } 840 }); 841 842 /*Portfolio Filter*/ 843 $('.testimonial-masonry').isotope({ 844 itemSelector: '.item', 845 animationEngine : 'css', 846 masonry: { 847 columnWidth: '.item-testi-grid-sizer' 848 }, 849 }); 850 851 $('.services-masonry').isotope({ 852 itemSelector: '.item', 853 animationEngine : 'css', 854 masonry: { 855 columnWidth: '.item-service-grid-sizer' 856 }, 857 }); 858 859 $('.projects-grids').isotope({ 860 itemSelector: '.grid-items', 861 animationEngine : 'css', 862 masonry: { 863 columnWidth: '.grid-sizers' 864 }, 865 }); 866 867 $('.archi-image-gallery').isotope({ 868 itemSelector: '.project-item', 869 animationEngine : 'css', 870 masonry: { 871 columnWidth: '.project-item-sizer' 872 }, 873 }); 874 875 /*Portfolio Filter*/ 876 $('.projects-grid-wrapper').each( function(){ 877 var $container = $(this).find('.projects-grid'); 878 $container.isotope({ 879 itemSelector : '.project-item', 880 animationEngine : 'css', 881 masonry: { 882 columnWidth: '.project-item-sizer' 883 } 884 }); 885 886 var $optionSets = $(this).find('.project_filters'), 887 $optionLinks = $optionSets.find('a'); 888 889 $optionLinks.on('click', function(){ 890 var $this = $(this); 891 892 if ( $this.hasClass('selected') ) { 893 return false; 894 } 895 var $optionSet = $this.parents('.project_filters'); 896 $optionSet.find('.selected').removeClass('selected'); 897 $this.addClass('selected'); 898 899 var selector = $(this).attr('data-filter'); 900 $container.isotope({ 901 filter: selector 902 }); 903 return false; 904 }); 905 }); 906 907 if( $('#projects_grid').length > 0 ){ 908 var $container = $('#projects_grid'); 909 $container.isotope({ 910 /*set itemSelector so .grid-sizer is not used in layout*/ 911 itemSelector: '.project-item', 912 animationEngine : 'css', 913 masonry: { 914 /*use element for option*/ 915 columnWidth: '.project-item-sizer' 916 } 917 }); 918 919 $('.project_filters a').click(function(){ 920 var $this = $(this); 921 922 if ( $this.hasClass('selected') ) { 923 return false; 924 } 925 var $optionSets = $this.parents('.project_filters'); 926 $optionSets.find('.selected').removeClass('selected'); 927 $this.addClass('selected'); 928 929 var selector = $(this).attr('data-filter'); 930 $container.isotope({ 931 filter: selector 932 }); 933 return false; 934 }); 935 }; 936 937 /* Royal Preloader */ 938 if ( $('#royal_preloader').length ) { 939 var $selector = $('#royal_preloader'), 940 $width = $selector.data('width'), 941 $height = $selector.data('height'), 942 $color = $selector.data('color'), 943 $bgcolor = $selector.data('bgcolor'), 944 $logourl = $selector.data('url'); 945 946 Royal_Preloader.config({ 947 mode : 'logo', 948 logo : $logourl, 949 logo_size : [$width, $height], 950 showProgress : true, 951 showPercentage : true, 952 text_colour: $color, 953 background: $bgcolor, 954 }); 955 } 956 957 if ( $('#back-to-top').length ) { 958 var scrollTrigger = 500, 959 backToTop = function () { 960 var scrollTop = $(window).scrollTop(); 961 if (scrollTop > scrollTrigger) { 962 $('#back-to-top').addClass('show'); 963 } else { 964 $('#back-to-top').removeClass('show'); 965 } 966 }; 967 backToTop(); 968 $(window).on('scroll', function () { 969 backToTop(); 970 }); 971 $('#back-to-top').on('click', function (e) { 972 e.preventDefault(); 973 $('html,body').animate({ 974 scrollTop: 0 975 }, 700); 976 }); 977 } 978 979})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.