
(function($){
    $.fn.descriptionToolTip = function() {
        return this.each(function() {
                var $this = $(this);

                    $this.bind('mouseenter', function() {
                                if ($this.attr('class') == 'recent-tests-product') {
                                    $this.find('.number-tested').css('left', $this.position().left + 34 + "px");
                                } else {
                                    $this.find('.number-tested').css({'left': $this.position().left + 52 + "px",'top':$this.position().top + 66 + "px"});
                                }
                                $this.find('.number-tested').css('display', 'block');
                              }
                            );
                    $this.bind('mouseleave', function() {
                                    $this.find('.number-tested').css('display', 'none');
                                }
                            );
                }

        );

    };

    $.fn.hasAttr = function(name) {
        return this.attr(name) !== undefined;
    };
})(jQuery);
