//tooltips jQuery(document).ready(function($){ Tipped.create('.tooltip-mini',{ size: 'x-small' }); Tipped.create('.tooltip-small',{ size: 'small' }); Tipped.create('.tooltip'); Tipped.create('.tooltip-large',{ size: 'large' }); }); //menu anti nabrak //menuresponsive jQuery(document).ready(function($){ var html = $('.nav-wrap'), navContainer = $('.nav-container'), navToggle = $('.nav-toggle'), navDropdownToggle = $('.menu-item-has-children'); // Nav toggle navToggle.on('click', function(e) { var $this = $(this); e.preventDefault(); $this.toggleClass('is-active'); navContainer.toggleClass('is-visible'); html.toggleClass('nav-open'); }); // Nav dropdown toggle navDropdownToggle.on('click', function() { var $this = $(this); $this.toggleClass('is-active').children('ul').toggleClass('is-visible'); }); // Prevent click events from firing on children of navDropdownToggle navDropdownToggle.on('click', '*', function(e) { e.stopPropagation(); }); }); //lightbox jQuery(document).ready(function($){ $('.gallery').featherlightGallery({ previousIcon: '', nextIcon: '', closeIcon: '', }); }); //footer jQuery(document).ready(function($){ var docHeight = $(window).height(); var footerHeight = $('.site-footer').height(); var footerTop = $('.site-footer').position().top + footerHeight; if (footerTop < docHeight) { $('.site-footer').css('margin-top', 42+ (docHeight - footerTop) + 'px'); } }); //paralax jQuery(document).ready(function($){ $('.parallax .fl-row-content-wrap').parallax("0%", -0.3); }); //partikel jQuery(document).ready(function($){ $('.partikel').particleground({ minSpeedX: 0.1, maxSpeedX: 0.7, minSpeedY: 0.1, maxSpeedY: 0.7, directionX: 'center', // 'center', 'left' or 'right'. 'center' = dots bounce off edges directionY: 'center', // 'center', 'up' or 'down'. 'center' = dots bounce off edges density: 10000, // How many particles will be generated: one particle every n pixels dotColor: '#53B9A6', lineColor: '#53B9A6', particleRadius: 7, // Dot size lineWidth: 1, curvedLines: false, proximity: 100, // How close two dots need to be before they join parallax: true, parallaxMultiplier: 5, // The lower the number, the more extreme the parallax effect onInit: function() {}, onDestroy: function() {} }); }); //slider owl jQuery(document).ready(function($){ $('.akslide').owlCarousel({ animateOut: 'slideOutDown', animateIn: 'flipInX', items:1, margin:30, autoplay:true, stagePadding:30, smartSpeed:450 }); }); jQuery(document).ready(function($){ $('.arch-slide').owlCarousel({ items:1, autoplay:true, margin:30, stagePadding:30, smartSpeed:450, nav: false, }); }); jQuery(document).ready(function ($) { var $sync1 = $(".ak-slidepost .ak-frame-post-block"), $sync2 = $(".ak-slidepost .ak-navslide"), flag = false, duration = 300; $sync1 .owlCarousel({ items: 1, margin: 0, nav: false, autoplay:true, autoHeight: true, dots: false }) .on('changed.owl.carousel', function (e) { if (!flag) { flag = true; $sync2.trigger('to.owl.carousel', [e.item.index, duration, true]); flag = false; } }); $sync2 .owlCarousel({ items: 5, margin: 0, nav: false, autoplay:true, center: false, dots: false, }) .on('click', '.owl-item', function () { $sync1.trigger('to.owl.carousel', [$(this).index(), duration, true]); }) .on('changed.owl.carousel', function (e) { if (!flag) { flag = true; $sync1.trigger('to.owl.carousel', [e.item.index, duration, true]); flag = false; } }); }); //force excerpt jQuery(document).ready(function ($) { (function(glob, $, undefined) { $.excerpt = function($el, limit, more) { if($el.length == 0) return; more = more || '..'; limit = limit || null; if(limit == null) { console.info('No limit given in $.excerpt'); } $el.each(function() { var $self = $(this), len; if((len = $self.text().length) > limit) { $self.text($self.text().substring(0, limit) + more); } }); }; })(window, jQuery); // EXAMPLE CODE FOR PARAGRAPHS $.excerpt($('.ak-box-content'), 120, '..'); }); // Scroll to Top jQuery(document).ready(function ($) { $(function() { $(window).scroll(function() { if($(this).scrollTop()>100) { $('#ScrollToTop').fadeIn() } else { $('#ScrollToTop').fadeOut(); } }); $('#ScrollToTop').click(function(){ $('html,body').animate({scrollTop:0},1000); return false }) }); });