jQuery(document).ready(function () {
	
(function ($) {
	
	
$('#rotator-container').each(function(){
	
	if ($('#rotator-container > img').size() > 1) {
	
		$(this).nivoSlider();
	}
});


$('div.node-teaser').each(function(){

	// Fade in buttons
	$(this).mouseenter(function(e) {
		$(this).children('div.project-teaser-meta').animate({top: 0}, 200, 'swing');
	});
	

	// Fade out buttons
	$(this).mouseleave(function(e) {
		$(this).children('div.project-teaser-meta').animate({top: 150}, 200, 'swing');
	});
	
});


$('a#home-link').each(function(){

	// slide in buttons
	$(this).mouseenter(function(e) {
		$(this).animate({backgroundPosition: 0}, 250, 'swing');
	});
	

	// slide out buttons
	$(this).mouseleave(function(e) {
		$(this).animate({backgroundPosition: 40}, 100, 'swing');
	});
	
});



$('div.rotator-nav-next').each(function(){

	// slide in buttons
	$(this).mouseenter(function(e) {
		$(this).animate({right: 0}, 100, 'swing');
	});
	

	// slide out buttons
	$(this).mouseleave(function(e) {
		$(this).animate({right: -20}, 100, 'swing');
	});
	
});


$('div.rotator-nav-prev').each(function(){

	// slide in buttons
	$(this).mouseenter(function(e) {
		$(this).animate({left: 0}, 100, 'swing');
	});
	

	// slide out buttons
	$(this).mouseleave(function(e) {
		$(this).animate({left: -20}, 100, 'swing');
	});
	
});







})(jQuery);

});;

