function danielpuffe_home(){
	$(document).ready(function(){
		var number_of_posts = $('li.post-item').length;
		var item_width = $('li.post-item:first').width();
		$('.post-container').css({ 'width':number_of_posts*item_width+'px' });
		
		$('.post-container, .control-left, .control-right').hover(
			function(){
				$('.control-left').stop().animate({ 'margin-left':'0px' });
				$('.control-right').stop().animate({ 'margin-right':'0px' });
			},
			function(){
				$('.control-left').stop().animate({ 'margin-left':'-60px' });
				$('.control-right').stop().animate({ 'margin-right':'-60px' });
			}
		);
		
		$('.control-right').click(function(){
			var max_marginLeft = $('.post-container').width()-item_width;
			if(parseFloat($('.post-container').css('margin-left')) > -max_marginLeft){
				$('.post-container').animate({ 'margin-left':'-='+item_width+'px' });
			}else{
				$('.post-container').animate({ 'margin-left':'0px' });
			}
		});	
		$('.control-left').click(function(){
			var max_marginLeft = $('.post-container').width()-item_width;
			if(parseFloat($('.post-container').css('margin-left'))==0){
				$('.post-container').animate({ 'margin-left':'-'+max_marginLeft+'px' });
			}else if(parseFloat($('.post-container').css('margin-left')) < 0){
				$('.post-container').animate({ 'margin-left':'+='+item_width+'px' });
			}else{
				$('.post-container').animate({ 'margin-left':'0px' });
			}
		});	
	});
}
