; (function ($) { 'use strict' var hereSection = function () { $(window).on('load resize', function () { var adminBarHeight = 0, topBarHeight = 0, contentTopMargin = 0, heroHeight = 0, hero = $('.hero-section'), windowHeight = $(window).height(), headerHeight = $('#site-header-wrap').outerHeight(), heroContent = hero.find('.hero-content'), contentHeight = heroContent.outerHeight(); heroHeight = hero.data('height'); if ($('body').hasClass('header-style-2')) { headerHeight = 0; topBarHeight = 0; } if (heroHeight != 'full') { heroHeight = parseInt(heroHeight, 10); } else { heroHeight = windowHeight - headerHeight; } hero.css({ height: heroHeight + "px" }); contentTopMargin = (heroHeight - contentHeight) / 2; heroContent.css("margin-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, walk: (window.vegas_walk || function () { }) }); // var overlay = $('
', { // class: 'overlay', // style: 'background:' + cOverlay // }); // $(this).append(overlay) // .find('.vegas-overlay') // .addClass(pOverlay); }); } if ($().textrotator) { $(".wprt-fancy-text.rotate").each(function () { var $this = $(this), $animation = $this.attr('data-animation'), $speed = parseInt($this.attr('data-speed'), 10); $this.find('.rotates').textrotator({ animation: 'fade', speed: 1200 }).css('opacity', 1); }); } if ($('.wprt-fancy-text').is('.scroll')) { $('.wprt-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 ($('.wprt-fancy-text').is('.typed')) { if ($().typed) { $('.wprt-fancy-text.typed').each(function () { var $this = $(this), texts = $this.data('fancy').split(','); $this.find('.text').typed({ strings: texts, typeSpeed: 40, loop: true, backDelay: 2000 }); }); } } if ($().fitText) { $('.wprt-fancy-text.scroll').each(function () { var min = $(this).data("min"); var max = $(this).data("max"); $(this).children('.heading').fitText(1.8, { minFontSize: min, maxFontSize: max }); }); } }; var galleriesCube = function () { if ($().cubeportfolio) { $('.wprt-gallery-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"); if (!filter) { filter = '*'; } else { filter = '.' + filter; } $(this).find('#galleries').cubeportfolio({ filters: '#gallery-filter', layoutMode: 'grid', 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: ' ', displayType: 'bottomToTop', displayTypeSpeed: 100 }); }); } }; var imagesCube = function () { $('.wprt-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: 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: ' ', displayType: 'bottomToTop', displayTypeSpeed: 100 }); }); }; var thumbSlider = function () { $('.wprt-thumb-slider').each(function () { var itemW = $(this).data("width"), itemM = $(this).data("margin"); $(this).children('#wprt-carousel').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, itemWidth: itemW, itemMargin: itemM, asNavFor: $(this).children('#wprt-slider'), prevText: '', nextText: '' }); $(this).children('#wprt-slider').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, sync: $(this).children('#wprt-carousel'), prevText: '', nextText: '' }); }); }; var carouselBoxOwl = function () { if ($().owlCarousel) { $('.wprt-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 galleryOwl = function () { if ($().owlCarousel) { $('.wprt-gallery').each(function () { var $this = $(this), loop = $this.data("loop"), 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: loop, 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) { $('.wprt-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) { $('.wprt-team').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 partnerOwl = function () { if ($().owlCarousel) { $('.wprt-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 progressBar = function () { if ($().waypoint) { $('.progress-bg').on('on-appear', function () { $(this).each(function () { var percent = parseInt($(this).data('percent')); $(this).find('.progress-animate').animate({ "width": percent + '%' }, 1000, "easeInCirc"); $(this).parent('.wprt-progress').find('.perc').addClass('show').animate({ "width": percent + '%' }, 1000, "easeInCirc"); }); }); } }; var accordions = function () { var args = { easing: 'easeOutExpo', duration: 300 }; $('.accordion-item.active').find('.accordion-content').show(); $('.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 counter = function () { if ($().countTo) { $('.wprt-counter').on('on-appear', function () { $(this).find('.number').each(function () { var to = $(this).data('to'), speed = $(this).data('speed'); $(this).countTo({ to: to, speed: speed }); }); }); } }; var tabs = function () { $('.wprt-tabs').each(function () { var list = "", title = $(this).find('.item-title'), titleWrap = $(this).children('.tab-title'); title.each(function () { list = list + "