I've have pieced together a simple function that adjust the height of some logos when they appear too large in height. The code worked fine the first time I tested it. But now it only works on every 3rd og 4th click. I suspect it has to do with the doc load function vs. the image load, but I am not sure.

```
<script>
// Get on screen image
$( document ).ready(function()

 {
$('#jobcontainer img').each(function() {
      if($(this).height()>50) {
         $(this).addClass('reduceheight')
      }
})

<style>
.reduceheight { width:40%;}
</style>

<table id="jobcontainer" width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr class="dknytliste">
        <td width="138" valign="top" class="dknytliste" style="padding-right:1em;"><p><a href="" class="dknytlink" title=""></a></p></td>
        <td><a href="" class="dknytlink" title=""><img src="" /> </a></td>
    </tr>
    <tr> </tr>
</table>

```

Check it out here: <http://dknyt.dk/forside/index2.php> Its the jobcontainer on the right.

Help would be very much apprciated.