Call function in custom function
<p>I'm trying to figure out how this custom jQuery functions work by experimenting a bit. I can't however get it to work properly. I'm trying to call the <code>prepareSlide</code> function in my setInterval but it says <code>prepareSlide is not defined</code></p>

<pre><code>$('document').ready(function(){
    jQuery('.item_holder').itemSlider({
        start: 1,
        carousel: true
    });
});
$.fn.itemSlider = function (details) {
    var currentSlideNumber = (details &amp;&amp; details.start &gt; 0) ? details.start : 1;
    this.prepareSlide = function(slideNumber) {
        alert(1)
    }
    //Set an interval
    var itemToSlide = currentSlideNumber + 1;
    slideTimer = setInterval("prepareSlide(" + itemToSlide + ")", 5000);
}
</code></pre>
