(function($) { 'use strict'; var portfolioCube = function() { if ( $().cubeportfolio ) { $('.bauer-project-grid').each(function() { var $this = $(this), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), item4 = $this.data("column4"), gapH = Number($this.data("gaph")), gapV = Number($this.data("gapv")), filter = $this.data("filter"), layout = $this.data("layout"); if ( !filter ) { filter = '*'; } else { filter = '.' + filter; } $this.find('#portfolio').cubeportfolio({ filters: '#project-filter', layoutMode: layout, defaultFilter: filter, animationType: 'quicksand', gapHorizontal: gapH, gapVertical: gapV, showNavigation: true, showPagination: true, gridAdjustment: 'responsive', rewindNav: false, auto: false, mediaQueries: [{ width: 1500, cols: item }, { width: 1100, cols: item }, { width: 800, cols: item2 }, { width: 550, cols: item3 }, { width: 320, cols: item4 }], caption: 'overlayBottomAlong', displayType: 'bottomToTop', displayTypeSpeed: 100 }); }); } }; var imagesCube = function() { $('.bauer-images-grid').each(function() { var $this = $(this), layout = $this.data("layout"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), item4 = $this.data("column4"), layout = $this.data("layout"), gapH = Number($this.data("gaph")), gapV = Number($this.data("gapv")); $this.find('#images-wrap').cubeportfolio({ layoutMode: layout, defaultFilter: '*', animationType: 'quicksand', gapHorizontal: gapH, gapVertical: gapV, showNavigation: true, showPagination: false, gridAdjustment: 'responsive', rewindNav: false, auto: true, mediaQueries: [{ width: 1500, cols: item }, { width: 1100, cols: item }, { width: 800, cols: item2 }, { width: 550, cols: item3 }, { width: 320, cols: item4 }], caption: ' ', displayType: 'bottomToTop', displayTypeSpeed: 100 }); }); }; var projectRelatedOwl = function() { if ( $().owlCarousel ) { $('.project-related').each(function(){ var $this = $(this), gap = Number($this.data("gap")), column = $this.data("column"); $this.find('.owl-carousel').owlCarousel({ loop: false, margin: gap, nav: true, navigation : true, pagination: true, autoplay: false, autoplayTimeout: 5000, responsive: { 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:column } } }); }); } }; var carouselBoxOwl = function() { if ( $().owlCarousel ) { $('.bauer-carousel-box').each(function(){ var $this = $(this), auto = $this.data("auto"), loop = $this.data("loop"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: loop, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var imagesCarouselOwl = function() { if ( $().owlCarousel ) { $('.bauer-images-carousel').each(function(){ var $this = $(this), auto = $this.data("auto"), loop = $this.data("loop"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: loop, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var portfolioOwl = function() { if ( $().owlCarousel ) { $('.bauer-project').each(function(){ var $this = $(this), auto = $this.data("auto"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: false, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var newsOwl = function() { if ( $().owlCarousel ) { $('.bauer-news').each(function(){ var $this = $(this), auto = $this.data("auto"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: false, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var teamOwl = function() { if ( $().owlCarousel ) { $('.bauer-team').each(function(){ var $this = $(this), auto = $this.data("auto"), loop = $this.data("loop"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: loop, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var partnerOwl = function() { if ( $().owlCarousel ) { $('.bauer-partner').each(function(){ var $this = $(this), auto = $this.data("auto"), loop = $this.data("loop"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: loop, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var wooOwl = function() { if ( $().owlCarousel ) { $('.bauer-products').each(function(){ var $this = $(this), auto = $this.data("auto"), item = $this.data("column"), item2 = $this.data("column2"), item3 = $this.data("column3"), gap = Number($this.data("gap")); $this.find('.owl-carousel').owlCarousel({ loop: false, margin: gap, nav: true, navigation : true, pagination: true, autoplay: auto, autoplayTimeout: 5000, responsive: { 0:{ items:item3 }, 600:{ items:item2 }, 1000:{ items:item } } }); }); } }; var accordions = function() { $('.bauer-accordions').each(function() { var args = {easing:'easeOutExpo', duration:300}; $(this).find('.accordion-content').hide() .parent().filter('.active') .find('.accordion-content').show(); if ( $(this).is('.toggles') ) { $(this).find('.accordion-heading').on('click', function () { if ( !$(this).parent().is('.active') ) { $(this).parent().toggleClass('active') .children('.accordion-content').slideDown(args); } else { $(this).parent().removeClass('active') .children('.accordion-content').slideUp(args); } }); } else if ( $(this).is('.accordions') ) { $(this).find('.accordion-heading').on('click', function () { if ( !$(this).parent().is('.active') ) { $(this).parent().toggleClass('active') .children('.accordion-content').slideToggle(args) .parent().siblings('.active').removeClass('active') .children('.accordion-content').slideToggle(args); } else { $(this).parent().toggleClass('active'); $(this).next().slideToggle(args); } }); } }); }; var popupImages = function() { if ( $().magnificPopup ) { $('.popup-image').magnificPopup({ disableOn: 700, type: 'image', gallery:{ enabled: true }, mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: true }); }; }; var popupVideo = function() { if ( $().magnificPopup ) { $('.popup-video').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: true }); }; }; var spacer = function() { $(window).on('load resize', function() { var mode = 'desktop'; if ( matchMedia( 'only screen and (max-width: 991px)' ).matches ) mode = 'mobile'; if ( matchMedia( 'only screen and (max-width: 767px)' ).matches ) mode = 'smobile'; $('.bauer-spacer').each(function(){ if ( mode == 'desktop' ) { $(this).attr('style', 'height:' + $(this).data('desktop') + 'px') } else if ( mode == 'mobile' ) { $(this).attr('style', 'height:' + $(this).data('mobi') + 'px') } else { $(this).attr('style', 'height:' + $(this).data('smobi') + 'px') } }) }); }; var counter = function(){ function bauerInview(ele) { var window_top = $(window).scrollTop(), offset_top = $(ele).offset().top; if ( $(ele).length > 0 ) { if ( offset_top + $(ele).height() - 100 >= window_top && offset_top <= ( window_top + 0.85 * $(window).height() ) ) { return true; } else { return false; } } } function run_animations() { var did_scroll = false; $(window).on('scroll', function(){ did_scroll = true; }); setInterval(function () { if (did_scroll) { did_scroll = false; $('.bauer-counter').each(function() { var $this = $(this); if ( bauerInview($this) && !$this.data('complete') ) { $this.data('complete',true); var delay = parseInt($this.data('delay')); setTimeout(function(){ $this.find('.number').countTo(); }, delay ); } }); } }, 200); } run_animations(); }; var progressBar = function() { if ( $().appear ) { var $section = $('.bauer-progress').appear(function() { function runBars() { var bar = $('.progress-animate'); var bar_width = $(this); $(function(){ $(bar).each(function(){ bar_width = $(this).attr('data-valuenow'); $(this).width(bar_width + '%'); $(this).parents('.bauer-progress').find('.perc').addClass('show').width(bar_width + '%'); }); }); } runBars(); }); } }; var elmentHover = function() { $(".bauer-image-video .icon").hover(function(){ $(this).css({ "color": $(this).data('chover'), "background-color": $(this).data('ghover'), "border-color": $(this).data('bhover'), "transition": "all 0.3s" }); },function(){ $(this).css({ "color": $(this).data('c'), "background-color": $(this).data('g'), "border-color": $(this).data('b'), }); }); }; var resizeHeading = function() { $(window).on('load resize', function() { $('.bauer-sheading, .bauer-headings').each(function() { var $this = $(this), font = $this.data("font"), fontMobi = $this.data("mfont"); if ( fontMobi ) { if ( $(window).width() < 960 ) { $this.find('.heading').css('font-size', fontMobi + 'px'); } else { $this.find('.heading').css('font-size', font + 'px'); } } }); }); }; var hereSection = function() { $(window).on('load resize', function(){ var adminBarHeight = 0, topBarHeight = 0, contentTopMargin = 0, heroHeight = 0, customHeight = 0, adminBar = $('#wpadminbar'), topBar = $('#top-bar'), hero = $('.hero-section'), windowHeight = $(window).height(), headerHeight = $('#site-header').height(), heroContent = hero.find('.hero-content'), contentHeight = heroContent.height(), spacing = hero.data('content'); customHeight = hero.data('height'); if (topBar.length) topBarHeight = topBar.height(); if (adminBar.length) adminBarHeight = adminBar.height(); heroHeight = windowHeight; if ( customHeight ) heroHeight = customHeight; if ( $('body').hasClass('header-style-4') ) { hero.css({ height: (heroHeight - adminBarHeight) + "px" }); contentTopMargin = ((heroHeight - contentHeight) / 2) + topBarHeight + spacing; heroContent.css("padding-top", (contentTopMargin) + "px"); } else { if ( ! customHeight ) heroHeight = heroHeight - headerHeight - topBarHeight - adminBarHeight; hero.css({ height: heroHeight + "px" }); contentTopMargin = ((heroHeight - contentHeight) / 2) + spacing; heroContent.css("padding-top", (contentTopMargin) + "px"); } }) if ( $().vegas ) { $(".hero-section.slideshow").each(function() { var $this = $(this), count = $this.data('count'), count = parseInt(count,10), effect = $this.data('effect'), images = $this.data('image'), cOverlay = $this.data('overlay'), pOverlay = $this.data('poverlay'), i = 0, slides = [], imgs = images.split('|'); while ( i < count ) { slides.push( {src:imgs[i]} ); i++; } $this.vegas({ slides: slides, overlay: true, transition: effect }); var overlay = $('
', { class: 'overlay', style: 'background:' + cOverlay }); $(this).append(overlay) .find('.vegas-overlay') .addClass(pOverlay); }); } $('.scroll-target, .scroll-btn').on('click',function() { var anchor = $(this).attr('href').split('#')[1]; if ( anchor ) { if ( $('#'+anchor).length > 0 ) { var headerHeight = 0; if ( $('body').hasClass('header-fixed') ) headerHeight = $('#site-header').height(); var target = $('#' + anchor).offset().top - headerHeight; $('html,body').animate({scrollTop: target}, 1000, 'easeInOutExpo'); } } return false; }) if ( $('.bauer-fancy-text').is('.scroll') ) { $('.bauer-fancy-text.scroll').each(function() { var $this = $(this), current = 1, height = $this.height(), numberDivs = $this.children().length, first = $this.children('.heading:nth-child(1)'); setInterval(function() { var number = current * -height; first.css('margin-top', number + 'px'); if ( current === numberDivs ) { first.css('margin-top', '0px'); current = 1; } else current++; }, 2500); }); } if ( $('.bauer-fancy-text').is('.typed') ) { if ( $().typed ) { $('.bauer-fancy-text.typed').each(function() { var $this = $(this), texts = $this.data('fancy').split(','); $this.find('.text').typed({ strings: texts, typeSpeed: 30, loop: true, backDelay: 4000 }); }); } } }; var fitText = function() { if ( $().fitText ) { $('.bauer-fancy-text').each(function(){ var min = $(this).data("min"); var max = $(this).data("max"); $(this).children('.heading').fitText(1.8, { minFontSize: min, maxFontSize: max }); }); } }; var bgVideo = function() { if ( $().YTPlayer ) { $(".hero-section.video").each(function() { var $this = $(this), cOverlay = $this.data('overlay'), overlay = $('', { class: 'overlay', style: 'background:' + cOverlay }); $this.YTPlayer().append(overlay); }); } }; var tabs = function() { $('.bauer-tabs').each(function(){ var list ="", title = $(this).find('.item-title').remove(), titleWrap = $(this).children('.tab-title') ; title.each(function() { list = list + "