text: // ======================= faq's =================
  jQuery(document).ready(function(){
    var acc = document.getElementsByClassName("accordionone");
    var i;
    for (i = 0; i < acc.length; i++) {
      acc[i].addEventListener("click", function() {
        this.classList.toggle("active");
        var panel = this.nextElementSibling;
        if (panel.style.display === "block") {
          panel.style.display = "none";
        } else {
          panel.style.display = "block";
        }
      });
    }
  
  // ========= upload multiple images 
  $(document).ready(function() {
      if (window.File && window.FileList && window.FileReader) {
        $("#files").on("change", function(e) {
          var files = e.target.files,
            filesLength = files.length;
          for (var i = 0; i < filesLength; i++) {
            var f = files[i]
            var fileReader = new FileReader();
            fileReader.onload = (function(e) {
              var file = e.target;
              $("<span class=\"pip\">" +
                "<img class=\"imageThumb\" src=\"" + e.target.result + "\" title=\"" + file.name + "\"/>" +
                "<br/><span class=\"remove\">Delete</span> <br/><span class=\"Profile-img\">Profile Image</span> <br/><span class=\"Private-img\">Private Image</span>"
                ).insertAfter("#files");
                
              $(".remove").click(function(){
                $(this).parent(".pip").remove();
              });
           
              
            });
            fileReader.readAsDataURL(f);
          }
          console.log(files);
        });
      } else {
        alert("Your browser doesn't support to File API")
      }
    });
  
  
    // =============== upload multiple pdf file only
  
    //jQuery plugin
  (function( $ ) {
  
    $.fn.uploader = function( options ) {
      var settings = $.extend({
        MessageAreaText: "There is no file selected.",
        // MessageAreaTextWithFiles: "File list:",
        DefaultErrorMessage: "Failed opening file.",
        BadTypeErrorMessage: "Invalid type of file. Only PDF file allowed.",
        acceptedFileTypes: ['pdf']
      }, options );
  
      var uploadId = 1;
      //update the messaging 
       $('.file-uploader__message-area p').text(options.MessageAreaText || settings.MessageAreaText);
  
      //create and add the file list and the hidden input list
      var fileList = $('<ul class="file-list"></ul>');
      var hiddenInputs = $('<div class="hidden-inputs hidden"></div>');
      $('.file-uploader__message-area').after(fileList);
      $('.file-list').after(hiddenInputs);
  
     //when choosing a file, add the name to the list and copy the file input into the hidden inputs
      $('.file-chooser__input').on('change', function(){
         var file = $('.file-chooser__input').val();
         var fileName = (file.match(/([^\\\/]+)$/)[0]);
  
        //clear any error condition
        $('.file-chooser').removeClass('error');
        $('.error-message').remove();
  
        //validate the file
        var check = checkFile(fileName);
        if(check === "valid") {
  
          // move the 'real' one to hidden list 
          $('.hidden-inputs').append($('.file-chooser__input')); 
  
          //insert a clone after the hiddens (copy the event handlers too)
          $('.file-chooser').append($('.file-chooser__input').clone({ withDataAndEvents: true})); 
  
          //add the name and a remove button to the file-list
          $('.file-list').append('<li style="display: none;"><a href="https://www.w3schools.com/w3css/w3css_downloads.asp" target=”_blank” download><span class="file-list__name">' + fileName + '</span><button class="removal-button" data-uploadid="'+ uploadId +'"></button></a></li>');
          $('.file-list').find("li:last").show(800);
  
          //removal button handler
          $('.removal-button').on('click', function(e){               
            e.preventDefault();
  
            //remove the corresponding hidden input
            $('.hidden-inputs input[data-uploadid="'+ $(this).data('uploadid') +'"]').remove(); 
  
            //remove the name from file-list that corresponds to the button clicked
            $(this).parent().hide("puff").delay(10).queue(function(){$(this).remove();});
  
            //if the list is now empty, change the text back 
            if($('.file-list li').length === 0) {
              $('.file-uploader__message-area').text(options.MessageAreaText || settings.MessageAreaText);
            }
          });
  
          //so the event handler works on the new "real" one
          $('.hidden-inputs .file-chooser__input').removeClass('file-chooser__input').attr('data-uploadId', uploadId); 
  
          //update the message area
          $('.file-uploader__message-area').text(options.MessageAreaTextWithFiles || settings.MessageAreaTextWithFiles);
  
          uploadId++;
  
        } else {
          //indicate that the file is not ok
          $('.file-chooser').addClass("error");
          var errorText = options.DefaultErrorMessage || settings.DefaultErrorMessage;
  
          if(check === "badFileName") {
            errorText = options.BadTypeErrorMessage || settings.BadTypeErrorMessage;
          }
  
          $('.file-chooser__input').after('<p class="error-message">'+ errorText +'</p>');
        }
      });
  
      var checkFile = function(fileName) {
        var accepted          = "invalid",
            acceptedFileTypes = this.acceptedFileTypes || settings.acceptedFileTypes,
            regex;
  
        for ( var i = 0; i < acceptedFileTypes.length; i++ ) {
          regex = new RegExp("\\." + acceptedFileTypes[i] + "$", "i");
  
          if ( regex.test(fileName) ) {
            accepted = "valid";
            break;
          } else {
            accepted = "badFileName";
          }
        }
  
        return accepted;
     };
   }; 
  }( jQuery ));
  
  //init 
  
  });
  
  $(document).ready(function(){
   $('.fileUploader').uploader({
     MessageAreaText: "Select a file."
   });
  });
  
  
  