In my jquery function I have a loader gif image. After I show it I want to put a delay for a second and then continue to execute the rest of the code. 
How can I do that? 

```
    $('#loader').css('display', '');

    //// I want to put here a delay. 

    var myDate = new Date();
    myDate.setFullYear(2013,8,2);

    var checkyear = myDate.getFullYear();
    var monthly =myDate.getMonth();
    var daily =myDate.getDate();

    $('#day').html(daily) ;
    $('#month').html(months[monthly]) ;
    $('#year').html(checkyear) ;

```