/*********************************************************
 * Author: Marko Roeper <marko.roeper@googlemail.de>     *
 * All Rights Reserved                                   *
 *********************************************************/

$(document).ready(function()
{
	$('#maincontent').css({'overflow':'hidden','height':'502px','width':'434px','position':'relative','overflow-y':'hidden','padding':'0'});
	$('#maincontent .items').css('margin', '0');
	$('#actions a').removeClass('disabled');
});

$(window).load(function()
{
	var scroll_size = 5;
	if($('body').hasClass('marken')) scroll_size = 6;
	else if($('body').hasClass('kontakt')) scroll_size = 10;
	else if($('body').hasClass('standort')) scroll_size = 4;
	else if($('body').hasClass('news'))	scroll_size = 6;
	$('#maincontent').scrollable({vertical:true,size:scroll_size}).mousewheel().navigator({navi:'div.paginate',naviItem:'a',idPrefix:'navi_'});
	if($('div.paginate a').length<2){$('div.paginate').remove();}
	$('div.paginate a:first').addClass('first');
	$('div.paginate a').each(function(){$(this).html(parseInt($(this).attr('id').replace(/navi_/,''))+1);});
	$('#news_teaser h2 a').click(function(event){event.preventDefault();$('#news_teaser .news-latest').toggleClass('open');$('#news_teaser h2 a').toggleClass('open');});
});
