function mycarousel_initCallback(carousel)
{
	jQuery('#mycarousel li a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr("value")));
        return false;
    });
	
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

function carousel_itemFirstInCallback(carousel, item, idx, state){
	
	jQuery('#cr_container li').each(function(i,de){
		if(i==(idx-1)){
			jQuery(de).fadeIn();
		}
		else{
			jQuery(de).hide();
		}
	});
}

jQuery(document).ready(function() {

	$('#slider').nivoSlider({
		pauseTime:6000,
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		pauseOnHover:true //Stop animation while hovering
	});

    // fancy box settings
    $(".video_box").fancybox({
        'padding': 0,
        'width': 480,
        'height': 360,
        'autoScale': false,
        'autoDimensions': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
	/*
jQuery.getFeed({
        url: 'feed/proxy.php?url=http://parentingtoday.org/index.php/feed/',
        success: function(feed) {
            for(var i = 0; i < feed.items.length && i < 1; i++) {
                var item = feed.items[i];
                jQuery("#parenting_today_span").append('<a href="' + item.link + '" target="_blank">' + item.title + '</a>');
            }
            
        }    
    });
*/
});