$(document).ready(function(){
$('.mehrLesen').click(function() {
	$(this).hide();
	$('.mehr').hide();
	$('.wenigerLesen').hide();
	$(this).next().show();
	$(this).next().append('<div class="wenigerLesen">weniger lesen</div>');
});
$('.wenigerLesen').live('click',function() {
	$(this).hide();
	$('.mehr').hide();
	$('.mehrLesen').show();
});
$('.blog_list a img').live('click', function() {
var image=$(this).parent().attr('href');
var title=$(this).attr('title');
jQuery.slimbox('/fileadmin/slir/w600-c/'+image, title);
return false;
});
	$('#weitereBeitraege').click(function(){
		var start=$('.blog_list').length;
	$.ajax({
	type:'POST',
    url: '/?eID=ajax',
    data: {
	eID: "ajax",	// die erstellte eID
	start:start
	},
    dataType: 'json',
    success: function(result) {
    if (result.myResult!='false') {
$.each(result, function(i,item){
        $('<div class="blog_list"><div class="blog_links"><div class="blog_image"><a href="uploads/tx_blog/'+item.bild+'" rel="lightbox"><img src="/fileadmin/slir/w250-c/uploads/tx_blog/'+item.bild+'" title="'+item.ueberschrift+'" alt="'+item.ueberschrift+'" /></a></div></div><div class="blog_mitte"><div class="blog_datum"><div class="datum_links">'+item.tag+'</div><div class="datum_rechts">'+item.monat+'</div></div></div><div class="blog_rechts"><div class="blog_ueberschrift">'+item.ueberschrift+'</div><div class="blog_text">'+item.text_4a0cb2dbf8+'</div></div></div></div></div></div>').appendTo('.blog_eintrag');
    });
	var windowHeight=$(window).height();
	var contentHeight=$('#innerbody').height();
	var footerHeight=279+116;
	if(contentHeight+footerHeight > windowHeight) {
	$('#footer').css('top',contentHeight+116);
	}
	else {
	$('#footer').css({'top':'auto','bottom':0});
	}
	}
    else {
	}
    }
    });
	});
});
