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: 
We use OO in C a lot here, but only for encapsulation and abstraction, no polymorphism or so.

Which means we have specific types, like FooBar(Foo a, ...) but, for our collection "classes", we use void \*. Just use void \* where multiple types could be used, BUT, by doing so, ensure you don't need the argument to be of a specific type. As per collection, having void \* is alright, because the collection doesn't care about the type. But if your function can accept type a and type b but none other, make two variants, one for a and one for b.

The main point is to use a void \* only when you don't care about the type.

Now, if you have 50 types with the same base structure (let's say, int a; int b; as first members of all types), and want a function to act upon those types, just make the common first members a type by itself, then make the function accept this, and pass object->ab or (AB\*)object is your type is opaque, both will work if ab is the first field in your struct.
You can use macros, they will work with any type and the compiler will check statically the expanded code. The downside is that the code density (in the binary) will worsen and they are more difficult to debug.

I asked this [question about generic functions](https://stackoverflow.com/questions/894167/functional-programming-in-c-with-macro-higher-order-function-generators) some time ago and the answers could help you.