1jQuery(function($) { 2 3 4 5 $.fn.animate_on_appear = function(options_passed) 6 { 7 return this.each(function(){ 8 var self = $(this); 9 10 self.appear( function() 11 { 12 var effect = $(this).data('animation'); 13 var delay = $(this).data('delay'); 14 15 $(this).delay(delay).queue( function() { 16 17 $(this).removeClass('with_animation').addClass( effect ); 18 19 }); 20 21 }); 22 23 }); 24 }; 25 26 27 $.fn.chart_skill = function(options) 28 { 29 30 return this.each(function() 31 { 32 var container = $(this), elements = container.find('.chart'); 33 34 35 //trigger displaying of thumbnails 36 container.appear(function() 37 { 38 elements.each(function(i) 39 { 40 var $chart = $(this); 41 42 var color = $(this).data('color'); 43 var color2 = $(this).data('color2'); 44 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.easy-pie-chart.js'], function(){ 45 $chart.easyPieChart({ 46 lineWidth: 3, 47 size: 140, 48 trackColor: color2, 49 scaleColor: false, 50 barColor: color, 51 barColor2: color, 52 animate:2000 53 }); 54 }); 55 56 }); 57 }); 58 }); 59 } 60 61 $.fn.counters = function(options) 62 { 63 64 return this.each(function() 65 { 66 var container = $(this), elements = container.find('.count_to .odometer'); 67 68 69 //trigger displaying of thumbnails 70 container.appear( function() 71 { 72 elements.each(function(i) 73 { 74 var $count = $(this); 75 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['odometer.min.js'], function(){ 76 od = new Odometer({ 77 el: $count[0], 78 format: '(,ddd)', 79 theme: 'minimal', 80 duration: $count.data('duration') 81 }); 82 83 od.update($count.data('number')); 84 }); 85 86 87 88 }); 89 }); 90 }); 91 92 }; 93 94 $.fn.skills = function(options) 95 { 96 return this.each(function() 97 { 98 var container = $(this), 99 100 elements = container.find('.skill'); 101 102 103 //trigger displaying of thumbnails 104 container.appear(function() 105 { 106 107 elements.each(function(i) 108 { 109 var element = $(this), 110 percentage = $(this).data('percentage'), 111 element = element.find('.prog'); 112 113 114 setTimeout(function(){ element.css('width', percentage+'%'); element.addClass('start_animation') }, (i * 250)); 115 116 }); 117 }); 118 }); 119 120 }; 121 122 123 $('.with_animation').not('#fullpage .section .with_animation').animate_on_appear(); 124 125 if($.fn.skills) 126 { 127 $('.block_skill').skills(); 128 } 129 130 if($.fn.chart_skill) 131 { 132 $('.chart_skill').chart_skill(); 133 134 } 135 136 if($.fn.counters) 137 { 138 $('.animated_counter').counters(); 139 140 } 141}); 142 143(function( $ ){ 144 $.fn.codelessSliderInit = function () { 145 "use strict"; 146 147 var slider = this; 148 var parent = this.parents('.codeless_slider_swiper').first(); 149 var slide_per_view = slider.data('slidenumber'); 150 var height = slider.data('height'); 151 152 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['swiper.min.js'], function(){ 153 154 if(height == 'fullscreen') 155 height = $(window).height(); 156 157 var $loading = $('.loading', parent); 158 159 if($('body').hasClass('header_7') && $(window).width() > 970 && $('.codeless_slider_wrapper', parent).css('position') == 'fixed' ){ 160 var pad = $('.header_wrapper').innerWidth(); 161 var pos = 'left' 162 if($('.pos--right').length > 0) 163 pos = 'right' 164 $('.codeless_slider_wrapper', parent).css('padding-'+pos, pad+'px'); 165 $('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' ); 166 } 167 168 169 170 parent.height(height+'px'); 171 slider.height(height+'px'); 172 $('.codeless_slider_wrapper', parent).css('min-height', height+'px'); 173 parent.css('min-height', height+'px'); 174 175 /* ----uncomment this if you want a min height for slider on responsive */ 176 /* 177 if($(window).width() < 767){ 178 var window_width = $(window).width(); 179 var new_height = (window_width * height) / 767; 180 $('.codeless_slider_wrapper', parent).css('min-height', new_height+'px'); 181 parent.css('min-height', new_height+'px'); 182 183 parent.height(new_height+'px'); 184 slider.height(new_height+'px'); 185 } 186 */ 187 188 $('.codeless_slider').imagesLoaded(function(){ 189 $loading.css('display', 'none'); 190 var c_speed = $('.codeless_slider').data('speed'); 191 if(c_speed == 'undefined') 192 c_speed = 800; 193 194 var touch = true; 195 if( $('.codeless_slider .swiper-slide').length == 1 ) 196 touch = false;
197 198 codelessSlider = new Swiper('.codeless_slider',{ 199 slidesPerView: slide_per_view, 200 paginationAsRange: false, 201 loop: false, 202 touchRatio: 0.7, 203 autoplay: true, 204 speed: c_speed, 205 simulateTouch: touch, 206 207 noSwiping: true, 208 updateOnImagesReady:true, 209 on:{ 210 211 /*init: function(swiper){ 212 console.log(codelessSlider); 213 var $h1 = $(swiper.activeSlide()).find('h1'); 214 var $p = $(swiper.activeSlide()).find('p'); 215 var $buttons = $(swiper.activeSlide()).find('.buttons'); 216 var slide_color = $(swiper.activeSlide()).data('color'); 217 $h1.removeClass('with_animation').addClass($h1.data('animation')); 218 $p.removeClass('with_animation').addClass($p.data('animation')); 219 $buttons.removeClass('with_animation').addClass($buttons.data('animation')); 220 if( $('.header_wrapper').hasClass('header_1')) 221 $('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color); 222 },*/ 223 slideChangeTransitionEnd: function(swiper){ 224 var activeSlide = codelessSlider.slides[codelessSlider.activeIndex]; 225 var $h1 = $(activeSlide).find('h1'); 226 var $p = $(activeSlide).find('p'); 227 var $buttons = $(activeSlide).find('.buttons'); 228 var slide_color = $(activeSlide).data('color'); 229 $h1.removeClass('with_animation').addClass($h1.data('animation')); 230 $p.removeClass('with_animation').addClass($p.data('animation')); 231 $buttons.removeClass('with_animation').addClass($buttons.data('animation')); 232 233 234 $h1 = $(activeSlide).next().find('h1'); 235 $p = $(activeSlide).next().find('p'); 236 $buttons = $(activeSlide).next().find('.buttons'); 237 $h1.addClass('with_animation').removeClass($h1.data('animation')); 238 $p.addClass('with_animation').removeClass($p.data('animation')); 239 $buttons.addClass('with_animation').removeClass($buttons.data('animation')); 240 241 $h1 = $(activeSlide).prev().find('h1'); 242 $p = $(activeSlide).prev().find('p'); 243 $buttons = $(activeSlide).prev().find('.buttons'); 244 $h1.addClass('with_animation').removeClass($h1.data('animation')); 245 $p.addClass('with_animation').removeClass($p.data('animation')); 246 $buttons.addClass('with_animation').removeClass($buttons.data('animation')); 247 if( $('.header_wrapper').hasClass('header_1') && !$('.header_wrapper').hasClass('open')) 248 $('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color); 249 }, 250 slideChangeTransitionStart: function(swiper){ 251 var activeSlide = codelessSlider.slides[codelessSlider.activeIndex]; 252 var $h1 = $(activeSlide).find('h1'); 253 var $p = $(activeSlide).find('p'); 254 var $buttons = $(activeSlide).find('.buttons'); 255 var slide_color = $(activeSlide).data('color'); 256 $h1.addClass('with_animation').removeClass($h1.data('animation')); 257 $p.addClass('with_animation').removeClass($p.data('animation')); 258 $buttons.addClass('with_animation').removeClass($buttons.data('animation')); 259 if( $('.header_wrapper').hasClass('header_1') && !$('.header_wrapper').hasClass('open')) 260 $('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color); 261 } 262 } 263 }); 264 265 $('.nav-slider .next', parent ).on('click', function(e){ 266 e.preventDefault(); 267 codelessSlider.slideNext(); 268 }); 269 270 $('.nav-slider .prev', parent).on('click', function(e){ 271 e.preventDefault(); 272 codelessSlider.slidePrev(); 273 }); 274 }); 275 276 $.browserSelector(); 277 278 if(parent.hasClass('parallax_slider') && $('.container').width() > 724 && $window_width != 1024 && !$("html").hasClass("safari") ){ 279 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['skrollr.min.js'], function(){ 280 var skrollr_slider = skrollr.init({ 281 edgeStrategy: 'set', 282 smoothScrolling: true, 283 forceHeight: false 284 }); 285 skrollr_slider.refresh() 286 }); 287 } 288 289 if($("html").hasClass("safari")){ 290 $('.codeless_slider_wrapper', parent).css('-webkit-perspective', 'none').css('-webkit-transform', 'none'); 291 } 292 293 294 if($('.swiper-slide', slider).length == 1) 295 $('.nav-slider', parent).hide(); 296 297 $(window).resize(function(){ 298 if($('body').hasClass('header_7') && $(window).width() > 970 ){ 299 var pad = $('.header_wrapper').innerWidth(); 300 var pos = 'left' 301 if($('.pos--right').length > 0) 302 pos = 'right' 303 $('.codeless_slider_wrapper', parent).css('padding-'+pos, pad+'px'); 304 $('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' ); 305 }else{ 306 var pos = 'left' 307 if($('.pos--right').length > 0) 308 pos = 'right' 309 $('.codeless_slider_wrapper', parent).css('padding-'+pos, 0+'px'); 310 $('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' ); 311 } 312 313 height = slider.data('height'); 314 315 if(height == 'fullscreen'){ 316 height = $(window).height(); 317 $('.codeless_slider_wrapper', parent).css('min-height', height+'px'); 318 parent.css('min-height', height+'px'); 319 } 320 parent.height(height+'px'); 321 slider.height(height+'px'); 322 323 if($(window).width() < 767){ 324 var window_width = $(window).width(); 325 var new_height = (window_width * height) / 767; 326 $('.codeless_slider_wrapper', parent).css('min-height', new_height+'px'); 327 parent.css('min-height', new_height+'px'); 328 329 parent.height(new_height+'px'); 330 slider.height(new_height+'px'); 331 } 332 333 }); 334 }); 335 }; 336})(jQuery); 337 338 339(function( $ ) { 340 'use strict'; 341 342 /** 343 * All of the code for your public-facing JavaScript source 344 * should reside in this file. 345 * 346 * Note: It has been assumed you will write jQuery code here, so the 347 * $ function reference has been prepared for usage within the scope 348 * of this function. 349 * 350 * This enables you to define handlers, for when the DOM is ready: 351 * 352 * $(function() { 353 * 354 * }); 355 * 356 * When the window is loaded: 357 * 358 * $( window ).load(function() { 359 * 360 * }); 361 * 362 * ...and/or other possibilities. 363 * 364 * Ideally, it is not considered best practise to attach more than a 365 * single DOM-ready or window-load handler for a particular page. 366 * Although scripts in the WordPress core, Plugins and Themes may be 367 * practising this, we should strive to set a better example in our own work. 368 */ 369 370 var $window_width = $(window).width(); 371 372 /*------------------------------ Lists ----------------------------- */ 373 374 375 $(document).ready(function () { 376 /* Codeless Slider Init */ 377 if($('.codeless_slider').length > 0)
378 $('.codeless_slider').codelessSliderInit(); 379 /* Set Icon for list elements. (1 icon for all list) */ 380 381 codelessSetIconList(); 382 /* Fullwidth Google Map */ 383 codelessFullwidthMap(); 384 /* Styling VC section */ 385 codelessSectionStyle(); 386 /* Accordion Toggle Binding */ 387 accordionBinding(); 388 /* FAQ filter */ 389 codelessFaqFilter(); 390 391 /* Staff Carousel */ 392 codelessStaffCarousel(); 393 394 /* Portfolio Carousel */ 395 codelessPortfolioCarousel(); 396 397 /* Blog Latest Post */ 398 codelessLatestBlogCarousel(); 399 400 /* Clients Carousel Init */ 401 if($('.clients_caro').length > 0) 402 clientsCarousel(); 403 404 /* Testimonials Carousel Init */ 405 if($('.testimonial_carousel').length > 0) 406 testimonialsCarousel(); 407 408 if( $('.left_testimonial_carousel').length > 0 ) 409 leftTestimonialsCarousel(); 410 411 /* Testimonial Cycle */ 412 if($('.testimonial_cycle').length > 0) 413 testimonialsCycle(); 414 415 codelessTabsactive(); 416 codelessLayoutChanges(); 417 418 codelessInitParallax(); 419 420 codelessGalleryCarouselInit(); 421 422 if( $(".he-wrap").length > 0 ){ 423 loadDependencies( specular_wpb_global.FRONT_LIB_JS, ['jquery.hoverex.js'], function(){ } ); 424 } 425 }); 426 427 428 429 $(window).resize(function(){ 430 codelessInitParallax(); 431 codelessLayoutChanges(); 432 testimonialsCycle(); 433 codelessPortfolioCarousel(); 434 }); 435 436 $(window).on( 'load', function(){ 437 codelessSectionStyle(); 438 codelessInitParallax(); 439 }); 440 441 442 function codelessSetIconList(){ 443 "use strict"; 444 var $ = jQuery.noConflict(); 445 if($('.list').length > 0){ 446 $('.list').each(function(){ 447 var icon = $(this).find('ul').data('icon'); 448 $('i', $(this)).each(function(){ 449 if( $(this).attr('class') == '' ) 450 $(this).addClass(icon); 451 }); 452 }); 453 } 454 } 455 456 457 /* Parallax Init */ 458 459 function codelessInitParallax(){ 460 var $ = jQuery.noConflict(); 461 if($('.section-style.parallax_section').length || $(".header_page:not('.no_parallax')").length){ 462 $(".section-style.parallax_section, .header_page:not('.no_parallax')").each(function(){ 463 var self = $(this); 464 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.parallax.js'], function(){ 465 self.parallax("50%", 0.4); 466 }) 467 }); 468 } 469 } 470 471 472 /*------------------------------ Sections ----------------------------- */ 473 function codelessSectionStyle(){ 474 "use strict"; 475 $('.section-style').each(function(){ 476 if($(this).prev().hasClass('section-style')){ 477 $(this).css('margin-top', '0px'); 478 $(this).prev().css('margin-bottom', '0px'); 479 } 480 481 if($(this).is(':last-child') && ( $(this).parent().hasClass('composer_content') || $(this).parent().hasClass('content_portfolio') )){ 482 $(this).parent().css('padding-bottom', '0px'); 483 } 484 if($(this).is(':first-child') && ( $(this).parent().hasClass('composer_content') || $(this).parent().hasClass('content_portfolio') ) ){ 485 var style = $(this).parent().attr('style'); 486 if(typeof style == "undefined") 487 style = ''; 488 $(this).parent().attr('style', style+'padding-top:0px !important'); 489 } 490 }); 491 492 $('.transparency_section').each(function(){ 493 var height = $(this).outerHeight(); 494 $(this).css('margin-top', '-'+height+'px'); 495 }); 496 497 498 499 if($window_width > 979){ 500 $('.full-width-content.section-style ').each(function(){ 501 var max_height = 0; 502 var full_width_section = $(this); 503 full_width_section.imagesLoaded(function(){ 504 if($('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).length > 1){ 505 $('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).each(function(){ 506 var this_ = $(this); 507 if(this_.innerHeight() > max_height) 508 max_height = this_.innerHeight(); 509 }); 510 $('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).innerHeight(max_height+'px'); 511 } 512 }); 513 514 515 }); 516 }else{ 517 $('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto'); 518 } 519 520 $('.section-style').each(function(){ 521 var self = $(this); 522 if(self.css('padding-bottom') == '0px'){ 523 var pad = $('.wpb_column', self).last().css('padding-bottom'); 524 if($window_width < 768){ 525 $('.wpb_column', self).last().css('padding-bottom', '40px'); 526 }else{ 527 $('.wpb_column', self).last().css('padding-bottom', pad); 528 } 529 } 530 }); 531 532 $(window).resize(function(){ 533 $window_width = $(this).width(); 534 $('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto'); 535 if($window_width > 979){ 536 $('.full-width-content.section-style ').each(function(){ 537 var max_height = 0; 538 var full_width_section = $(this); 539 if($('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).length > 1){ 540 $('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).each(function(){ 541 var this_ = $(this);
542 if(this_.innerHeight() > max_height) 543 max_height = this_.innerHeight(); 544 }); 545 $('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).innerHeight(max_height+'px'); 546 } 547 548 }); 549 }else{ 550 $('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto'); 551 } 552 553 $('.section-style').each(function(){ 554 var self = $(this); 555 if(self.css('padding-bottom') == '0px'){ 556 var pad = $('.wpb_column', self).last().css('padding-bottom'); 557 558 if($window_width < 768){ 559 $('.wpb_column', self).last().css('padding-bottom', '40px'); 560 }else{ 561 $('.wpb_column', self).last().css('padding-bottom', pad); 562 } 563 } 564 }); 565 566 }); 567 } 568 569 /*------------------------------ Fullwidth Google MAP ----------------------------- */ 570 571 function codelessFullwidthMap(){ 572 "use strict"; 573 var $ = jQuery.noConflict(); 574 if($('.googlemap.fullwidth_map').length > 0){ 575 $('.googlemap.fullwidth_map').each(function(){ 576 var $parent = $(this).parents('.row-dynamic-el').first(); 577 if($parent.next().hasClass('section-style')) 578 $parent.css('margin-bottom', '0px'); 579 }); 580 $('.row-google-map').each(function(){ 581 if($('.fullwidth_map', $(this)).length > 0){ 582 var $parent = $(this).parents('.row-dynamic-el').first(); 583 $parent.css('margin-top', '0px'); 584 } 585 586 }); 587 } 588 } 589 590 591 592 593 594 /*------------------------------ Accordion Toggle Binding ------------------------------ */ 595 596 function accordionBinding(){ 597 "use strict"; 598 var $ = jQuery.noConflict(); 599 $(".accordion-group .accordion-toggle").on('click', function(){ 600 var $self = $(this).parent().parent(); 601 if($self.find('.accordion-heading').hasClass('in_head')){ 602 $self.parent().find('.accordion-heading').removeClass('in_head'); 603 }else{ 604 $self.parent().find('.accordion-heading').removeClass('in_head'); 605 $self.find('.accordion-heading').addClass('in_head'); 606 } 607 }); 608 } 609 610 611 /*------------------------------ Blog Carousel ------------------------ */ 612 613 function codelessBlogCarousel(){ 614 "use strict"; 615 var $ = jQuery.noConflict(); 616 $(".carousel_blog").each(function(){ 617 var $self = $(this); 618 if( $('li img', $self).size() ) { 619 $('li img', $self).one("load", function(){ 620 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){ 621 $self.carouFredSel( { 622 circular: true, 623 infinite: true, 624 auto : false, 625 626 scroll : { 627 items : 1 628 }, 629 630 prev : { 631 button : $self.parents('.latest_blog').find('.prev') 632 }, 633 634 next : { 635 button : $self.parents('.latest_blog').find('.next') 636 } 637 638 }); 639 }); 640 }).each(function() { 641 if(this.complete) $(this).trigger("load"); 642 }); 643 }else{ 644 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){ 645 $self.carouFredSel( { 646 circular: true, 647 infinite: true, 648 auto : false, 649 650 scroll : { 651 items : 1 652 }, 653 654 prev : { 655 button : $self.parents('.latest_blog').find('.prev') 656 }, 657 658 next : { 659 button : $self.parents('.latest_blog').find('.next') 660 } 661 662 }); 663 }); 664 } 665 }); 666 } 667 668 669 /*------------------------------ Clients Carousel ------------------------ */ 670 671 function clientsCarousel(){ 672 "use strict"; 673 var $ = jQuery.noConflict(); 674 var $self = $('.clients_caro'); 675 if($self.length){ 676 $self.css('display', 'none'); 677 $self.imagesLoaded(function(){ 678 $self.css('display', 'block'); 679 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){ 680 $self.carouFredSel( 681 { 682 items:4, 683 auto: false, 684 scroll: { items : 1 }, 685 prev : { 686 button : $self.parents('.clients_el').first().find('.prev') 687 }, 688 689 next : { 690 button : $self.parents('.clients_el').first().find('.next') 691 } 692 }); 693 }); 694 }) 695 } 696 697 698 699 } 700 701 702 /*------------------------------ Testimonials Carousel ------------------------ */ 703
704 function testimonialsCarousel(){ 705 "use strict"; 706 var $ = jQuery.noConflict(); 707 $('.testimonial_carousel').each(function(){ 708 var $self = $(this); 709 var c_duration = $self.data('duration'); 710 if(c_duration == 'undefined') 711 c_duration = 500; 712 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){ 713 $self.carouFredSel({ 714 715 auto: true, 716 717 scroll: { items : 1, fx: 'fade', duration: c_duration }, 718 prev : { 719 button : $self.parent('.testimonial_carousel_element').find('.prev') 720 }, 721 722 next : { 723 button : $self.parent('.testimonial_carousel_element').find('.next') 724 } 725 726 }); 727 }); 728 729 730 var max_height = 0; 731 $('.item', $self).each(function(){ 732 if($(this).height() > max_height) 733 max_height = $(this).height() + 25; 734 }); 735 736 $('.item', $self).height(max_height+'px'); 737 738 739 740 741 }); 742 743 744 } 745 746 747 function leftTestimonialsCarousel(){ 748 "use strict"; 749 var $ = jQuery.noConflict(); 750 $('.left_testimonial_carousel').each(function(){ 751 var $self = $(this); 752 var c_duration = $self.data('duration'); 753 if(c_duration == 'undefined') 754 c_duration = 500; 755 756 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['owl.carousel.min.js'], function(){ 757 $self.imagesLoaded( function() { 758 var owl = $self.owlCarousel({ 759 items: 1, 760 dots: true 761 }); 762 763 }); 764 }); 765 766 }); 767 768 769 } 770 771 /* ---------------------------- Testimonial Cycle ----------------------------- */ 772 773 function testimonialsCycle(){ 774 "use strict"; 775 var $ = jQuery.noConflict(); 776 $('.testimonial_cycle').each(function(){ 777 var $self = $(this); 778 var container_width = $self.parents('.wpb_wrapper').first().width(); 779 $('.item', $self).width(container_width+'px'); 780 781 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){ 782 $self.carouFredSel({ 783 784 auto: true, 785 scroll: { items : 1, fx: 'fade' }, 786 787 }); 788 }); 789 790 }); 791 } 792 793 794 795 /*------------------------------ FAQ Isotope filter ------------------------ */ 796 797 function codelessFaqFilter(){ 798 "use strict"; 799 var $ = jQuery.noConflict(); 800 $('nav#faq-filter li a').on( 'click', function(e){ 801 e.preventDefault(); 802 803 var selector = $(this).attr('data-filter'); 804 805 $('.faq .accordion-group').fadeOut(); 806 $('.faq .accordion-group'+selector).fadeIn(); 807 808 $(this).parents('ul').find('li').removeClass('active'); 809 $(this).parent().addClass('active'); 810 }); 811 } 812 813 814 /*------------------------------ Staff Carousel ------------------------------ */ 815 816 function codelessStaffCarousel(){ 817 "use strict"; 818 var $ = jQuery.noConflict(); 819 if($('.staff_slider').length > 0){ 820 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['swiper.min.js'], function(){ 821 $('.staff_slider').parents('.span_12').first().css('display', 'block'); 822 823 var slide_per_view = $('.staff_slider').data('slidenr'); 824 825 826 if ($window_width >= 979 && $window_width < 1100 ){ 827 slide_per_view = 3; 828 }else if ($window_width >= 421 && $window_width < 768 ){ 829 slide_per_view = 2; 830 }else if ($window_width <= 420){ 831 slide_per_view = 1; 832 }else if ($window_width >= 768 && $window_width < 979 ){ 833 slide_per_view = 2; 834 }else if($window_width > 1100){ 835 slide_per_view = $('.staff_slider').data('slidenr'); 836 } 837 838 839 var staff_slider = new Swiper('.staff_slider',{ 840 slidesPerView: slide_per_view, 841 paginationAsRange: false, 842 }); 843 var $pag_wrapper = $('.staff_carousel').parents('.vc_row').first().prev(); 844 if($('.staff_carousel').length > 0){ 845 if($('.staff_carousel .swiper_pagination').length > 0){ 846 $pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.staff_carousel .swiper_pagination').html() + '</div>' ); 847 $('.staff_carousel .swiper_pagination').remove(); 848 } 849 850 851 var height = $('.staff_carousel .single_staff').height(); 852 $('.staff_carousel .swiper-wrapper').css({height: height+'px'}); 853 } 854 855 if($pag_wrapper.find('.swiper_pagination').length > 0){ 856 $('.swiper_pagination .next', $pag_wrapper ).on('click', function(e){ 857 e.preventDefault(); 858 staff_slider.slideNext(); 859 }); 860 861 $('.swiper_pagination .prev', $pag_wrapper).on('click', function(e){ 862 e.preventDefault(); 863 staff_slider.slidePrev(); 864 }); 865 } 866 867 $(window).resize(function(){ 868 $window_width = $(window).width(); 869 if ($window_width >= 979 && $window_width < 1100 ){ 870 slide_per_view = 3; 871 }else if ($window_width >= 421 && $window_width < 768 ){
872 slide_per_view = 2; 873 }else if ($window_width <= 420){ 874 slide_per_view = 1; 875 }else if ($window_width >= 768 && $window_width < 979 ){ 876 slide_per_view = 2; 877 }else if($window_width > 1100){ 878 slide_per_view = $('.staff_slider').data('slidenr'); 879 } 880 881 var staff_slider = new Swiper('.staff_slider',{ 882 slidesPerView: slide_per_view, 883 paginationAsRange: false, 884 }); 885 var height = $('.staff_carousel .single_staff').height(); 886 $('.staff_carousel .swiper-wrapper').css({height: height+'px'}); 887 }); 888 }); 889 } 890 } 891 892 893 /*------------------------------ Portfolio Carousel ------------------------------ */ 894 895 function codelessPortfolioCarousel(){ 896 "use strict"; 897 var $ = jQuery.noConflict(); 898 if($('.portfolio_slider').length > 0){ 899 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['swiper.min.js'], function(){ 900 var slide_per_view = $('.portfolio_slider').data('slidenr'); 901 902 if ($(".container").css("max-width") == "940px" ){ 903 slide_per_view = 4; 904 }else if ($(".container").css("max-width") == "420px" ){ 905 slide_per_view = 1; 906 }else if ($(".container").css("width") == "724px" ){ 907 slide_per_view = 2; 908 }else if ($(".container").css("max-width") == "300px" ){ 909 slide_per_view = 1; 910 } 911 912 913 var portfolio_slider = new Swiper('.portfolio_slider',{ 914 slidesPerView: slide_per_view, 915 paginationAsRange: false, 916 }); 917 var $pag_wrapper = $('.recent_portfolio').parents('.vc_row').first().prev(); 918 if($('.portfolio_slider').length > 0){ 919 $pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.recent_portfolio .swiper_pagination').html() + '</div>' ); 920 921 setTimeout(function(){ 922 $('.recent_portfolio .swiper_pagination').remove(); 923 }, 30) 924 925 926 927 if( $('.recent_portfolio .portfolio-item img').size() ) { 928 929 930 $('.recent_portfolio .portfolio-item img').one("load", function(){ 931 932 var height = $(this).height(); 933 $('.portfolio_slider .swiper-wrapper').css({height: height+'px'}); 934 portfolio_slider.update(); 935 936 }); 937 } 938 939 940 941 } 942 943 944 $('.swiper_pagination .next', $pag_wrapper ).on('click', function(e){ 945 e.preventDefault(); 946 portfolio_slider.slideNext(); 947 }); 948 949 $('.swiper_pagination .prev', $pag_wrapper).on('click', function(e){ 950 e.preventDefault(); 951 portfolio_slider.slidePrev(); 952 }); 953 954 if($(".container").css("max-width") == "420px" ) { 955 portfolio_slider.update(); 956 957 } 958 959 }); 960 } 961 } 962 963 964 /*------------------------------ Portfolio Carousel ------------------------------ */ 965 966 function codelessLatestBlogCarousel(){ 967 "use strict"; 968 var $ = jQuery.noConflict(); 969 if($('.blog_slider').length > 0){ 970 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['swiper.min.js'], function(){ 971 var slide_per_view = $('.blog_slider').data('slidenr'); 972 973 if ($(".container").css("max-width") == "940px" ){ 974 slide_per_view = 4; 975 }else if ($(".container").css("max-width") == "420px" ){ 976 slide_per_view = 1; 977 }else if ($(".container").css("width") == "724px" ){ 978 slide_per_view = 2; 979 }else if ($(".container").css("max-width") == "300px" ){ 980 slide_per_view = 1; 981 } 982 983 var blog_slider = new Swiper('.blog_slider',{ 984 slidesPerView: slide_per_view, 985 paginationAsRange: false, 986 }); 987 var $pag_wrapper = $('.latest_blog').parents('.vc_row').first().prev(); 988 if($('.blog_slider').length > 0){ 989 $pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.latest_blog .swiper_pagination').html() + '</div>' ); 990 $('.latest_blog .swiper_pagination').remove(); 991 } 992 993 994 $('.swiper_pagination .next', $pag_wrapper ).on('click', function(e){ 995 e.preventDefault(); 996 portfolio_slider.slideNext(); 997 }); 998 999 $('.swiper_pagination .prev', $pag_wrapper).on('click', function(e){ 1000 e.preventDefault(); 1001 portfolio_slider.slidePrev(); 1002 }); 1003 }); 1004 1005 } 1006 } 1007 1008 /* ----------------------------- Tabs ------------------------------------ */ 1009 1010 function codelessTabsactive(){ 1011 "use strict"; 1012 var $ = jQuery.noConflict(); 1013 if($('.tabbable').length > 0){ 1014 $('.tabbable').each(function(){ 1015 var id = $(this).find('.nav-tabs li.active a').attr('href'); 1016 $(this).find(id).addClass('active'); 1017 }); 1018 } 1019 } 1020 1021 1022 /* ----------------------------- Layout Changes -------------------------- */ 1023 1024 function codelessLayoutChanges(){ 1025 "use strict"; 1026 var $ = jQuery.noConflict(); 1027 var container = $('.container').width(); 1028 $('.testimonial_carousel .item').each(function(){ 1029 1030 var self = $(this); 1031 var vc_column = self.parents('.wpb_column').first().width(); 1032 self.innerWidth(vc_column+'px'); 1033 self.height(self.height()+'px'); 1034 self.parents('.caroufredsel_wrapper').first().height(self.height()+'px'); 1035 self.parents('.testimonial_carousel').first().height(self.height()+'px'); 1036 1037 }); 1038 1039 $('.clients_caro .item').each(function(){ 1040 var self = $(this); 1041 var vc_column = self.parents('.wpb_column').first().width(); 1042 if(container > 420 && container <= 724) 1043 self.innerWidth( (vc_column/3)+'px'); 1044 if(container > 724 && container < 940) 1045 self.innerWidth( (vc_column/4)+'px'); 1046 if(container > 940) 1047 self.innerWidth( (vc_column/5)+'px'); 1048 }); 1049 1050 clientsCarousel(); 1051 } 1052 1053 /*------------------------------ Codeless Slider ------------------------------ */ 1054 1055 1056 1057 1058/* ----------------------------- Codeless gallery carousel --------------- */ 1059
1060function codelessGalleryCarouselInit(){ 1061 "use strict"; 1062 var $ = jQuery.noConflict(); 1063 var gallery = $('.codeless_gallery_carousel'); 1064 1065 var slider = gallery.find('.codeless_swiper_gallery'); 1066 1067 if(gallery.length > 0){ 1068 loadDependencies(specular_wpb_global.FRONT_LIB_JS, ['swiper.min.js'], function(){ 1069 var height = gallery.data('height'); 1070 1071 if(height == 'fullscreen') 1072 height = $(window).height(); 1073 1074 var $loading = $('.loading', gallery); 1075 1076 gallery.height(height+'px'); 1077 slider.height(height+'px'); 1078 1079 var centeredSlides = false; 1080 var slidesPerView = 'auto'; 1081 1082 if( gallery.hasClass('opacity') ){ 1083 centeredSlides = true; 1084 slidesPerView = 'auto'; 1085 } 1086 1087 1088 1089 codelessSlider = new Swiper('.codeless_swiper_gallery',{ 1090 slidesPerView:slidesPerView, 1091 //paginationAsRange: false, 1092 loop: true, 1093 touchRatio: 0.7, 1094 autoplay: 5000, 1095 centeredSlides: centeredSlides, 1096 speed: 800, 1097 preloadImages:true, 1098 updateOnImagesReady:true, 1099 1100 breakpoints:{ 1101 767:{ 1102 loop:true, 1103 slidesPerView:1, 1104 centeredSlides:false, 1105 autoHeight:true 1106 } 1107 }, 1108 navigation: { 1109 nextEl: '.next', 1110 prevEl: '.prev', 1111 }, 1112 on:{ 1113 init:function(){ 1114 $loading.css('display', 'none'); 1115 slider.css('opacity', 1); 1116 } 1117 } 1118 1119 }); 1120 1121 1122 1123 1124 1125 1126 if($('.swiper-slide', slider).length == 1) 1127 $('.nav-slider', gallery).hide(); 1128 1129 $(window).resize(function(){ 1130 1131 if($('body').hasClass('header_7') && $(window).width() > 970 ){ 1132 var pad = $('.header_wrapper').innerWidth(); 1133 var pos = 'left' 1134 if($('.pos--right').length > 0) 1135 pos = 'right' 1136 $('.codeless_slider_wrapper', gallery).css('padding-'+pos, pad+'px'); 1137 $('.codeless_slider_wrapper', gallery).width( $('#slider-fullwidth').width() +'px' ); 1138 }else{ 1139 var pos = 'left' 1140 if($('.pos--right').length > 0) 1141 pos = 'right' 1142 $('.codeless_slider_wrapper', gallery).css('padding-'+pos, 0+'px'); 1143 $('.codeless_slider_wrapper', gallery).width( $('#slider-fullwidth').width() +'px' ); 1144 1145 } 1146 1147 }); 1148 1149 }); 1150 1151 } 1152} 1153 1154/* ----------------------------- End Codeless gallery carousel ----------- */ 1155 1156 1157 1158})( 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.