function mycarousel_initCallback(carousel) {
    jQuery('.b-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('.b-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};


jQuery(document).ready(function($) {
	$('.latest-posts').jcarousel({
		vertical: true,
		scroll: 2,
		wrap: "both",
		initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
	$('.galleries').jcarousel({
		vertical: true,
		scroll: 2,
		wrap: "both",
		initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
	
	$('.featured-post').hover(function() {
		$(this).find('h2').fadeIn();
	}, function() {
		$(this).find('h2').fadeOut('fast');
	});
	
	$('.post, .single .holder').hover(function() {
		$(this).find('.post-head').fadeIn();
	}, function() {
		$(this).find('.post-head').fadeOut('fast');
	});
	
	$('.video-thumbs a').click(function() {
		$('.video-holder').html('<object width="600" height="330"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + $(this).attr('rel') + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' + $(this).attr('rel') + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1"  type="application/x-shockwave-flash"  allowfullscreen="true"  allowscriptaccess="always"  width="600"  height="330"></embed></object>');
		return false;
	});
	
	$('.thumbs a').lightBox();
});
