<commit_before>/*
 * Plugin Name: Bussiness View Overlay
 *
 * Author: Instant Website Team
 * 
 * Note: Call Business View Overlay after jQuery in Application JS loaded
 */

window.onload = function() {

  (function($) {

      BusinessViewOverlay = function(element, options) {
        this.options  = null;
        this.$element = null;
        this.$overlay = null
        this.device   = null;

        this.init(element, options);
      }

      BusinessViewOverlay.DEFAULTS = {
        label:   "Click to view a 360-degree virtual tour",
        channel: "instant website"
      }

      BusinessViewOverlay.prototype.init = function(element, options) {
        this.$element = $(element);
        this.options  = $.extend(this.getDefaults(), options);
        this.device   = this.getDevice();
        this.$overlay = this.getOverlay();
        
        this.setPositionRelative();
        this.onClickOverlay();
        this.appendOverlay();

        var self = this;
        if (this.device == "desktop") {
          this.$overlay.hide();
          this.$element.hover(function() {
            self.$overlay.toggle();
          }, function() {
            self.$overlay.toggle();
          })
        }
      }

      BusinessViewOverlay.prototype.getDevice = function() {
        var md     = new MobileDetect(window.navigator.userAgent),
            device = '';

        if (md.phone()) {
          device = "mobile";
        }
        else if (md.tablet()) {
          device = "tablet";
        }
        else {
          device = "desktop";
        }

        return device;
      }

      BusinessViewOverlay.prototype.getDefaults = function () {
        return BusinessViewOverlay.DEFAULTS;
      }

      BusinessViewOverlay.prototype.setPositionRelative = function() {
        this.$element.css('position', 'relative');<commit_msg>improve on hover business view<commit_after>/*
 * Plugin Name: Bussiness View Overlay
 *
 * Author: Instant Website Team
 * 
 * Note: Call Business View Overlay after jQuery in Application JS loaded
 */

window.onload = function() {

  (function($) {

      BusinessViewOverlay = function(element, options) {
        this.options  = null;
        this.$element = null;
        this.$overlay = null
        this.device   = null;

        this.init(element, options);
      }

      BusinessViewOverlay.DEFAULTS = {
        label:   "Click to view a 360-degree virtual tour",
        channel: "instant website"
      }

      BusinessViewOverlay.prototype.init = function(element, options) {
        this.$element = $(element);
        this.options  = $.extend(this.getDefaults(), options);
        this.device   = this.getDevice();
        this.$overlay = this.getOverlay();
        
        this.setPositionRelative();
        this.onClickOverlay();
        this.appendOverlay();

        var self = this;
        if (this.device == "desktop") {
          this.$overlay.hide();
          this.$element.hover(function() {
            self.$overlay.show();
          }, function() {
            self.$overlay.hide();
          })
        }
      }

      BusinessViewOverlay.prototype.getDevice = function() {
        var md     = new MobileDetect(window.navigator.userAgent),
            device = '';

        if (md.phone()) {
          device = "mobile";
        }
        else if (md.tablet()) {
          device = "tablet";
        }
        else {
          device = "desktop";
        }

        return device;
      }

      BusinessViewOverlay.prototype.getDefaults = function () {
        return BusinessViewOverlay.DEFAULTS;
      }

      BusinessViewOverlay.prototype.setPositionRelative = function() {
        this.$element.css('position', 'relative');
{'fraction_non_alphanumeric': 0.12220726783310902, 'fraction_numerical': 0.0016150740242261105, 'mean_word_length': 1.9236821400472068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1562504', 'n_tokens_mistral': 1001, 'n_tokens_neox': 980, 'n_words': 211}