PageSourceSearch

https://www.shop2world.com/blog/wp-content/plugins/contact-bank/as…/plugins/custom/js/custom.js?ver=5.6.17

js shop2world.com collected 2026-10-07 15:12:51 UTC 12,594 bytes, 447 lines download raw bytes

1!function ($) {
2
3   "use strict"; // jshint ;_;
4
5   /* TOOLTIP PUBLIC CLASS DEFINITION
6    * =============================== */
7
8   var Tooltip = function (element, options) {
9      this.init('tooltip_tip', element, options)
10   }
11
12   Tooltip.prototype = {
13
14      constructor: Tooltip
15
16      ,
17      init: function (type, element, options) {
18         var eventIn, eventOut
19
20         this.type = type
21         this.$element = $(element)
22         this.options = this.getOptions(options)
23         this.enabled = true
24
25         if (this.options.trigger == 'click') {
26            this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
27         } else if (this.options.trigger != 'manual') {
28            eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
29            eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
30            this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
31            this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
32         }
33
34         this.options.selector ?
35                 (this._options = $.extend({}, this.options, {
36                    trigger: 'manual',
37                    selector: ''
38                 })) :
39                 this.fixTitle()
40      }
41
42      ,
43      getOptions: function (options) {
44         options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
45
46         if (options.delay && typeof options.delay == 'number') {
47            options.delay = {
48               show: options.delay,
49               hide: options.delay
50            }
51         }
52
53         return options
54      }
55
56      ,
57      enter: function (e) {
58         var self = $(e.currentTarget)[this.type](this._options).data(this.type)
59
60         if (!self.options.delay || !self.options.delay.show)
61            return self.show()
62
63         clearTimeout(this.timeout)
64         self.hoverState = 'in'
65         this.timeout = setTimeout(function () {
66            if (self.hoverState == 'in')
67               self.show()
68         }, self.options.delay.show)
69      }
70
71      ,
72      leave: function (e) {
73         var self = $(e.currentTarget)[this.type](this._options).data(this.type)
74
75         if (this.timeout)
76            clearTimeout(this.timeout)
77         if (!self.options.delay || !self.options.delay.hide)
78            return self.hide()
79
80         self.hoverState = 'out'
81         this.timeout = setTimeout(function () {
82            if (self.hoverState == 'out')
83               self.hide()
84         }, self.options.delay.hide)
85      }
86
87      ,
88      show: function () {
89         var $tip, inside, pos, actualWidth, actualHeight, placement, tp
90
91         if (this.hasContent() && this.enabled) {
92            $tip = this.tip()
93            this.setContent()
94
95            if (this.options.animation) {
96               $tip.addClass('fade')
97            }
98
99            placement = typeof this.options.placement == 'function' ?
100                    this.options.placement.call(this, $tip[0], this.$element[0]) :
101                    this.options.placement
102
103            inside = /in/.test(placement)
104
105            $tip
106                    .detach()
107                    .css({
108                       top: 0,
109                       left: 0,
110                       display: 'block'
111                    })
112                    .insertAfter(this.$element)
113
114            pos = this.getPosition(inside)
115
116            actualWidth = $tip[0].offsetWidth
117            actualHeight = $tip[0].offsetHeight
118
119            switch (inside ? placement.split(' ')[1] : placement) {
120               case 'bottom':
121                  tp = {
122                     top: pos.top + pos.height,
123                     left: pos.left + pos.width / 2 - actualWidth / 2
124                  }
125                  break
126               case 'top':
127                  tp = {
128                     top: pos.top - actualHeight,
129                     left: pos.left + pos.width / 2 - actualWidth / 2
130                  }
131                  break
132               case 'left':
133                  tp = {
134                     top: pos.top + pos.height / 2 - actualHeight / 2,
135                     left: pos.left - actualWidth
136                  }
137                  break
138               case 'right':
139                  tp = {
140                     top: pos.top + pos.height / 2 - actualHeight / 2,
141                     left: pos.left + pos.width
142                  }
143                  break
144            }
145
146            $tip
147                    .offset(tp)
148                    .addClass(placement)
149                    .addClass('in')
150         }
151      }
152
153      ,
154      setContent: function () {
155         var $tip = this.tip(),
156                 title = this.getTitle()
157
158         $tip.find('.tooltip_tip-inner')[this.options.html ? 'html' : 'text'](title)
159         $tip.removeClass('fade in top bottom left right')
160      }
161
162      ,
163      hide: function () {
164         var that = this,
165                 $tip = this.tip()
166
167         $tip.removeClass('in')
168
169         function removeWithAnimation() {
170            var timeout = setTimeout(function () {
171               $tip.off($.support.transition.end).detach()
172            }, 500)
173
174            $tip.one($.support.transition.end, function () {
175               clearTimeout(timeout)
176               $tip.detach()
177            })
178         }
179
180         $.support.transition && this.$tip.hasClass('fade') ?
181                 removeWithAnimation() :
182                 $tip.detach()
183
184         return this
185      }
186
187      ,
188      fixTitle: function () {
189         var $e = this.$element
190         if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
191            $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
192         }
193      }
194
195      ,
196      hasContent: function () {
197         return this.getTitle()
198      }
199
200      ,
201      getPosition: function (inside) {
202         return $.extend({}, (inside ? {
203            top: 0,
204            left: 0
205         } : this.$element.offset()), {
206            width: this.$element[0].offsetWidth,
207            height: this.$element[0].offsetHeight
208         })
209      }
210
211      ,
212      getTitle: function () {
213         var title, $e = this.$element,
214                 o = this.options
215
216         title = $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
217
218         return title
219      }
220
221      ,
222      tip: function () {
223         return this.$tip = this.$tip || $(this.options.template)
224      }
225
226      ,
227      validate: function () {
228         if (!this.$element[0].parentNode) {
229            this.hide()
230            this.$element = null
231            this.options = null
232         }
233      }
234
235      ,
236      enable: function () {
237         this.enabled = true
238      }
239
240      ,
241      disable: function () {
242         this.enabled = false
243      }
244
245      ,
246      toggleEnabled: function () {
247         this.enabled = !this.enabled
248      }
249
250      ,
251      toggle: function (e) {
252         var self = $(e.currentTarget)[this.type](this._options).data(this.type)
253         self[self.tip().hasClass('in') ? 'hide' : 'show']()
254      }
255
256      ,
257      destroy: function () {
258         this.hide().$element.off('.' + this.type).removeData(this.type)
259      }
260
261   }
262
263   /* TOOLTIP PLUGIN DEFINITION
264    * ========================= */
265
266   var old = $.fn.tooltip_tip
267
268   $.fn.tooltip_tip = function (option) {
269      return this.each(function () {
270         var $this = $(this),
271                 data = $this.data('tooltip_tip'),
272                 options = typeof option == 'object' && option
273         if (!data)
274            $this.data('tooltip_tip', (data = new Tooltip(this, options)))
275         if (typeof option == 'string')
276            data[option]()
277      })
278   }
279
280   $.fn.tooltip_tip.Constructor = Tooltip
281
282   $.fn.tooltip_tip.defaults = {
283      animation: true,
284      placement: 'top',
285      selector: false,
286      template: '<div class="tooltip_tip"><div class="tooltip_tip-arrow"></div><div class="tooltip_tip-inner"></div></div>',
287      trigger: 'hover',
288      title: '',
289      delay: 0,
290      html: false
291   }
292
293   /* TOOLTIP NO CONFLICT
294    * =================== */
295
296   $.fn.tooltip_tip.noConflict = function () {
297      $.fn.tooltip_tip = old
298      return this
299   }
300
301}(window.jQuery);
302
303+function ($) {
304   'use strict';
305
306   // TAB CLASS DEFINITION
307   // ====================
308
309   var Tab = function (element) {
310      // jscs:disable requireDollarBeforejQueryAssignment
311      this.element = $(element)
312      // jscs:enable requireDollarBeforejQueryAssignment
313   }
314
315   Tab.VERSION = '3.3.5'
316
317   Tab.TRANSITION_DURATION = 150
318
319   Tab.prototype.show = function () {
320      var $this = this.element
321      var $ul = $this.closest('ul:not(.dropdown-menu)')
322      var selector = $this.data('target')
323
324      if (!selector) {
325         selector = $this.attr('href')
326         selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
327      }
328
329      if ($this.parent('li').hasClass('active'))
330         return
331
332      var $previous = $ul.find('.active:last a')
333      var hideEvent = $.Event('hide.bs.tab', {
334         relatedTarget: $this[0]
335      })
336      var showEvent = $.Event('show.bs.tab', {
337         relatedTarget: $previous[0]
338      })
339
340      $previous.trigger(hideEvent)
341      $this.trigger(showEvent)
342
343      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented())
344         return
345
346      var $target = $(selector)
347
348      this.activate($this.closest('li'), $ul)
349      this.activate($target, $target.parent(), function () {
350         $previous.trigger({
351            type: 'hidden.bs.tab',
352            relatedTarget: $this[0]
353         })
354         $this.trigger({
355            type: 'shown.bs.tab',
356            relatedTarget: $previous[0]
357         })
358      })
359   }
360
361   Tab.prototype.activate = function (element, container, callback) {
362      var $active = container.find('> .active')
363      var transition = callback && $.support.transition && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
364
365      function next() {
366         $active
367                 .removeClass('active')
368                 .find('> .dropdown-menu > .active')
369                 .removeClass('active')
370                 .end()
371                 .find('[data-toggle="tab"]')
372                 .attr('aria-expanded', false)
373
374         element
375                 .addClass('active')
376                 .find('[data-toggle="tab"]')
377                 .attr('aria-expanded', true)
378
379         if (transition) {
380            element[0].offsetWidth // reflow for transition
381            element.addClass('in')
382         } else {
383            element.removeClass('fade')
384         }
385
386         if (element.parent('.dropdown-menu').length) {
387            element
388                    .closest('li.dropdown')
389                    .addClass('active')
390                    .end()
391                    .find('[data-toggle="tab"]')
392                    .attr('aria-expanded', true)
393         }
394
395         callback && callback()
396      }
397
398      $active.length && transition ?
399              $active
400              .one('bsTransitionEnd', next)
401              .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
402              next()
403
404      $active.removeClass('in')
405   }
406
407   // TAB PLUGIN DEFINITION
408   // =====================
409
410   function Plugin(option) {
411      return this.each(function () {
412         var $this = $(this)
413         var data = $this.data('bs.tab')
414
415         if (!data)
416            $this.data('bs.tab', (data = new Tab(this)))
417         if (typeof option == 'string')
418            data[option]()
419      })
420   }
421
422   var old = $.fn.tab
423
424   $.fn.tab = Plugin
425   $.fn.tab.Constructor = Tab
426
427   // TAB NO CONFLICT
428   // ===============
429
430   $.fn.tab.noConflict = function () {
431      $.fn.tab = old
432      return this
433   }
434
435   // TAB DATA-API
436   // ============
437
438   var clickHandler = function (e) {
439      e.preventDefault()
440      Plugin.call($(this), 'show')
441   }
442
443   $(document)
444           .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
445           .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
446
447}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.