Question: If page has .pdf files linked then a message in `<p>` should be add just before end of the `#mainontent` div as a last paragraph `<p>` 

for example this is default html?

```
<div id="maincontent">
<ul class="cheat_sheet_downloads">
<li><a href="http://www.addedbytes.com/download/css-cheat-sheet-v2.pdf">PDF, 316Kb</a></li>
<li><a href="http://www.addedbytes.com/download/css-cheat-sheet-v3.pdf/">PNG, 77Kb</a></li>
</ul>
<div>

```

After detecting pdf

it should be like this

```
<div id="maincontent">
    <ul class="cheat_sheet_downloads">
    <li><a href="http://www.addedbytes.com/download/css-cheat-sheet-v2.pdf/">PDF, 316Kb</a></li>
    <li><a href="http://www.addedbytes.com/download/css-cheat-sheet-v3.pdf/">PNG, 77Kb</a></li>
    </ul>
<div>

<div id="ttip">
Most computers will open PDF documents automatically, but you may need to 
download <a title="Link to Adobe website - opens in a new window"  
href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">
                 Adobe Reader</a>.
</div>

```

or as another div after `#maincontent` div. Is it possible with jquery?

Edit:

Page can have one or more PDF i want to add message at bottom. and i need IE 6 compatibility too

Edit 2 : I can't and don't want to use mouse over tooltip

Answer: 
You can efficiently add type information, inheritance and polymorphism to C data structures, that's what C++ does. (<http://www.embedded.com/97/fe29712.htm>)
A generic container can be wrapped with a little work so that it can be instantiated in type-safe versions. Here is an example, full headers linked below:

/\* generic implementation \*/

```
struct deque *deque_next(struct deque *dq);

void *deque_value(const struct deque *dq);

/* Prepend a node carrying `value` to the deque `dq` which may
 * be NULL, in which case a new deque is created.
 * O(1)
 */
void deque_prepend(struct deque **dq, void *value); 

```

From the header that can be used to instantiate specific wrapped types of deque

```
#include "deque.h"

#ifndef DEQUE_TAG
#error "Must define DEQUE_TAG to use this header file"
#ifndef DEQUE_VALUE_TYPE
#error "Must define DEQUE_VALUE_TYPE to use this header file"
#endif
#else

#define DEQUE_GEN_PASTE_(x,y) x ## y
#define DEQUE_GEN_PASTE(x,y) DEQUE_GEN_PASTE_(x,y)
#define DQTAG(suffix) DEQUE_GEN_PASTE(DEQUE_TAG,suffix)

#define DQVALUE DEQUE_VALUE_TYPE

#define DQREF DQTAG(_ref_t)

typedef struct {
    deque_t *dq;
} DQREF;

static inline DQREF DQTAG(_next) (DQREF ref) {
    return (DQREF){deque_next(ref.dq)};
}

static inline DQVALUE DQTAG(_value) (DQREF ref) {
    return deque_value(ref.dq);
}

static inline void DQTAG(_prepend) (DQREF *ref, DQVALUE val) {
    deque_prepend(&ref->dq, val);
}

```

* deque.h: <http://ideone.com/eDNBN>
* deque\_gen.h: <http://ideone.com/IkJRq>