text: /* ----------------- Start Document ----------------- */
  (function($){
      "use strict";
  
      $(document).ready(function(){
  
  
      /*----------------------------------------------------*/
      /*  Navigation
      /*----------------------------------------------------*/
      if($('header').hasClass('full-width')) {
          $('header').attr('data-full', 'yes');
      }  
      if($('header').hasClass('alternative')) {
          $('header').attr('data-alt', 'yes');
      }
      function menumobile(){
          var winWidth = $(window).width();
          if( winWidth < 973 ) {
              $('#navigation').removeClass('menu');
              $('#navigation li').removeClass('dropdown');
              $('header').removeClass('full-width');
              $('#navigation').superfish('destroy');
          } else {
              $('#navigation').addClass('menu');
              if($('header').data('full') === "yes" ) {
                   $('header').addClass('full-width');
              }
              $('#navigation').superfish({
                  delay:       300,                               // one second delay on mouseout
                  animation:   {opacity:'show'},   // fade-in and slide-down animation
                  speed:       200,                               // animation speed
                  speedOut:    50                                 // out animation speed
              });
          }
          if( winWidth < 1272 ) {
              $('header').addClass('alternative').removeClass('full-width');
          } else {
              if($('header').data('alt') === "yes" ) {} else {
                  $('header').removeClass('alternative');
              }
          }
      }
  
      $(window).resize(function (){
          menumobile();
      });
      menumobile();
  
  
       /*----------------------------------------------------*/
      /*  Mobile Navigation
      /*----------------------------------------------------*/
          var jPanelMenu = $.jPanelMenu({
            menu: '#responsive',
            animated: false,
            duration: 200,
            keyboardShortcuts: false,
            closeOnContentClick: true
          });
  
  
        // desktop devices
          $('.menu-trigger').click(function(){
            var jpm = $(this);
  
            if( jpm.hasClass('active') )
            {
              jPanelMenu.off();
              jpm.removeClass('active');
            }
            else
            {
              jPanelMenu.on();
              jPanelMenu.open();
              jpm.addClass('active');
            }
            return false;
          });
  
  
          // Removes SuperFish Styles
          $('#jPanelMenu-menu').removeClass('sf-menu');
          $('#jPanelMenu-menu li ul').removeAttr('style');
  
  
          $(window).resize(function (){
            var winWidth = $(window).width();
            var jpmactive = $('.menu-trigger');
            if(winWidth>990) {
              jPanelMenu.off();
              jpmactive.removeClass('active');
            }
          });
  
  
      /*----------------------------------------------------*/
      /*  Stacktable / Responsive Tables Plug-in
      /*----------------------------------------------------*/
      $('.responsive-table').stacktable();
      
  
  
      /*----------------------------------------------------*/
      /*  Back to Top
      /*----------------------------------------------------*/
          var pxShow = 400; // height on which the button will show
          var fadeInTime = 400; // how slow / fast you want the button to show
          var fadeOutTime = 400; // how slow / fast you want the button to hide
          var scrollSpeed = 400; // how slow / fast you want the button to scroll to top.
  
          $(window).scroll(function(){
            if($(window).scrollTop() >= pxShow){
              $("#backtotop").fadeIn(fadeInTime);
            } else {
              $("#backtotop").fadeOut(fadeOutTime);
            }
          });
  
          $('#backtotop a').click(function(){
            $('html, body').animate({scrollTop:0}, scrollSpeed);
            return false;
          });
      
  
  
      /*----------------------------------------------------*/
      /*  Showbiz Carousel
      /*----------------------------------------------------*/
          $('#job-spotlight').showbizpro({
              dragAndScroll:"off",
              visibleElementsArray:[1,1,1,1],
              carousel:"off",
              entrySizeOffset:0,
              allEntryAtOnce:"off",
              rewindFromEnd:"off",
              autoPlay:"off",
              delay:2000,
              speed:400,
              easing:'easeOut'
          });
  
          $('#our-clients').showbizpro({
              dragAndScroll:"off",
              visibleElementsArray:[5,4,3,1],
              carousel:"off",
              entrySizeOffset:0,
              allEntryAtOnce:"off"
          });
  
  
  
      /*----------------------------------------------------*/
      /*  Revolution Slider
      /*----------------------------------------------------*/
          $('.fullwidthbanner').revolution({
              delay: 9000,
              startwidth: 1180,
              startheight: 585,
              onHoverStop: "on", // Stop Banner Timet at Hover on Slide on/off
              navigationType: "none", //bullet, none
              navigationArrows: "verticalcentered", //nexttobullets, verticalcentered, none
              navigationStyle: "none", //round, square, navbar, none
              touchenabled: "on", // Enable Swipe Function : on/off
              navOffsetHorizontal: 0,
              navOffsetVertical: 20,
              stopAtSlide: -1, // Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
              stopAfterLoops: -1, // Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic
              fullWidth: "on",
          });
  
  
  
      /*----------------------------------------------------*/
      /*  Flexslider
      /*----------------------------------------------------*/
          $('.testimonials-slider').flexslider({
              animation: "fade",
              controlsContainer: $(".custom-controls-container"),
              customDirectionNav: $(".custom-navigation a")
          });
  
  
  
      /*----------------------------------------------------*/
      /*  Counters
      /*----------------------------------------------------*/
  
          $('.counter').counterUp({
              delay: 10,
              time: 800
          });
  
  
  
      /*----------------------------------------------------*/
      /*  Chosen Plugin
      /*----------------------------------------------------*/
  
          var config = {
            '.chosen-select'           : {disable_search_threshold: 10, width:"100%"},
            '.chosen-select-deselect'  : {allow_single_deselect:true, width:"100%"},
            '.chosen-select-no-single' : {disable_search_threshold:10, width:"100%"},
            '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
            '.chosen-select-width'     : {width:"95%"}
          };
          for (var selector in config) {
            $(selector).chosen(config[selector]);
          }
  
  
      /*----------------------------------------------------*/
      /*  Checkboxes "any" fix
      /*----------------------------------------------------*/   
          $('.checkboxes').find('input:first').addClass('first');
          $('.checkboxes input').on('change', function() {
              if($(this).hasClass('first')){
                  $(this).parents('.checkboxes').find('input').prop('checked', false);
                  $(this).prop('checked', true);
              } else {
                  $(this).parents('.checkboxes').find('input:first').not(this).prop('checked', false);
              }
          });
  
  
      /*----------------------------------------------------*/
      /*  Magnific Popup
      /*----------------------------------------------------*/   
          
              $('body').magnificPopup({
                  type: 'image',
                  delegate: 'a.mfp-gallery',
  
                  fixedContentPos: true,
                  fixedBgPos: true,
  
                  overflowY: 'auto',
  
                  closeBtnInside: true,
                  preloader: true,
  
                  removalDelay: 0,
                  mainClass: 'mfp-fade',
  
                  gallery:{enabled:true},
  
                  callbacks: {
                      buildControls: function() {
                          console.log('inside'); this.contentContainer.append(this.arrowLeft.add(this.arrowRight));
                      }
                  }
              });
  
  
              $('.popup-with-zoom-anim').magnificPopup({
                  type: 'inline',
  
                  fixedContentPos: false,
                  fixedBgPos: true,
  
                  overflowY: 'auto',
  
                  closeBtnInside: true,
                  preloader: false,
  
                  midClick: true,
                  removalDelay: 300,
                  mainClass: 'my-mfp-zoom-in'
              });
  
  
              $('.mfp-image').magnificPopup({
                  type: 'image',
                  closeOnContentClick: true,
                  mainClass: 'mfp-fade',
                  image: {
                      verticalFit: true
                  }
              });
  
  
              $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
                  disableOn: 700,
                  type: 'iframe',
                  mainClass: 'mfp-fade',
                  removalDelay: 160,
                  preloader: false,
  
                  fixedContentPos: false
              });
  
  
       /*---------------------------------------------------*/
      /*  Contact Form
      /*---------------------------------------------------*/
      $("#contactform .submit").click(function(e) {
  
  
        e.preventDefault();
        var user_name       = $('input[name=name]').val();
        var user_email      = $('input[name=email]').val();
        var user_comment    = $('textarea[name=comment]').val();
  
        //simple validation at client's end
        //we simply change border color to red if empty field using .css()
        var proceed = true;
        if(user_name===""){
            $('input[name=name]').addClass('error');
              proceed = false;
            }
            if(user_email===""){
              $('input[name=email]').addClass('error');
              proceed = false;
            }
            if(user_comment==="") {
              $('textarea[name=comment]').addClass('error');
              proceed = false;
            }
  
            //everything looks good! proceed...
            if(proceed) {
              $('.hide').fadeIn();
              $("#contactform .submit").fadeOut();
                //data to be sent to server
                var post_data = {'userName':user_name, 'userEmail':user_email, 'userComment':user_comment};
  
                //Ajax post data to server
                $.post('contact.php', post_data, function(response){
                  var output;
                  //load json data from server and output comment
                  if(response.type == 'error')
                    {
                      output = '<div class="error">'+response.text+'</div>';
                      $('.hide').fadeOut();
                      $("#contactform .submit").fadeIn();
                    } else {
  
                      output = '<div class="success">'+response.text+'</div>';
                      //reset values in all input fields
                      $('#contact div input').val('');
                      $('#contact textarea').val('');
                      $('.hide').fadeOut();
                      $("#contactform .submit").fadeIn().attr("disabled", "disabled").css({'backgroundColor':'#c0c0c0', 'cursor': 'default' });
                    }
  
                    $("#result").hide().html(output).slideDown();
                  }, 'json');
              }
        });
  
      //reset previously set border colors and hide all comment on .keyup()
      $("#contactform input, #contactform textarea").keyup(function() {
        $("#contactform input, #contactform textarea").removeClass('error');
        $("#result").slideUp();
      });
  
  
  
  
      /*----------------------------------------------------*/
      /*  Accordions
      /*----------------------------------------------------*/
  
          var $accor = $('.accordion');
  
           $accor.each(function() {
              $(this).addClass('ui-accordion ui-widget ui-helper-reset');
              $(this).find('h3').addClass('ui-accordion-header ui-helper-reset ui-state-default ui-accordion-icons ui-corner-all');
              $(this).find('div').addClass('ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom');
              $(this).find("div").hide().first().show();
              $(this).find("h3").first().removeClass('ui-accordion-header-active ui-state-active ui-corner-top').addClass('ui-accordion-header-active ui-state-active ui-corner-top');
              $(this).find("span").first().addClass('ui-accordion-icon-active');
          });
  
          var $trigger = $accor.find('h3');
  
          $trigger.on('click', function(e) {
              var location = $(this).parent();
  
              if( $(this).next().is(':hidden') ) {
                  var $triggerloc = $('h3',location);
                  $triggerloc.removeClass('ui-accordion-header-active ui-state-active ui-corner-top').next().slideUp(300);
                  $triggerloc.find('span').removeClass('ui-accordion-icon-active');
                  $(this).find('span').addClass('ui-accordion-icon-active');
                  $(this).addClass('ui-accordion-header-active ui-state-active ui-corner-top').next().slideDown(300);
              }
               e.preventDefault();
          });
  
      
  
      /*----------------------------------------------------*/
      /*  Application Tabs
      /*----------------------------------------------------*/   
          // Get all the links.
          var link = $(".app-link");
          $('.close-tab').hide();
  
          $('.app-tabs div.app-tab-content').hide();
          // On clicking of the links do something.
          link.on('click', function(e) {
  
              e.preventDefault();
              $(this).parents('div.application').find('.close-tab').fadeOut();
              var a = $(this).attr("href");
              if($(this).hasClass('opened')) {
                  $(this).parents('div.application').find(".app-tabs div.app-tab-content").slideUp('fast');
                  $(this).parents('div.application').find('.close-tab').fadeOut(10);
                  $(this).removeClass('opened');
              } else {
                  $(this).parents('div.application').find(".app-link").removeClass('opened');
                  $(this).addClass('opened');
                  $(this).parents('div.application').find(a).slideDown('fast').removeClass('closed').addClass('opened');
                  $(this).parents('div.application').find('.close-tab').fadeIn(10);
              }
  
              $(this).parents('div.application').find(".app-tabs div.app-tab-content").not(a).slideUp('fast').addClass('closed').removeClass('opened');
              
          });
  
          $('.close-tab').on('click',function(e){
              $(this).fadeOut();
              e.preventDefault();
              $(this).parents('div.application').find(".app-link").removeClass('opened');
              $(this).parents('div.application').find(".app-tabs div.app-tab-content").slideUp('fast').addClass('closed').removeClass('opened');
          });
  
  
      /*----------------------------------------------------*/
      /*  Add Resume 
      /*----------------------------------------------------*/   
          $('.box-to-clone').hide();
          $('.add-box').on('click', function(e) {
              e.preventDefault();
              var newElem = $(this).parent().find('.box-to-clone:first').clone();
              newElem.find('input').val('');
              newElem.prependTo($(this).parent()).show();
              var height = $(this).prev('.box-to-clone').outerHeight(true);
              
              $("html, body").stop().animate({ scrollTop: $(this).offset().top-height}, 600);
          });
  
          $('body').on('click','.remove-box', function(e) {
              e.preventDefault();
              $(this).parent().remove();
          });
  
  
  
      /*----------------------------------------------------*/
      /*  Tabs
      /*----------------------------------------------------*/ 
    
  
          var $tabsNav    = $('.tabs-nav'),
          $tabsNavLis = $tabsNav.children('li');
          // $tabContent = $('.tab-content');
  
          $tabsNav.each(function() {
              var $this = $(this);
  
              $this.next().children('.tab-content').stop(true,true).hide()
              .first().show();
  
              $this.children('li').first().addClass('active').stop(true,true).show();
          });
  
          $tabsNavLis.on('click', function(e) {
              var $this = $(this);
  
              $this.siblings().removeClass('active').end()
              .addClass('active');
  
              $this.parent().next().children('.tab-content').stop(true,true).hide()
              .siblings( $this.find('a').attr('href') ).fadeIn();
  
              e.preventDefault();
          });
            var hash = window.location.hash;
      var anchor = $('.tabs-nav a[href="' + hash + '"]');
      if (anchor.length === 0) {
          $(".tabs-nav li:first").addClass("active").show(); //Activate first tab
          $(".tab-content:first").show(); //Show first tab content
      } else {
          console.log(anchor);
          anchor.parent('li').click();
      }
  
  // ------------------ End Document ------------------ //
  });
  
  })(this.jQuery);
  
    