
function Laden() {
	var move = -15;
	var zoom = 1.1;

	$('.blog').unbind('mouseenter mouseleave')
	$('.blog').hover(function() {		
	width = $('.blog').width() * zoom;
	height = $('.blog').height() * zoom;

	$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:400});

	$(this).find('div.caption').stop(false,true).fadeIn(400);
	$(this).find('div.titel div.info div.date').stop(false,true).fadeOut(400);
	$(this).find('div.titel div.info div.sub').stop(false,true).fadeIn(400);
	$(this).find('.nCat').stop(false,true).fadeIn(400);
	},
	function() {
		$(this).find('img').stop(false,true).animate({'width':$('.blog').width(), 'height':$('.blog').height(), 'top':'0', 'left':'0'}, {duration:400});	
		
		$(this).find('div.caption').stop(false,true).fadeOut(400);
		$(this).find('div.titel div.info div.date').stop(false,true).fadeIn(400);
		$(this).find('div.titel div.info div.sub').stop(false,true).fadeOut(400);
		$(this).find('.nCat').stop(false,true).fadeOut(400);
	});
		
	$('.nCat').unbind('mouseenter mouseleave')
	$('.nCat').hover(function() {
		$(this).find('.cats').stop(false,true).fadeIn(400);
	},
	function() {
		$(this).find('.cats').stop(false,true).fadeOut(400);
	});
		
	$('.catSelector').unbind('mouseenter mouseleave')
	$('.catSelector').hover(function() {
		$(this).find('.cats').stop(false,true).fadeIn(400);
	},
	function() {
		$(this).find('.cats').stop(false,true).fadeOut(400);
	});
}

function InfScroll() {
	$('section.container div#allArticles').infinitescroll({
		navSelector  : "div.myNavi",
		nextSelector : "div.myNavi a.next",
		itemSelector : "section.container div#allArticles article.blog",
		debug        : false,
		loadingImg   : "http://www.easy.nu/images/loading.gif",
		animate      : false,
		extraScrollPx: 150,
		bufferPx     : 100,
		errorCallback: function(){},
		localMode    : false
	},function(arrayOfNewElems){
		Laden();
	});
}

$(document).ready(function() {


	marginHover = "15";
	marginNormal = "20";
	$('footer .goto').hover(function() {
		$(this).stop(false,true).animate({'marginLeft':marginHover}, {duration:200});
	},
	function() {
		$(this).stop(false,true).animate({'marginLeft':marginNormal}, {duration:200});		
	});	
});

