text: 
  $(document).ready(function () {
      
      $('.tile .slimScroll-120').slimscroll({
                  height: 60,
                  size: 3,
                  alwaysVisible: true,
                  color: '#007c34'
              });
  });
  
  $('body').delegate('[data-toggle="ajaxModal"]', 'click',
          function (e) {
              $('#ajaxModal').remove();
              e.preventDefault();
              var $this = $(this)
                      , $remote = $this.data('remote') || $this.attr('data-href') || $this.attr('href')
                      , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>');
              $('body').append($modal);
              $modal.modal({backdrop: true});
              $modal.load($remote);
              $("body").css("padding-right", "0 !important");
          }
  
  );
  //sign off script
  function manager_request(YPId){
      var delete_meg ="Please select OK to authorise this document.";
      BootstrapDialog.show(
          {
              title: 'Information',
              message: delete_meg,
              buttons: [{
                  label: 'Cancel',
                  action: function(dialog) {
                      $( ".ra_signoff" ).prop( "checked", false );
                      dialog.close();
                  }
              }, {
                  label: 'ok',
                  action: function(dialog) {
                      window.location.href = baseurl +'/RiskAssesment/manager_review/' + YPId;
                      dialog.close();
                  }
              }]
          });
  }
  
  //signoff review data script
  function signoff_request(YPId,IS_ID){
      var delete_meg ="Please select OK to authorise this document.";
      BootstrapDialog.show(
          {
              title: 'Information',
              message: delete_meg,
              buttons: [{
                  label: 'Cancel',
                  action: function(dialog) {
                      $("input[name='signoff_data']").prop("checked", false);
                      dialog.close();
                  }
              }, {
                  label: 'ok',
                  action: function(dialog) {
                      var EMAIL = $("#email_data").val();
                      window.location.href = baseurl +'/RiskAssesment/signoff_review_data/' + YPId + '/' + IS_ID + '/' + EMAIL;
                      dialog.close();
                  }
              }]
          });
  }
  
  
  var ra_url = window.location.href;
  var url_ra = baseurl +'RiskAssesment/edit/' + YPId;
  if(url_ra == ra_url){
   function get_ra_complete(){
      var feedback = $.ajax({
          type: "POST",
           url: baseurl + "RiskAssesment/update_slug/",
          data: {'url_data': url_ra}
          
      }).done(function(){
          setTimeout(function(){get_ra_complete();}, 10000);
      }).responseText;
  }
  
  $(function(){
      get_ra_complete();
  });
  
  }
  //signoff chnage user type
  $('body').on('change', '#user_type', function (e) {
      $("#submit_btn").attr("disabled", true);
      var id = $(this).val();
      var element = $(this).find('option:selected'); 
      var user_type = element.attr("user-type"); 
      $.ajax({
          type: "POST",
          url: baseurl +'/RiskAssesment/getUserTypeDetail',
          data: {
              user_type: user_type,id: id,ypid:$('#ypid').val()
          },
          success: function (html) {
             $("#common_div").html(html);
             $("#submit_btn").removeAttr("disabled");
          },
          error: function (xhr, ajaxOptions, thrownError) {
                  if (xhr.responseText) {
                      toastr.error(xhr.responseText, 'Inconceivable!')
                  } else {
                      console.error("<div>Http status: " + xhr.status + " " + xhr.statusText + "</div>" + "<div>ajaxOptions: " + ajaxOptions + "</div>"
                          + "<div>thrownError: " + thrownError + "</div>");
                  }
              }
      });
      
  });
  //resend mail
  function resendMail(id,ypid){
      var delete_meg ="Are you sure you want to resend this External Approval?";
      BootstrapDialog.show(
          {
              title: 'Information',
              message: delete_meg,
              buttons: [{
                  label: 'Cancel',
                  action: function(dialog) {
                      dialog.close();
                  }
              }, {
                  label: 'ok',
                  action: function(dialog) {
                      window.location.href = baseurl + 'RiskAssesment/resend_external_approval/'+ id+'/'+ypid;
                      dialog.close();
                  }
              }]
          });
  }