text: "use strict";
  $(document).ready(function () {
  
      //tooltips
      $('[data-toggle="tooltip"]').tooltip();
  
      //tinymce editor
      tinymce.init({
        selector: '.tinymce',
        height: 150,
        theme: 'modern',
        plugins: [
          'advlist autolink lists link image charmap print preview hr anchor pagebreak',
          'searchreplace wordcount visualblocks visualchars  fullscreen',
          'insertdatetime media nonbreaking save table contextmenu directionality',
          'emoticons template paste textcolor colorpicker textpattern imagetools'
        ],
        toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | link image | print preview media code | forecolor backcolor emoticons',
        image_advtab: true, 
       });
      //ends tinymce
  
  
      //datatable
      $('.datatable').DataTable({ 
          responsive: true, 
          dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4'f>>tp", 
          "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], 
          buttons: [  
              {extend: 'copy', className: 'btn-sm'}, 
              {extend: 'csv', title: 'ExampleFile', className: 'btn-sm'}, 
              {extend: 'excel', title: 'ExampleFile', className: 'btn-sm', title: 'exportTitle'}, 
              {extend: 'pdf', title: 'ExampleFile', className: 'btn-sm'}, 
              {extend: 'print', className: 'btn-sm'} 
          ] 
      });
  
      //datatable
      $('.datatable2').DataTable({ 
          responsive: true, 
          paging:false,
          dom: "<'row'<'col-sm-4'B><'col-sm-4'l><'col-sm-4'f>>tp", 
          buttons: [  
              {extend: 'copy', className: 'btn-sm'}, 
              {extend: 'csv', title: 'ExampleFile', className: 'btn-sm'}, 
              {extend: 'excel', title: 'ExampleFile', className: 'btn-sm', title: 'exportTitle'}, 
              {extend: 'pdf', title: 'ExampleFile', className: 'btn-sm'}, 
              {extend: 'print', className: 'btn-sm'} 
          ] 
      });
   
  
      //datepicker
      $(".datepicker").datepicker({
          dateFormat: "dd-mm-yy"
      }); 
  
      //timepicker
      $('.timepicker').timepicker({
          timeFormat: 'HH:mm:ss',
          stepMinute: 5,
          stepSecond: 15
      });
  
      //timepicker
      $('.timepicker-hour-min-only').timepicker({
          timeFormat: 'HH:mm:00',
          stepHour: 1,
          stepMinute: 5,
      });
  
      // semantic button
      $('.ui.selection.dropdown').dropdown();
      $('.ui.menu .ui.dropdown').dropdown({
          on: 'hover'
      });
   
  
      // select 2 dropdown 
      $("select.form-control:not(.dont-select-me)").select2({
          placeholder: "Select option",
          allowClear: true
      });
  
      //counter
      $('.count-number').counterUp({
          delay: 10,
          time: 3000
      });
   
      //Sparklines Charts
      $('.sparkline1').sparkline([4, 6, 7, 7, 4, 3, 2, 4, 6, 7, 4, 6, 7, 7, 4, 3, 2, 4, 6, 7, 7, 4, 3, 1, 5, 7, 6, 6, 5, 5, 4, 4, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7], {
          type: 'bar',
          barColor: '#37a000',
          height: '35',
          barWidth: '3',
          barSpacing: 2
      });
  
      $(".sparkline2").sparkline([-8, 2, 4, 3, 5, 4, 3, 5, 5, 6, 3, 9, 7, 3, 5, 6, 9, 5, 6, 7, 2, 3, 9, 6, 6, 7, 8, 10, 15, 16, 17, 15], {
          type: 'line',
          height: '35',
          width: '100%',
          lineColor: '#37a000',
          fillColor: '#fff'
      });
      $(".sparkline3").sparkline([2, 5, 3, 7, 5, 10, 3, 6, 5, 7], {
          type: 'line',
          height: '35',
          width: '100%',
          lineColor: '#37a000',
          fillColor: '#fff'
      });
      $(".sparkline4").sparkline([10, 34, 13, 33, 35, 24, 32, 24, 52, 35], {
          type: 'line',
          height: '35',
          width: '100%',
          lineColor: '#37a000',
          fillColor: 'rgba(55, 160, 0, 0.7)'
      }); 
  
  
      //preloader
      $(window).load(function() {
          $(".se-pre-con").fadeOut("slow");;
      });
  
      // fixed table head
      $("#fixTable").tableHeadFixer();
  
  
      
  });
   
  
  //print a div
  function printContent(el){
      var restorepage  = $('body').html();
      var printcontent = $('#' + el).clone();
      $('body').empty().html(printcontent);
      window.print();
      $('body').html(restorepage);
      location.reload();
  }
   
  
  