HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/vc-extensions-bundle/hotspot/js/script.js
function hexToRgb(hex) {
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
  var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  hex = hex.replace(shorthandRegex, function(m, r, g, b) {
      return r + r + g + g + b + b;
  });

  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  return result ? {
      r: parseInt(result[1], 16),
      g: parseInt(result[2], 16),
      b: parseInt(result[3], 16)
  } : null;
}

jQuery(document).ready(function($) {
    $('.cqtooltip-wrapper').each(function() {
      var _this = $(this);
      var _tooltipstyle = $(this).data('tooltipstyle');
      var _tooltipanimation = $(this).data('tooltipanimation');
      var _trigger = $(this).data('trigger') || "hover";
      var _maxwidth = $(this).data('maxwidth') || 320;
      var _opacity = $(this).data('opacity') || 0.5;
      var _isdisplayall = $(this).data('isdisplayall');
      var _displayednum = parseInt($(this).data('displayednum'));
      var _marginoffset = $(this).data('marginoffset') || '0';
      var _newbg;

      if(_marginoffset!="0"){
          $(window).on('resize', function(event) {
              var _windowwidth = $(this).width();
              if(_windowwidth<=540){
                  $('.hotspot-item', _this).each(function(index) {
                      $(this).css('margin', _marginoffset);
                  })
              }else{
                  $('.hotspot-item', _this).each(function(index) {
                      $(this).css('margin', '0');
                  })
              }
          });
          $(window).trigger('resize');
      }

      $('.cq-tooltip', $(this)).each(function(index) {
        var _tooltip = $(this);
        var _bg = $(this).css('background-color');
        var _arrowposition = $(this).data('arrowposition') || 'top';
        if(_bg.indexOf('a') == -1){
          _newbg = _bg.replace(')', ', '+_opacity+')').replace('rgb', 'rgba');
        }else{
          _newbg = _bg;
        }
        $(this).css('background-color', _newbg);
        $(this).on('click', function(event) {
          if($(this).attr('href')==""||$(this).attr('href')=="#") event.preventDefault();
        });
        var _content = $(this).data('tooltip');
        var _offsetx = $(window).width()<=480?0:2;
        var _offsety = 0;
        // if(_arrowposition=="top"){
        //     _offsety = -3;
        // }
        // if(_arrowposition=="bottom"){
        //     _offsety = 3;
        // }
        // if(_arrowposition=="right"){
        //     _offsetx = 3;
        // }
        // if(_arrowposition=="left"){
        //     _offsetx = -3;
        // }

        $(this).tooltipster({
          content: _content,
          // autoClose: false,
          position: _arrowposition,
          offsetX: _offsetx,
          offsetY: _offsety,
          maxWidth: _maxwidth,
          delay: 100,
          speed: 300,
          // timer: 5000,
          interactive: true,
          animation: _tooltipanimation,
          trigger: _trigger,
          contentAsHTML: true,
          theme   : 'tooltipster-' + _tooltipstyle,
        });
        if(_isdisplayall=="on"){
            setTimeout(function() {
              _tooltip.tooltipster('show');
            }, 600);
        }else if(_isdisplayall=="specify"&&(_displayednum-1)==index){
              setTimeout(function() {
                _tooltip.tooltipster('show');
              }, 600);
        }

  });


  });


});