Fancybox add left/right buttons to the title
<p>I just need help finishing this off now, the if statement that displays the prev/next buttons in the title are not working correctly. </p>

<p>Customising the standard fancybox by adding extra left / right buttons to the title like in the example image here:</p>

<p><img src="http://i.stack.imgur.com/aqfrT.jpg" alt="enter image description here"></p>

<p>This is what I have so far which adds the image count. Can the buttons be added to this, making it easier to style?</p>

<pre><code> $("a.fancybox").fancybox({
            'padding' : 5,
            'overlayShow' : true,
            'speedIn' : 600,
            'speedOut' : 500,
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'easingIn' : 'easeOutBack',
            'easingOut' : 'easeInBack',
            'titlePosition' : 'inside',
            'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 
                 $title = '';
                 var current = currentIndex + 1;
                 if(current &gt;= currentArray.length){
                     $title += '&lt;a href="javascript:;" onclick="$.fancybox.prev();" id="fancybox-prev-btn"&gt;&lt;/a&gt;';
                 }
                 if(current &lt;= currentArray.length){
                     $title += '&lt;a href="javascript:;" onclick="$.fancybox.next();" id="fancybox-next-btn"&gt;&lt;/a&gt;';
                 }
                 $title += '&lt;span class="fancybox-title"&gt;' + title + '&lt;span class="fancybox-title-count"&gt;(image ' + (currentIndex + 1)  + ' of ' + currentArray.length + ')&lt;/span&gt;&lt;/span&gt;&lt;br class="clearBoth"/&gt;';
                 return $title;
            } 
        });
</code></pre>
