( function( $ ) { 'use strict'; /* ----------------------------------------- Responsive Menus Init with mmenu ----------------------------------------- */ var $mainNav = $( '.navigation' ); var $mobileNav = $( '#mobilemenu' ); $mainNav.clone().removeAttr( 'id' ).removeClass().appendTo( $mobileNav ); $mobileNav.find( 'li' ).removeAttr( 'id' ); $mobileNav.mmenu({ offCanvas: { position: 'top', zposition: 'front' } }); /* ----------------------------------------- Main Navigation Init ----------------------------------------- */ $mainNav.superfish({ delay: 300, animation: { opacity: 'show', height: 'show' }, speed: 'fast', dropShadows: false }); /* ----------------------------------------- Responsive Videos with fitVids ----------------------------------------- */ $( 'body' ).fitVids(); /* ----------------------------------------- Bottom Widget Content Wrapping ----------------------------------------- */ $( '.bottom-widget-area' ).find( '.widget').each( function() { var h3 = $(this).find('h3'); var h3html = $(this).find('h3').html(); if ( h3html !== null ) { h3.nextAll().wrapAll('
'); } else { $(this).wrapInner('
'); } }); /* ----------------------------------------- Lightbox ----------------------------------------- */ $( '.lightbox' ).fancybox(); /* ----------------------------------------- Testimonial Slider ----------------------------------------- */ var testimonialSlider = $( '.testimonial-slider' ); if ( testimonialSlider.length ) { testimonialSlider.flexslider({ namespace: 'ci-', directionNav: false, controlNav: false }); } $( window ).on( 'load', function() { /* ----------------------------------------- Flexslider Init ----------------------------------------- */ var homeSlider = $( '.home-slider' ); var productSlider = $( '.product-slider' ); if ( homeSlider.length ) { var animation = homeSlider.data( 'animation' ), direction = homeSlider.data( 'direction' ), slideshow = homeSlider.data( 'slideshow' ), slideshowSpeed = homeSlider.data( 'slideshowspeed' ), animationSpeed = homeSlider.data( 'animationspeed' ); homeSlider.flexslider({ animation : animation, direction : direction, slideshow : slideshow, slideshowSpeed: slideshowSpeed, animationSpeed: animationSpeed, namespace: 'ci-', prevText: '', nextText: '', directionNav: false, start: function( slider ) { slider.removeClass( 'loading' ); } }); } if ( productSlider.length ) { var p_animation = productSlider.data( 'animation' ), p_direction = productSlider.data( 'direction' ), p_slideshow = productSlider.data( 'slideshow' ), p_slideshowSpeed = productSlider.data( 'slideshowspeed' ), p_animationSpeed = productSlider.data( 'animationspeed' ); productSlider.flexslider({ animation : p_animation, direction : p_direction, slideshow : p_slideshow, slideshowSpeed: p_slideshowSpeed, animationSpeed: p_animationSpeed, namespace: 'ci-', prevText: '', nextText: '', controlNav: false, start: function( slider ) { slider.removeClass( 'loading' ); } }); } }); })( jQuery );