jQuery effects don't work when I add a speed
<p>I'm pretty new to jQuery (and javascript for  that matter), so this is probably just something stupid I'm doing, but it's really annoying me!</p>

<p>All I'm trying to do is add a speed to jQuery's hide and show functions.  The code I'm using is:</p>

<pre><code>for (var i in clouds) {
    $(clouds[i]).click(function() {
    $(this).hide();
    });
}
</code></pre>

<p>to hide clouds when they're clicked on, and</p>

<pre><code>function fadeLogo(state) { 
    var element=document.getElementById('logo');

    if (state=='home') {
        element.hide;
        element.src='images/home.png';
        element.show;
    }

    else {
        element.hide;
        element.src='images/webNameLogo.png';
        element.show;
    }
}
</code></pre>

<p>to hide an image, change it and then show it again.  This is called by</p>

<pre><code>onMouseOver=fadeLogo('home') onMouseOut=fadeLogo('logo')
</code></pre>

<p>This works fine, but happens instantaneously.  Whenever I try to include a speed, either as 'slow', 'fast' or in milliseconds, it won't work, they just stay in their original states.  Even adding hide() without a speed throws up an error in Safari's error console:</p>

<p>TypeError: Result of expression 'element.hide' [undefined] is not a function.</p>

<p>No errors are reported for the clouds, they just sit there not doing anything!</p>

<p>Hope someone can help!</p>

<p>Thanks </p>

<p>EDIT:</p>

<p>Now have this for the image change:</p>

<pre><code>$(function() { //This funtion fades the logo to the home button on mouseover

    $('.logo').hover(function() {
        $(this).fadeOut(
            'slow',
            function () {
                $(this).attr ('src','images/home.png').fadeIn('slow');
            });
    }, function() {
        $(this).fadeOut(
            'slow',
            function () {
                $(this).attr('src','images/webNameLogo.png').fadeIn('slow');
            });
    });
});
</code></pre>

<p>Which fades the image out and in no problem, but doesn't change between the 2 images...
Oops, should have been #logo.  Got that one working now, onto the pesky clouds...</p>
