I've build an simple show/hide script with an loading animation. But I want the loading animation to be atleast 0,5 seconds.

```
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#loading').hide();
        $('#notesunlimitedcontent').hide();
        $('#notescontent').show();

        $('a#nsetcontent').click(function () {
            $('#loading').show();
            $('#notesunlimitedcontent').hide();
            $('#notescontent').show();
            $('#loading').hide();
        });

        $('a#nusetcontent').click(function () {
            $('#loading').show();
            $('#notescontent').hide();
            $('#notesunlimitedcontent').show();
            $('#loading').hide();
        });

    });
</script>

<a id="nsetcontent" href="#">show</a>
<a id="nusetcontent" href="#">show</a>

<div id="loading">
    <img src="loading.gif"/>
</div>
<div id="notescontent">
</div>
<div id="notesunlimitedcontent">
</div>

```

So it looks like this, I don't know if I did code it right since i'm new to jquery. But I've tested it, it does show and hide the two divs but I did not see that happen with the loading div, maybe because it went to fast?

I hope someone can explain me how to let the loading time be atleast 0.5 seconds.

Thank you!