$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
  $('div#full-width').nifty('transparent');
  $('div#poster,div#what,div#on-the-blog').nifty('same-height');
  $('a.balloon span.pkn,a.balloon div,span.balloon div').nifty('transparent');
  $('#scrollbar').jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null,
        auto: 4,
        wrap: 'circular'
  });
});

function mycarousel_initCallback(carousel) {

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    $('.preve').bind('click', function() {
        carousel.startAuto(0);
        carousel.prev();
        return false;
    });
    $('.nexte').bind('click', function() {
        carousel.startAuto(0);
        carousel.next();
        return false;
    });
};
