
// slider
jQuery(document).ready(function() {
    return;// disable
  jQuery('.tp-banner').show().revolution({
    dottedOverlay: "none",
    delay: 16000,
    startwidth: 1170,
    startheight: 540,
    hideThumbs: 200,
    thumbWidth: 100,
    thumbHeight: 50,
    thumbAmount: 5,
    navigationType: "bullet",
    navigationArrows: "solo",
    navigationStyle: "preview1",
    touchenabled: "on",
    onHoverStop: "on",
    swipe_velocity: 0.7,
    swipe_min_touches: 1,
    swipe_max_touches: 1,
    drag_block_vertical: false,
    parallax: "mouse",
    parallaxBgFreeze: "on",
    parallaxLevels: [7, 4, 3, 2, 5, 4, 3, 2, 1, 0],
    keyboardNavigation: "off",
    navigationHAlign: "center",
    navigationVAlign: "bottom",
    navigationHOffset: 0,
    navigationVOffset: 20,
    soloArrowLeftHalign: "left",
    soloArrowLeftValign: "center",
    soloArrowLeftHOffset: 20,
    soloArrowLeftVOffset: 0,
    soloArrowRightHalign: "right",
    soloArrowRightValign: "center",
    soloArrowRightHOffset: 20,
    soloArrowRightVOffset: 0,
    shadow: 0,
    fullWidth: "on",
    fullScreen: "off",
    spinner: "spinner2",
    stopLoop: "off",
    stopAfterLoops: -1,
    stopAtSlide: -1,
    shuffle: "off",
    autoHeight: "off",
    forceFullWidth: "off",
    hideThumbsOnMobile: "off",
    hideNavDelayOnMobile: 1500,
    hideBulletsOnMobile: "off",
    hideArrowsOnMobile: "off",
    hideThumbsUnderResolution: 0,
    hideSliderAtLimit: 0,
    hideCaptionAtLimit: 0,
    hideAllCaptionAtLilmit: 0,
    startWithSlide: 0,
    videoJsPath: "rs-plugin/videojs/",
    fullScreenOffsetContainer: ""
  });
}); 

// Page Loader
jQuery(window).load(function() {
  "use strict";
  jQuery('#loader').fadeOut();
});

jQuery(document).ready(function(jQuery) {
  "use strict";
  ////	Hidder Header
  var headerEle = function() {
    var jQueryheaderHeight = jQuery('header').height();
    jQuery('.hidden-header').css({
      'height': parseInt( jQueryheaderHeight ) + "px"
    });
	 jQuery('#container').find( 'header' ).eq(0).css({
		 'top': jQuery('#wpadminbar').height() + 'px'
	 });
	 
	 // Sticky Jeader
	 var docElem = document.documentElement,
      didScroll = false,
      changeHeaderOn = 100;
    document.querySelector('header');

    function init() {
      window.addEventListener('scroll', function() {
        if (!didScroll) {
          didScroll = true;
          setTimeout(scrollPage, 50);
        }
      }, false);
    }

    function scrollPage() {
      var sy = scrollY();
      if (sy >= changeHeaderOn) {
        jQuery('.top-bar').slideUp(0);
        jQuery("header").addClass("fixed-header");
        if (/iPhone|iPod|BlackBerry/i.test(navigator.userAgent) || jQuery(window).width() < 479) {
          jQuery('.navbar-default .navbar-nav > li > a').css({
            'padding-top': 12 + "px",
            'padding-bottom': 12 + "px"
          })
        } else {
          jQuery('.navbar-default .navbar-nav > li > a').css({
            'padding-top': 8 + "px",
            'padding-bottom': 8 + "px"
          })
          jQuery('.search-side').css({
            'margin-top': 0 + "px"
          });
        };
      } else {
        jQuery('.top-bar').slideDown(0);
        if (/iPhone|iPod|BlackBerry/i.test(navigator.userAgent) || jQuery(window).width() < 479) {
          jQuery('.navbar-default .navbar-nav > li > a').css({
            'padding-top': 15 + "px",
            'padding-bottom': 15 + "px"
          })
        } else {
          jQuery('.navbar-default .navbar-nav > li > a').css({
            'padding-top': 8 + "px",
            'padding-bottom': 8 + "px"
          })
          jQuery('.search-side').css({
            'margin-top': 0 + "px"
          });
        };
      }
      didScroll = false;
    }

    function scrollY() {
      return window.pageYOffset || docElem.scrollTop;
    }
    init();
  };
  
  jQuery(window).load(function() {
    headerEle();
  });
  jQuery(window).resize(function() {
    headerEle();
  });

  // Progress Bar
  jQuery('.skill-shortcode').appear(function() {
    jQuery('.progress').each(function() {
      jQuery('.progress-bar').css('width', function() {
        return (jQuery(this).attr('data-percentage') + '%')
      });
    });
  }, {
    accY: -100
  });
  
  // Nav Menu & Search

  jQuery(".nav > li:has(ul)").addClass("drop");
  jQuery(".nav > li.drop > ul").addClass("dropdown");
  jQuery(".nav > li.drop > ul.dropdown ul").addClass("sup-dropdown");
  
  jQuery('.show-search').click(function() {
    jQuery('.full-search').fadeIn(300);
    jQuery('.full-search input').focus();
  });
  jQuery('.full-search input').blur(function() {
    jQuery('.full-search').fadeOut(300);
  });
  
  //	Back Top Link
  var offset = 200;
  var duration = 500;
  jQuery(window).scroll(function() {
    if (jQuery(this).scrollTop() > offset) {
      jQuery('.back-to-top').fadeIn(400);
    } else {
      jQuery('.back-to-top').fadeOut(400);
    }
  });
  jQuery('.back-to-top').click(function(event) {
    event.preventDefault();
    jQuery('html, body').animate({
      scrollTop: 0
    }, 600);
    return false;
  })
 
  //	Css3 Transition
	
  jQuery('*').each(function() {
    if (jQuery(this).attr('data-animation')) {
      var jQueryanimationName = jQuery(this).attr('data-animation'),
        jQueryanimationDelay = "delay-" + jQuery(this).attr('data-animation-delay');
      jQuery(this).appear(function() {
        jQuery(this).addClass('animated').addClass(jQueryanimationName);
        jQuery(this).addClass('animated').addClass(jQueryanimationDelay);
      });
    }
  });

  //	Nivo Lightbox	
  jQuery('.lightbox').nivoLightbox({
    effect: 'fadeScale',
    keyboardNav: true,
    errorMessage: 'The requested content cannot be loaded. Please try again later.'
  });

  //	Change Slider Nav Icons
  jQuery('.relate-slider').find('.owl-prev').html('<i class="fa fa-angle-left"></i>');
  jQuery('.relate-slider').find('.owl-next').html('<i class="fa fa-angle-right"></i>');
  jQuery('.touch-slider').find('.owl-prev').html('<i class="fa fa-angle-left"></i>');
  jQuery('.touch-slider').find('.owl-next').html('<i class="fa fa-angle-right"></i>');
  jQuery('.touch-carousel, .testimonials-carousel').find('.owl-prev').html('<i class="fa fa-angle-left"></i>');
  jQuery('.touch-carousel, .testimonials-carousel').find('.owl-next').html('<i class="fa fa-angle-right"></i>');
  jQuery('.read-more').append('<i class="fa fa-angle-right"></i>');

  // Sticky Header Removed
});
// End JS Document

/**
 * Slick Nav 
 */

jQuery('.wpb-mobile-menu').slicknav({
  prependTo: '.navbar-header',
  parentTag: 'span',
  allowParentLinks: true,
  duplicate: false,
  label: '',
  closedSymbol: '<i class="fa fa-angle-right"></i>',
  openedSymbol: '<i class="fa fa-angle-down"></i>',
});