PageSourceSearch

https://static.automarket.ro/include-v.6a104b9a6e8c9/misc/asirom-2013-02/thw_script29.js

js automarket.ro collected 2026-10-02 11:06:17 UTC 3,589 bytes, 113 lines download raw bytes

1jQuery.fn.highlight = function (str, className){ 	
2	var regex = new RegExp(str, "g");
3	return this.each(function (){
4		this.innerHTML = this.innerHTML.replace(regex,"<span class=\"" + className + "\">" + str + "</span>");
5	});
6};
7
8var thw_tmpint, thw_init = false, mX = 0, mY = 0, xp, yp;
9
10jQuery(document).mousemove(function (e){
11  mX = e.pageX;
12  mY = e.pageY;
13  if(jQuery('#thw_theImg'))
14	jQuery('#thw_theImg').offset({'top':mY + 20, 'left':mX - 140});
15});
16
17function thw_search_stuff(){
18	jQuery('#thw_theImg').fadeOut('2000');
19  jQuery('.js-highlight2').each(function (){
20  var $this = jQuery(this); 
21  var tmpX = mX - 150 + getRandom(150);
22  $this.offset({'top':$this.offset().top,'left':tmpX});
23  $this.show();
24  var thw_top = getRandom(100);
25  var thw_left = 250 + getRandom(50);
26  $this.animate({
27    top :jQuery('#banda_footer').offset().top,
28    left:thw_left
29  }, {
30    duration:2800 + thw_top,
31    complete:function (){
32      jQuery(this).hide().remove();
33    }
34  });
35});
36        }
37
38var thw_interval;
39function thw_followmouse(){
40	thw_interval = setInterval(thw_followmouse_main,100);
41}
42function thw_followmouse_main(){
43  if (mX >= 50 && mY >= 50){
44	clearInterval(thw_interval);
45    var $holder = jQuery('.short_body');
46    $holder.highlight('nu', 'myhighlight');
47    $holder.highlight('Nu', 'myhighlight');
48    $holder.highlight('nU', 'myhighlight');
49    $holder.highlight('NU', 'myhighlight');
50
51 	$holder = jQuery('.entry');
52    $holder.highlight('nu', 'myhighlight');
53    $holder.highlight('Nu', 'myhighlight');
54    $holder.highlight('nU', 'myhighlight');
55    $holder.highlight('NU', 'myhighlight');	
56
57    jQuery('.myhighlight').each(function (){
58      var $this = jQuery(this);
59      var tmp = $this.clone();
60      var tmp2 = $this.clone();
61	  var tmp3 = $this.clone();
62	  var tmp4 = $this.clone();
63      var nuX = getRandom(100) - 50;
64      var nuY = getRandom(100) - 50;
65      var os = $this.position();
66      tmp.appendTo('#left').addClass('js-highlight').addClass('js-highlight2');
67      tmp.css('left', (os.left + nuX) + 'px');
68      tmp.css('top', (os.top + nuY) + 'px');
69      nuX = getRandom(100) - 50;
70      nuY = getRandom(100) - 50;
71      tmp2.appendTo('#left').addClass('js-highlight').addClass('js-highlight2');
72      tmp2.css('left', (os.left + nuX) + 'px');
73      tmp2.css('top', (os.top + nuY) + 'px');
74      nuX = getRandom(100) - 50;
75      nuY = getRandom(100) - 50;
76      tmp3.appendTo('#left').addClass('js-highlight').addClass('js-highlight2');
77      tmp3.css('left', (os.left + nuX) + 'px');
78      tmp3.css('top', (os.top + nuY) + 'px');
79      nuX = getRandom(100) - 50;
80      nuY = getRandom(100) - 50; 
81      tmp4.appendTo('#left').addClass('js-highlight').addClass('js-highlight2');
82      tmp4.css('left', (os.left + nuX) + 'px');
83      tmp4.css('top', (os.top + nuY) + 'px');
84    });
85	 var zeadd = false;
86
87    jQuery('.js-highlight').each(function (){
88     
89      jQuery(this).stop().animate({
90        top :mY - 50 + getRandom(100),
91        left:mX - jQuery('#left').offset().left - 50 + getRandom(100)
92      }, {
93        duration:1750,
94        complete:function (){
95          jQuery(this).hide();
96	  if (!zeadd){
97	    zeadd = true;
98            jQuery('#left').append('<img id="thw_theImg" src="http://bbcdn.go.gba.bbelements.com/logos/cdn5006/b349107/nu_animated_dance.gif"/>');
99            jQuery('#thw_theImg').offset({'top':mY + 20, 'left':mX - 140}).fadeIn(2000);
100          }
101        }
102      });
103    });
104  }
105}
106
107function getRandom(seed) {
108  return Math.floor(Math.random() * seed);
109};
110
111function thw_hidestuff(){
112	 jQuery('#thw_theImg').hide();
113}

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.