var $slideshow = {
  
    context: false,
  
    init: function() {
        this.context = $('#content .slideshow');
        
        //  Fix lightbox opacity so that it validates
        $('#overlay').css('opacity', '0.6');
        
        // create next and prev buttons for jCarousel Lite
        this.context.append($('<span class="prev">prev<span></span></span>'));
        this.context.append($('<span class="next">next<span></span></span>'));
        
        // add background image to slideshow div, remove it from each li
        // abd create jCarousel
        this.context.find('ul li').css('background-image', 'none');
        this.context.find('> div').jCarouselLite({
            btnNext: ".next",
            btnPrev: ".prev",
            scroll:1,
            visible: 1,
            circular: true
        }).css('background', 'url(/img/carousel_.png) no-repeat center bottom');    

        // apply lightbox to necessary links
    	this.context.find('a[rel*=lightbox]').lightbox();
    }
  
};

$(function() {
    $slideshow.init();
});	